Skip to content

Commit 2012d05

Browse files
committed
Add logic to support Azure secrets
Signed-off-by: Ben Sherman <[email protected]>
1 parent 24b73fe commit 2012d05

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugins/nf-azure/src/main/nextflow/cloud/azure/batch/AzBatchExecutor.groovy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,19 @@ class AzBatchExecutor extends Executor implements ExtensionPoint {
9797
}
9898
}
9999

100-
protected void initBatchService() {
100+
protected void initConfig() {
101101
config = AzConfig.getConfig(session)
102-
batchService = new AzBatchService(this)
103102

104103
// Generate an account SAS token using either activeDirectory configs or storage account keys
105104
if (!config.storage().sasToken) {
106105
config.storage().sasToken = config.activeDirectory().isConfigured() || config.managedIdentity().isConfigured()
107106
? AzHelper.generateContainerSasWithActiveDirectory(workDir, config.storage().tokenDuration)
108107
: AzHelper.generateAccountSasWithAccountKey(workDir, config.storage().tokenDuration)
109108
}
109+
}
110110

111+
protected void initBatchService() {
112+
batchService = new AzBatchService(this)
111113
Global.onCleanup((it) -> batchService.close())
112114
}
113115

@@ -117,6 +119,7 @@ class AzBatchExecutor extends Executor implements ExtensionPoint {
117119
@Override
118120
protected void register() {
119121
super.register()
122+
initConfig()
120123
initBatchService()
121124
validateWorkDir()
122125
validatePathDir()

0 commit comments

Comments
 (0)