My Azure DevOps Pipeine getting below warning:
##[warning]Task 'Amazon ECR Push' version 1 (ECRPushImage@1) is dependent on a Node version (10) that is end-of-life. Contact the extension owner for an updated version of the task. Task maintainers should review Node upgrade guidance: https://aka.ms/node-runner-guidance
My Pipeline tasks:
- task: AWSShellScript@1
displayName: Docker build ${{ appService.name }}
inputs:
regionName: '${{ parameters.ecrRegion }}'
scriptType: 'inline'
inlineScript: |
aws ecr get-login-password --region ${{ parameters.ecrRegion }}| docker login --username AWS --password-stdin $(ecrURL)
echo -e "FROM ${{ parameters.openJDKImage }} nRUN mkdir /artifact && apk add openssl nCOPY ${{ appService.name }}-$(JAR_SNAPSHOT_VERSION).jar /artifact/service.jar nCMD ["/bin/sh", "-c", "java -jar /artifact/service.jar"]" > Dockerfile | docker build . -t $(ecrURL)/${{ appService.ecrRepo }}:$(VERSION)-$(COMMIT)
disableAutoCwd: true
workingDirectory: '$(System.DefaultWorkingDirectory)'
- task: ECRPushImage@1
displayName: Push ${{ appService.name }} image to DEV ECR
inputs:
regionName: '${{ parameters.ecrRegion }}'
sourceImageName: '$(ecrURL)/${{ appService.ecrRepo }}'
sourceImageTag: '$(VERSION)-$(COMMIT)'
repositoryName: '${{ appService.ecrRepo }}'
pushTag: '$(VERSION)-$(COMMIT)'
outputVariable: '$(ecrURL)/${{ appService.ecrRepo }}:$(VERSION)-$(COMMIT)'
We are using Azure DevOps default agents for pipeline runs.
i also tried to update the task to 2 but its not working.
Pls any one have the information, let me know.
2
Answers
@brucewayne
The warning error you are seeing is a known issue with the AWS Toolkit for Azure DevOps extension and you can follow discussions: ECRPushImage warning in Azure Devops due to Node10 dependency
If this becomes a significant problem, consider using alternative tasks, such as Bash@3 and Docker@2 and avoid using tasks from the extension, while this is been fixed.
I have tried a simple pipeline with Docker task:
The full yaml file is here: https://github.com/iheanacho-chukwu/aks-hellowebapi/blob/deploy-to-ecr/docker-task-aws.yml
another one using entirely bash: https://github.com/iheanacho-chukwu/aks-hellowebapi/blob/deploy-to-ecr/push-docker-image-ecr-using-bash.yml
I passed my AWS credential as Azure DevOps variable group, so I dont have to hardcode to repo.
Azure DevOps already posted the announce about Remove Node 6 and Node 10 runners from Microsoft-hosted agents in 2022.
As mentioned by @nacho, this is a known issue in AWS. AWS is working on migrating to Node 16.
This is the extension published by AWS and haven’t been fixed. Based on the current situation, I would suggest you use AWS CLI in the pipeline directly instead of using the extension.