Skip to content

Commit f911e81

Browse files
committed
added fix for nextflow launch to include workspace secrets
1 parent 0fa6b5d commit f911e81

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

modules/nextflow/src/main/groovy/nextflow/cli/CmdLaunch.groovy

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ class CmdLaunch extends CmdBase implements UsageAware {
8686
@Parameter(names = ['-main-script'], description = 'The script file to be executed when launching a project directory or repository')
8787
String mainScript
8888

89+
@Parameter(names = ['-user-secret'], description = 'Specify a user secret name to use in the pipeline (can be specified multiple times)')
90+
List<String> userSecrets = []
91+
92+
@Parameter(names = ['-workspace-secret'], description = 'Specify a workspace secret name to use in the pipeline (can be specified multiple times)')
93+
List<String> workspaceSecrets = []
94+
8995
/**
9096
* Defines the parameters to be passed to the pipeline script
9197
*/
@@ -124,7 +130,9 @@ class CmdLaunch extends CmdBase implements UsageAware {
124130
stubRun: stubRun,
125131
mainScript: mainScript,
126132
params: params,
127-
launcher: launcher
133+
launcher: launcher,
134+
userSecrets: userSecrets,
135+
workspaceSecrets: workspaceSecrets
128136
)
129137

130138
// Execute launch
@@ -156,6 +164,8 @@ class CmdLaunch extends CmdBase implements UsageAware {
156164
result << ' -latest Pull latest changes before run'
157165
result << ' -stub-run, -stub Execute the workflow replacing process scripts with command stubs'
158166
result << ' -main-script <file> The script file to be executed when launching a project'
167+
result << ' -user-secret <name> User secret name to use in the pipeline (can be specified multiple times)'
168+
result << ' -workspace-secret <name> Workspace secret name to use in the pipeline (can be specified multiple times)'
159169
result << ' --<param>=<value> Set a parameter used by the pipeline'
160170
result << ''
161171
println result.join('\n').toString()
@@ -191,5 +201,7 @@ class CmdLaunch extends CmdBase implements UsageAware {
191201
String mainScript
192202
Map<String, String> params
193203
Launcher launcher
204+
List<String> userSecrets
205+
List<String> workspaceSecrets
194206
}
195207
}

plugins/nf-tower/src/main/io/seqera/tower/plugin/launch/LaunchCommandImpl.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ class LaunchCommandImpl extends BaseCommandImpl implements CmdLaunch.LaunchComma
229229
if (paramsText) launch.paramsText = paramsText
230230
if (options.mainScript) launch.mainScript = options.mainScript
231231
if (options.entryName) launch.entryName = options.entryName
232+
if (options.userSecrets) launch.userSecrets = options.userSecrets as Set
233+
if (options.workspaceSecrets) launch.workspaceSecrets = options.workspaceSecrets as Set
232234

233235
log.debug "Built launch request with ${launch.size()} parameters"
234236
return [launch: launch]

0 commit comments

Comments
 (0)