Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Issue with Bit bucket pre available pipes

Hello  Community Team, 


We have encountered an Issue with pipe named  atlassian/aws-eks-kubectl-run:2.2.0 for deploying into cluster from the repo   with workspace url


We are encountering file not found though file is there in the path to apply hibernates deployment.


Here is the build number for reference.!/results/20



1 answer

0 votes
Pramodh M Community Leader Jan 11, 2022

Hi @Midhun Kumar 

Welcome to the Community!!

Did you try giving the absolute path and checking for the RESOURCE_PATH variable?

Hi Pramodh,


The file which we are applying has present in project root folder. If you see the build output for the failed stage it has the file over there. 


Best Regards,

Midhun A

@Pramodh M Any update 

You can check repo if required.

Pramodh M Community Leader Jan 12, 2022

@Midhun Kumar 

Can you send over the raw logs in here?

 umask 000

+ GIT_LFS_SKIP_SMUDGE=1 retry 6 git clone --branch="master" --depth 50 https://x-token-auth:$$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

+ git reset --hard 2bad71eeecfe0817445b637dca3717f5060667ec
HEAD is now at 2bad71e bitbucket-pipelines.yml edited online with Bitbucket

+ git config bitbucket-pipelines

+ git config

+ git config push.default current

+ git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/

+ git remote set-url origin$BITBUCKET_REPO_FULL_NAME

+ git reflog expire --expire=all --all

+ echo ".bitbucket/pipelines/generated" >> .git/info/exclude

+ chmod 777 $BUILD_DIR

Artifact "target/sonar/report-task.txt": Downloading
Artifact "target/sonar/report-task.txt": Downloaded 318 B in 0 seconds
Artifact "target/sonar/report-task.txt": Extracting
Artifact "target/sonar/report-task.txt": Extracted in 0 seconds

Images used:
build :


+ sed -i 's/\$IMGTAG'"/$DEPLOY_VERSION/g" kube-uat-mum-eks-deployment.yaml

+ sed -i -e 's:$APIVERSION'":$KUBEAPIVERSION:g" kube-uat-mum-eks-deployment.yaml

+ ls -ltr & pwd

total 112
-rw-rw-rw- 1 root root 4231 Jan 12 04:59 uat-deployment.yaml
drwxrwxrwx 4 root root 4096 Jan 12 04:59 src
-rw-rw-rw- 1 root root 3824 Jan 12 04:59 prod-ext-deployment.yaml
-rw-rw-rw- 1 root root 3807 Jan 12 04:59 prod-deployment.yaml
-rw-rw-rw- 1 root root 4605 Jan 12 04:59 prod-aw-cht-ext-deployment.yaml
-rw-rw-rw- 1 root root 5341 Jan 12 04:59 prod-aw-cht-deployment.yaml
-rw-rw-rw- 1 root root 6102 Jan 12 04:59 pom.xml
-rw-rw-rw- 1 root root 5811 Jan 12 04:59 mvnw.cmd
-rwxrwxrwx 1 root root 9114 Jan 12 04:59 mvnw
-rw-rw-rw- 1 root root 2416 Jan 12 04:59 docker-compose.yml
-rw-rw-rw- 1 root root 3209 Jan 12 04:59 docker-compose-graylog3.yml
-rw-rw-rw- 1 root root 2886 Jan 12 04:59 dev-deployment.yaml
-rw-rw-rw- 1 root root 8479 Jan 12 04:59 bitbucket-pipelines.yml
-rw-rw-rw- 1 root root 557 Jan 12 04:59
-rw-rw-rw- 1 root root 905 Jan 12 04:59
-rw-rw-rw- 1 root root 430 Jan 12 04:59 Dockerfile
drwxr-xr-x 3 root root 4096 Jan 12 04:59 target
-rw-rw-rw- 1 root root 4285 Jan 12 04:59 kube-uat-mum-eks-deployment.yaml
+ 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-eks-kubectl-run:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/aws-eks-kubectl-run \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=CI="$CI" \
--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-eks-kubectl-run" \
--env=DEBUG="true" \
--env=KUBECTL_COMMAND="apply" \
--env=RESOURCE_PATH="kube-uat-mum-eks-deployment.yml" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
Unable to find image 'bitbucketpipelines/aws-eks-kubectl-run:2.2.0' locally
2.2.0: Pulling from bitbucketpipelines/aws-eks-kubectl-run
07aded7c29c6: Pulling fs layer
1242903d2b23: Pulling fs layer
6feb96d3e4f9: Pulling fs layer
36bf03acdc50: Pulling fs layer
366f5e2f7043: Pulling fs layer
2efba0da2be9: Pulling fs layer
3a7c21493639: Pulling fs layer
d92dcd533b57: Pulling fs layer
50cf76112433: Pulling fs layer
c5f0bcebca98: Pulling fs layer
6a3894d8edd4: Pulling fs layer
72b74681051b: Pulling fs layer
36bf03acdc50: Waiting
366f5e2f7043: Waiting
2efba0da2be9: Waiting
3a7c21493639: Waiting
d92dcd533b57: Waiting
50cf76112433: Waiting
c5f0bcebca98: Waiting
6a3894d8edd4: Waiting
72b74681051b: Waiting
1242903d2b23: Verifying Checksum
1242903d2b23: Download complete
6feb96d3e4f9: Verifying Checksum
6feb96d3e4f9: Download complete
07aded7c29c6: Verifying Checksum
07aded7c29c6: Download complete
36bf03acdc50: Verifying Checksum
36bf03acdc50: Download complete
366f5e2f7043: Verifying Checksum
366f5e2f7043: Download complete
2efba0da2be9: Verifying Checksum
2efba0da2be9: Download complete
50cf76112433: Verifying Checksum
50cf76112433: Download complete
c5f0bcebca98: Verifying Checksum
c5f0bcebca98: Download complete
d92dcd533b57: Verifying Checksum
d92dcd533b57: Download complete
6a3894d8edd4: Download complete
3a7c21493639: Verifying Checksum
3a7c21493639: Download complete
07aded7c29c6: Pull complete
72b74681051b: Download complete
1242903d2b23: Pull complete
6feb96d3e4f9: Pull complete
36bf03acdc50: Pull complete
366f5e2f7043: Pull complete
2efba0da2be9: Pull complete
3a7c21493639: Pull complete
d92dcd533b57: Pull complete
50cf76112433: Pull complete
c5f0bcebca98: Pull complete
6a3894d8edd4: Pull complete
72b74681051b: Pull complete
Digest: sha256:4a9e431a82bb96676ba3ae38c24e2e49b38d5ada4925fa973622ee4ee6ad7dfa
Status: Downloaded newer image for bitbucketpipelines/aws-eks-kubectl-run:2.2.0
[37mDEBUG: Starting new HTTPS connection (1): [0m
[37mDEBUG: "GET /bitbucketpipelines/official-pipes/raw/master/ HTTP/1.1" 200 None [0m
[34mINFO: Configuring kubeconfig... [0m
Added new context arn:aws:eks:ap-south-1:914620821736:cluster/AWS-MUM-NIYOX-UAT to /root/.kube/config

cluster: arn:aws:eks:ap-south-1:914620821736:cluster/AWS-MUM-NIYOX-UAT
user: arn:aws:eks:ap-south-1:914620821736:cluster/AWS-MUM-NIYOX-UAT
name: arn:aws:eks:ap-south-1:914620821736:cluster/AWS-MUM-NIYOX-UAT

name: arn:aws:eks:ap-south-1:914620821736:cluster/AWS-MUM-NIYOX-UAT
- --region
- ap-south-1
- eks
- get-token
- --cluster-name
command: aws

name: arn:aws:eks:ap-south-1:914620821736:cluster/AWS-MUM-NIYOX-UAT

[34mINFO: Successfully updated the kube config. [0m
Traceback (most recent call last):
File "/", line 47, in <module>
File "/root/.local/lib/python3.8/site-packages/kubectl_run/", line 157, in run
File "/root/.local/lib/python3.8/site-packages/kubectl_run/", line 114, in handle_apply
self.update_labels_in_metadata(template_file, labels)
File "/root/.local/lib/python3.8/site-packages/kubectl_run/", line 29, in update_labels_in_metadata
with open(template, 'r') as template_file:
FileNotFoundError: [Errno 2] No such file or directory: 'kube-uat-mum-eks-deployment.yml'
Searching 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 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

@Pramodh M 


I cannot able to upload logs with attachment over the chat. hasn't seen an option for attachment. You can get logs from build number which I have attached.

@Midhun Kumar  hi. Thanks for your question.

Your repository is private so we don't have access to it neiher to pipeline results.

To provide help we need c
onfiguration of your bitbucket-pipeline.yml file.


Currently from all info you provided in issue maybe the problem is with:
RESOURCE_PATH | Path to the kubernetes spec file. This option is required only if the KUBECTL_COMMAND is `apply`
Seems like you provided wrong value of argument RESOURCE_PATH and pipe log shows you error message:
FileNotFoundError: [Errno 2] No such file or directory: 'kube-uat-mum-eks-deployment.yml'

Example of how to use aws-eks-kubectl pipe:

Keep in mind yml template should be in your repo.

Maybe the reason is the next:
From logs check you have here:

-rw-rw-rw- 1 root root 4285 Jan 12 04:59 kube-uat-mum-eks-deployment.yaml

but seems like in config you provided RESOURCE_PATH to yml

Regards, Igor.

thanks for support.

Like Igor Stoyanov likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

226 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you