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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Passing Variable to next step.

I am trying to setup a s3 upload I have an artifact I have a script to get the version from the file (1.2.3). Is there a way for me to pass that to the next step> I am setting the variable $current_ver


image: atlassian/default-image:latest
- step:
Name: Install Prerequisite and Build server
- sbt
- ivy2
- maven
- echo "Download and install Play2"
- wget -O
- unzip ./
- export PATH=$PATH:~/play-2.1.0
- printenv
- ./activator clean compile dist
- cp target/universal/server*.zip ./
- ver=$(find target/universal/ -name 'server-*.zip'|awk -F"-" '{ print $2 }')
- current_ver=${ver::-4}
- target/universal/server-$

- step:
name: Upload dist file to s3
- pipe: atlassian/aws-code-deploy:0.2.10
COMMAND: 'upload'
ZIP_FILE: server-$
S3_BUCKET: 'compant-bucket-artifacts'


1 answer

@Travis Stevens I see two options here:

  1. Move the pipe into the step where you set the variable. Have not tested it but it might directly work (if not try with `- export current_ver=${ver::-4}` instead of `- current_ver=${ver::-4}`.
  2. Persist the variables value into a file and make it an artifact. Then read it back in in the step where you need it.

Suggest an answer

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

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,328 views 0 3
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