diff --git a/modules/nextflow/src/main/groovy/nextflow/scm/AzureRepositoryProvider.groovy b/modules/nextflow/src/main/groovy/nextflow/scm/AzureRepositoryProvider.groovy index a8cb617bf9..8435099ebf 100644 --- a/modules/nextflow/src/main/groovy/nextflow/scm/AzureRepositoryProvider.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/scm/AzureRepositoryProvider.groovy @@ -35,6 +35,7 @@ final class AzureRepositoryProvider extends RepositoryProvider { private String user private String repo + private String urlPath; private String continuationToken AzureRepositoryProvider(String project, ProviderConfig config=null) { @@ -42,6 +43,7 @@ final class AzureRepositoryProvider extends RepositoryProvider { Azure repo format follows Organization/Project/Repository where Project can be optional If Project is not present then Repository is used as Project (and also as Repository) */ + this.urlPath = project def tokens = project.tokenize('/') this.repo = tokens.removeLast() if( tokens.size() == 1){ @@ -164,7 +166,7 @@ final class AzureRepositoryProvider extends RepositoryProvider { /** {@inheritDoc} */ @Override String getRepositoryUrl() { - "${config.server}/$project" + "${config.server}/${urlPath}" } /** {@inheritDoc} */ diff --git a/modules/nextflow/src/test/groovy/nextflow/scm/AzureRepositoryProviderTest.groovy b/modules/nextflow/src/test/groovy/nextflow/scm/AzureRepositoryProviderTest.groovy index 00e7cc74f0..decec42c1d 100644 --- a/modules/nextflow/src/test/groovy/nextflow/scm/AzureRepositoryProviderTest.groovy +++ b/modules/nextflow/src/test/groovy/nextflow/scm/AzureRepositoryProviderTest.groovy @@ -80,7 +80,7 @@ class AzureRepositoryProviderTest extends Specification { def obj = new ProviderConfig('azurerepos', config.providers.azurerepos as ConfigObject) expect: - new AzureRepositoryProvider('ORGANIZATION/PROJECT/hello', obj).getRepositoryUrl() == 'https://dev.azure.com/ORGANIZATION/PROJECT' + new AzureRepositoryProvider('ORGANIZATION/PROJECT/hello', obj).getRepositoryUrl() == 'https://dev.azure.com/ORGANIZATION/PROJECT/hello' }