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,300,801
Community Members
 
Community Events
165
Community Groups

Heroku build unable to extract zip file

image: node:16.14.0

clone:
depth: full

pipelines:
default:
- step:
name: Lint and build webapp
script:
- cd webapp/
- yarn install
- yarn lint
- yarn build
caches:
- node
- nodeweb
- step:
name: Lint and build serverapp
script:
- cd serverapp/
- yarn install
- yarn lint
- yarn build:dev
caches:
- node
- nodeserver
- step:
name: Test webapp
script:
- cd webapp/
- yarn test
caches:
- node
- nodeweb
- step:
name: Test serverapp
script:
- yarn db:reset
- cd serverapp/
- yarn test:e2e
caches:
- node
- nodeserver
branches:
main:
- step:
name: Deploy front-end
script:
- cd webapp/
- yarn install
- yarn build
- pipe: atlassian/firebase-deploy:0.2.1
variables:
FIREBASE_TOKEN: $FIREBASE_TOKEN
PROJECT_ID: apcviewer
- step:
name: Deploy back-end
script:
- git branch
- git archive -o ./apcviewer.zip main serverapp
- pipe: atlassian/heroku-deploy:2.0.0
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: apc-viewer
ZIP_FILE: apcviewer.zip

definitions:
caches:
nodeweb: webapp/node_modules
nodeserver: serverapp/node_modules

2 answers

@Manuel Aguirre  Hi.
Try to split  `step name: Deploy back-end` onto two steps.

step:

name: Build

script:

- your logic to create zip file apcviewer.zip
- verify that file created with ls command

artifacts:

- apcviewer.zip


step:

name: Deploy to heroku

script:

- pipe: atlassian/heroku-deploy:2.0.0

variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: apc-viewer
ZIP_FILE: apcviewer.zip


Cheers

0 votes

The code block formatter is not working, and it messes with my indents, assume they're ok and validated with the pipelines file validator

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,263 views 2 9
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