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

Heroku build unable to extract zip file

Deleted user June 3, 2022
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

0 votes
lissyaka June 10, 2022

@[deleted]  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
Deleted user June 3, 2022

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
AUG Leaders

Atlassian Community Events