Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,036
Community Members
 
Community Events
184
Community Groups

Serverless deploy with plugins and dockerpip

Edited

I am unable to figure out why the serverless deploy is not going through.

 

This is the bibucket-pipeline.yml


options
:
docker: true

definitions:
services:
docker:
memory: 3072
pipelines:
branches:

dev:
- step:
services:
- docker
script:
- cp config.dev.ini config.ini
- pipe: atlassian/serverless-deploy:1.2.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_DEV
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_DEV
PRE_EXECUTION_SCRIPT: "my-script.sh"
 EXTRA_ARGS: "--verbose"
Error during serverless deploy
Installing requirements from "/root/.cache/serverless-python-requirements/1f8875b144ca0ef6448bc54adcda2143dac724167f52c31feeb3279ccc4a6bc1_x86_64_slspyc/requirements.txt"
Docker Image: lambci/lambda:build-python3.8
Using download cache directory /root/.cache/serverless-python-requirements/downloadCacheslspyc
Running docker run --rm -v /root/.cache/serverless-python-requirements/1f8875b144ca0ef6448bc54adcda2143dac724167f52c31feeb3279ccc4a6bc1_x86_64_slspyc\:/var/task\:z -v /root/.cache/serverless-python-requirements/downloadCacheslspyc\:/var/useDownloadCache\:z lambci/lambda\:build-python3.8 /bin/sh -c 'chown -R 0\\:0 /var/useDownloadCache && python3 -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 0\\:0 /var/task && chown -R 0\\:0 /var/useDownloadCache && find /var/task -name \\*.so -exec strip \\{\\} \\;'...
Stdout:
Stderr: docker: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories.
See 'docker run --help'.
Environment: linux, node 16.17.0, framework 3.22.0 (local) 3.22.0v (global), plugin 6.2.2, SDK 4.3.2


Credentials: Local, environment variables

Docs: docs.serverless.com

Support: forum.serverless.com

Bugs: github.com/serverless/serverless/issues


Error:

Error: `docker run --rm -v /root/.cache/serverless-python-requirements/1f8875b144ca0ef6448bc54adcda2143dac724167f52c31feeb3279ccc4a6bc1_x86_64_slspyc:/var/task:z -v /root/.cache/serverless-python-requirements/downloadCacheslspyc:/var/useDownloadCache:z lambci/lambda:build-python3.8 /bin/sh -c chown -R 0\:0 /var/useDownloadCache && python3 -m pip install -t /var/task/ -r /var/task/requirements.txt --cache-dir /var/useDownloadCache && chown -R 0\:0 /var/task && chown -R 0\:0 /var/useDownloadCache && find /var/task -name \*.so -exec strip \{\} \;` Exited with code 125

at ChildProcess.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/child-process-ext/spawn.js:38:8)

at ChildProcess.emit (node:events:513:28)

at ChildProcess.emit (node:domain:489:12)

at maybeClose (node:internal/child_process:1093:16)

at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

serverless.yml

custom:

pythonRequirements:

pythonBin: python3

dockerizePip: true

slim: true

useDownloadCache: true

useStaticCache: true

Any help would be very much appreciated. It loks like its because of useDownloadCache or this could be it - $BITBUCKET_CLONE_DIR and its subdirectories.

 

 

2 answers

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 16, 2022

@Aakash Shah hi. Could your share also your pre-execution script?

 

Regards, Igor

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 11, 2022

Hey @Aakash Shah 

Welcome to the community.

I believe the error is related to the execution permission of the script. As mentioned in the documentation here if you pass a hook script, the script should have at least read and execution permission. 

I would suggest changing the script permission with the following step:

  - chmod 005 my-script.sh
  - pipe: atlassian/serverless-deploy:1.2.0
    variables:
      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
      PRE_EXECUTION_SCRIPT: '.my-script.sh'

Cheers,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events