When you add arguments to a 'build and push' it presents a warning when the build runs, stating that it ignores arguments. Can we have an example of seperate build and push tasks that would allow you to add arguments to the build process please
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@ChrisGibson1982 -- Chris, you may find an example here:
@shashankbarsin -- Shashank, please consider adding such an example to the documentation.
"Other commands and arguments" is there, but would be nice to have the push command as well
new to Azure pipelines and was misled for a long time
just for reference
steps:
- task: Docker@2
displayName: Build an image
inputs:
containerRegistry: '$(containerRegistry)'
repository: '$(imageRepository)'
command: 'build'
arguments: '--build-arg app=$(app)'
Dockerfile: '$(Build.SourcesDirectory)/Dockerfile'
- task: Docker@2
displayName: Push the image
inputs:
containerRegistry: '$(containerRegistry)'
repository: '$(imageRepository)'
command: 'push'
This issue hasn't been updated in more than 180 days, so we've closed it. If you feel the issue is still relevant and needs fixed, please reopen it and we'll take another look. We appreciate your feedback and apologize for any inconvenience.
Most helpful comment
new to Azure pipelines and was misled for a long time
just for reference