Skip to content

Commit a7ad21b

Browse files
EMaherCopilot
andauthored
fix: use --overrides (not --override) in AzDO publish pipeline template (#75)
The Azure DevOps publish pipeline template was using `--override` (singular) which is not a recognized option in `apiops publish`. The correct flag is `--overrides` (plural). This caused the pipeline to fail with an unknown-option error regardless of which COMMIT_ID_CHOICE was selected. The incremental step already correctly passed `--commit-id $(Build.SourceVersion)` when `publish-artifacts-in-last-commit` is chosen (via the `ne()` condition). This fix ensures the command is actually valid so the commit-id flag is honoured. Agent-Logs-Url: https://github.com/Azure/apiops-cli/sessions/db84354f-ba77-4077-8d97-de9af7994fd8 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>
1 parent eafe663 commit a7ad21b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/templates/azure-devops/publish-pipeline.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function generatePublishPipeline(config: PublishPipelineConfig): string {
5454
--resource-group $(APIM_RESOURCE_GROUP_${env.toUpperCase()}) \\
5555
--service-name $(APIM_SERVICE_NAME_${env.toUpperCase()}) \\
5656
--source ${config.artifactDir} \\
57-
--override configuration.${env}.yaml \\
57+
--overrides configuration.${env}.yaml \\
5858
--commit-id $(Build.SourceVersion) \\
5959
--subscription-id $(AZURE_SUBSCRIPTION_ID)
6060
@@ -70,7 +70,7 @@ export function generatePublishPipeline(config: PublishPipelineConfig): string {
7070
--resource-group $(APIM_RESOURCE_GROUP_${env.toUpperCase()}) \\
7171
--service-name $(APIM_SERVICE_NAME_${env.toUpperCase()}) \\
7272
--source ${config.artifactDir} \\
73-
--override configuration.${env}.yaml \\
73+
--overrides configuration.${env}.yaml \\
7474
--subscription-id $(AZURE_SUBSCRIPTION_ID)
7575
`;
7676
}).join('\n');

tests/unit/templates/azure-devops/publish-pipeline.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ describe('azure-devops/publish-pipeline', () => {
199199
artifactDir: './apim-artifacts',
200200
environments: ['dev', 'prod'],
201201
});
202-
expect(pipeline).toContain('--override configuration.dev.yaml');
203-
expect(pipeline).toContain('--override configuration.prod.yaml');
202+
expect(pipeline).toContain('--overrides configuration.dev.yaml');
203+
expect(pipeline).toContain('--overrides configuration.prod.yaml');
204204
});
205205

206206
it('should use npm ci to install dependencies (uses tgz from package.json)', () => {

0 commit comments

Comments
 (0)