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,557,331
Community Members
 
Community Events
184
Community Groups

Write if, else condition in bamboo yaml file

I have the snippet of code in my bamboo yaml 

- script:
interpreter: /bin/sh
scripts:

- GIT_BRANCH=${bamboo_planRepository_branch}
- BASE_VERSION=$(date +%g.%m)
- BUILD_VERSION="${BASE_VERSION}.${bamboo_buildNumber}"
- echo "$BUILD_VERSION"
- DEPLOY_ARTIFACTS="false"
- TAG_LATEST="false"

if [ "${GIT_BRANCH}" == "master" ]; then
log "Master branch - build main version"

but im getting the below error, can some one help what is the issue in this code

Error Message: home/bamboo/bamboo-agent-home/temp/UTM-UMB3-JOB1-21-ScriptBuildTask-8036891390408417517.sh: 12: /home/bamboo/bamboo-agent-home/temp/UTM-UMB3-JOB1-21-ScriptBuildTask-8036891390408417517.sh: Syntax error: "then" unexpected (expecting "fi")

 

1 answer

1 accepted

0 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 30, 2022

Hello @Nagomi, Welcome to Atlassian Community!

Just add a fi below the "log" line and it will pass.

Regards,

Eduardo Alvarenga
Atlassian Support APAC

Yep. Thanks worked edurado.

 

By the way is it possible to create two plans from a single yaml file

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 30, 2022

Hello @Nagomi

Yes, it is. Please check this thread for more information.

Please don't forget to mark this answer as an Accepted Solution. Marking a reply as a solution will make it easier for others who have a similar issue to find it in the future.

Eduardo Alvarenga
Atlassian Support APAC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events