Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
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

application.tgz is not uploaded to heroku (using atlassian/heroku-deploy:1.2.1)

artifact is created and listed on previous step, I can download it to my local machine.
On next step "pipe atlassian/heroku-deploy:1.2.1"
I get the follwoing error:
  

Traceback (most recent call last):
File "/usr/bin/main.py", line 154, in <module>
File "/usr/bin/main.py", line 74, in run
with open(zip_file, 'rb') as zipfile:
FileNotFoundError: [Errno 2] No such file or directory: 'application.tgz'

Also 'application.tgz' is not listed under 'Artifacts' tab  in my 'Deploy to production' step.
Link to my repository https://bitbucket.org/vihv/stiltsofttestyo (private, but I expect techsupport have access)


Here is my bitbucket-piplines.yml
============================

image: maven:3.6.3

pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml
after-script:
- pipe: atlassian/checkstyle-report:0.2.0
- step:
name: Security Scan
script:
- pipe: atlassian/git-secrets-scan:0.4.3
- step:
name: Create artifact
script:
- tar czfv application.tgz pom.xml src/
artifacts:
- application.tgz
- step:
name: Deploy to production
deployment: production
script:
- pipe: atlassian/heroku-deploy:1.2.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: 'application.tgz'
DEBUG: 'true'

 

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Sep 27, 2021

Hi Yuriy and welcome to the community!

I believe the culprit here may be that the step that generates the artifact and the step that does the deployment belong in the same parallel set. Parallel steps can only use artifacts produced by previous steps, not by steps in the same parallel set.

What you can do is move the last step out of the parallel set, by changing the indentation two spaces back for that step, as follows:

image: maven:3.6.3

pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml
after-script:
- pipe: atlassian/checkstyle-report:0.2.0
- step:
name: Security Scan
script:
- pipe: atlassian/git-secrets-scan:0.4.3
- step:
name: Create artifact
script:
- tar czfv application.tgz pom.xml src/
artifacts:
- application.tgz
- step:
name: Deploy to production
deployment: production
script:
- pipe: atlassian/heroku-deploy:1.2.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: 'application.tgz'
DEBUG: 'true'

This way, only the first 3 steps are in the same parallel set, and the artifact will be available for the last step.

Please feel free to let me know if this helps and if you have any questions.

Kind regards,
Theodora

Thank you Theodora. This was very helpful for me.

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 06, 2021

You are very welcome Alexander, I'm glad that this was helpful!

Like Getachew Tebkew likes this

saved my life too

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 28, 2022

That's good to hear @Getachew Tebkew!

Like Getachew Tebkew likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events