I have a pipeline to ec2 and using aws ec2 codedeploy pipe and i have set all variables.Bur still I am getting error.
For reference check screenshot:
Hello @Naveen Chaudhary ,
It seems like you pipe if failing in the validation of the APPLICATION_NAME variable, that is a required variable in aws-code-deploy pipe :
Although from your screenshot you are already defining this variable, to make sure there's no typo in your bitbucket-pipelines.yml file, I would suggest copy/paste the variable from below, replacing it in your yml and try running again :
APPLICATION_NAME: 'my-application'
If that still does not work, could you please share the full logs of the pipe run? I'm especially interested in the beginning of the pipe logs, where it describes all the variables passed from the build container to the pipe's container.
Also, could you please confirm if you have any environment variable at the workspace/repository/deployment level with the same name as APPLICATION_NAME ?
Thank you, @Naveen Chaudhary
Kind regards,
Patrik S
@Patrik SAs you have suggested i have copy and paste the APPLICATION_NAME variable,but still it is not working.
Please check logs below.
Logs:-
+ umask 000
+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIRCloning into '/opt/atlassian/pipelines/agent/build'...
+ git reset --hard 2fc3c748e99b6075049a6feb3a713e476a17cb85HEAD is now at 2fc3c74 https://bitbucket.org/naveen004/calibrate/src/2fc3c748e99b6075049a6feb3a713e476a17cb85/bitbucket-pipelines.yml edited online with Bitbucket
+ git config user.name bitbucket-pipelines
+ git config user.email commits-noreply@bitbucket.org
+ git config push.default current
+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/
+ git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME
+ git reflog expire --expire=all --all
+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude
+ chmod 777 $BUILD_DIR
Images used:build : docker.io/library/python@sha256:9e0b4f32487ca1863b45383420b8db77990debae748e2e875d2f86fa9510d4a5+ docker container run \--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/aws-code-deploy:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/aws-code-deploy \--workdir=$(pwd) \--label=org.bitbucket.pipelines.system=true \--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \--env=BITBUCKET_DEPLOYMENT_ENVIRONMENT_UUID="$BITBUCKET_DEPLOYMENT_ENVIRONMENT_UUID" \--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \--env=BITBUCKET_DEPLOYMENT_ENVIRONMENT="$BITBUCKET_DEPLOYMENT_ENVIRONMENT" \--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \--env=CI="$CI" \--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \--env=DOCKER_HOST="tcp://host.docker.internal:2375" \--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/aws-code-deploy" \--env=AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \--env=AWS_DEFAULT_REGION="$AWS_DEFAULT_REGION" \--env=AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \bitbucketpipelines/aws-code-deploy:1.1.1Unable to find image 'bitbucketpipelines/aws-code-deploy:1.1.1' locally1.1.1: Pulling from bitbucketpipelines/aws-code-deploy7d63c13d9b9b: Pulling fs layer6ad2a11ca37b: Pulling fs layere9edbe81a001: Pulling fs layer36629b83aba2: Pulling fs layer3baebd9b1d65: Pulling fs layerc2702d8b887f: Pulling fs layer2f30aab3c4d5: Pulling fs layerccf4689ddb89: Pulling fs layere2879c9c94a9: Pulling fs layerc2702d8b887f: Waiting36629b83aba2: Waitinge2879c9c94a9: Waiting3baebd9b1d65: Waitingccf4689ddb89: Waiting6ad2a11ca37b: Verifying Checksum6ad2a11ca37b: Download completee9edbe81a001: Verifying Checksume9edbe81a001: Download complete36629b83aba2: Download complete7d63c13d9b9b: Verifying Checksum7d63c13d9b9b: Download completec2702d8b887f: Verifying Checksumc2702d8b887f: Download complete3baebd9b1d65: Verifying Checksum3baebd9b1d65: Download completeccf4689ddb89: Download complete2f30aab3c4d5: Verifying Checksum2f30aab3c4d5: Download completee2879c9c94a9: Verifying Checksume2879c9c94a9: Download complete7d63c13d9b9b: Pull complete6ad2a11ca37b: Pull completee9edbe81a001: Pull complete36629b83aba2: Pull complete3baebd9b1d65: Pull completec2702d8b887f: Pull complete2f30aab3c4d5: Pull completeccf4689ddb89: Pull completee2879c9c94a9: Pull completeDigest: sha256:518d1c7aa618c5cfbc5174797580bb237d4c2965139878e46199f518779a1a93Status: Downloaded newer image for bitbucketpipelines/aws-code-deploy:1.1.1[34mINFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY[0m[31m✖ Validation error: APPLICATION_NAME variable is required.[0mSearching for files matching artifact pattern .bitbucket/pipelines/generated/pipeline/pipes/**
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, TestResults, surefire-reports] down to a depth of 4Finished scanning for test reports. Found 0 test report files.Merged test suites, total number tests is 0, with 0 failures and 0 errors.
@Naveen Chaudhary hi . Thanks for your question.You have problems with linting:You have this:
script: - pipe: atlassian/aws-code-deploy:1.1.1variables: APPLICATION_NAME: 'my-application'
but should be this:
Check this guide for more info.Regards, Igor.
It looks like you're new here. Sign in or register to get started.