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,552,516
Community Members
 
Community Events
184
Community Groups

When sourcing an atifact I'm getting "bash: bg: no job control"

Edited

I have a pipeline which does the following:


- step:
name: 'Set environment variables'
deployment: Production
script:
- export PROJECT_ENVIRONMENT="production"
- export PROJECT_NAME="payment-service-api"
- export IMAGE="${AWS_ECR_URL}/${AWS_ECR_REPOSITORY}"
- export TAG="${PROJECT_NAME}-${PROJECT_ENVIRONMENT}-${BITBUCKET_BUILD_NUMBER}"
- printenv | xargs echo export > .envs
artifacts:
- .envs
- step:
name: "Build and Push API to ECR"
services:
- docker
script:
- export INSTANCE_NAME="API"
- source .envs
and fails in the last step with the message:
+ source .envs
bash: bg: no job control

What is really strange is that the same pipe for a different branch runs fine. I would sincerely appreciate any help as I'm out of ideas.
Chris

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 10, 2022

Hey Christian,

Welcome to the Bitbucket Cloud community!

I notice that you are calling the .envs file using the source command, this means that the .envs file is executed by bash.

You may need to add the following line at the beginning of the .envs file to prevent this error message:

#! /bin/bash   
set -m

 There is a thread I have located on StackOverflow that explains this a little more:

https://stackoverflow.com/questions/11821378/what-does-bashno-job-control-in-this-shell-mean

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Dear Ben,

Thanks for your reply. I had found this link also.

Seems like some vars, when doing this, don't get sourced to the new bash. I don't know why. I will have to investigate further, probably some issue with the chars not being properly escaped I guess.

I will try further and report back.

Chris

Suggest an answer

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

Atlassian Community Events