Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed conda lockfile rendering in build view #727

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions src/main/groovy/io/seqera/wave/controller/ViewController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,22 @@ class ViewController {
}
//add conda lock file when available
if( buildLogService && result.condaFile ) {
binding.build_conda_lock_data = buildLogService.fetchCondaLockString(result.buildId)
binding.build_conda_lock_url = "$serverUrl/v1alpha1/builds/${result.buildId}/condalock"
def condaLock = buildLogService.fetchCondaLockString(result.buildId)
def buildId = result.buildId

if ( condaLock && condaLock.contains('cat environment.lock')) {
condaLock = null //if there is no conda lock file, don't show the conda lock data
def builds = persistenceService.allBuilds(result.buildId.split('-')[1].split('_')[0])
for (def build : builds) {
if (build.succeeded()){
buildId = build.buildId
condaLock = buildLogService.fetchCondaLockString(build.buildId)
}
}
}

binding.build_conda_lock_data = condaLock
binding.build_conda_lock_url = "$serverUrl/v1alpha1/builds/${buildId}/condalock"
pditommaso marked this conversation as resolved.
Show resolved Hide resolved
}
// result the main object
return binding
Expand Down