while am doing auto deploying code from bit bucket to heroku, I got some configuration issue in bitbucket-pipelines.yml.
HEROKU_API_KEY: 'XXXXXX'
HEROKU_APP_NAME: 'XXXX'
ZIP_FILE: 'your-app-sources.tar.gz'
WAIT: 'true'
Above is the configuration for Heroku.
But while deploying it gives me an error near "ZIP_FILE":'..'
like that mentioned file/folder not found.
My question is which value i have to place for "ZIP_FILE":'XXXX'.
Please help me to go forward.
Note: am doing auto deployment from bitbucket to heroku for any push done on master b
@Alexander Zhukov please ho can I set my ZIP_FILE correctly, I'm deploying django through bitbucket.
I don't understand how the ZIP_FILE works.
Your urgent answer will be appreciated
@Ahmed Adewale you have to create a tgz file containing your django application source code like this
- step:
name: Create artifact
script:
- tar czfv application.tgz django-app-folder/
artifacts:
- application.tgz
- step:
name: Deploy to production
deployment: production
script:
- pipe: atlassian/heroku-deploy:0.1.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: "application.tgz"
Just replace the django-app-folder with the path to a directory with your source files. Then you should be able to pass the name of the tgz file as a ZIP_FILE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @srinu ch . The value of the ZIP_FILE variable should be a path to the tar.gz file containing a valid Heroku application sources. Here is an example how to package and deploy a simple Java Spring Boot application: Deploy to Heroku.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your information.
But application is Angular JS. while building my application we created dist folder with minified code.
Then how i can give that source file path.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to create a tar.gz from your dist folder and use the path to this tar.gz a ZIP_FILE:
- step:
name: Create artifact
script:
- tar czfv application.tgz dist/
artifacts:
- application.tgz
- step:
name: Deploy to production
deployment: production
script:
- pipe: atlassian/heroku-deploy:0.1.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE: "application.tgz"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi I got above error, while running Create artifact step.
Could you please help me on this. Where is my dist folder created and which path i have to mentioned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should remove the leading slash from the /dist, otherwise tar will try to look up the dist folder relative to the root directory. You should use either dist or dist/ (with a trailing stash) to specify the directory relative to the build directory. Note, that the build directory is not a root directory inside the pipe container.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is weird. What is the path to the dist folder? And how do you create that dist folder with the minified code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is my build success reportafter completed gulp build , it creates dist folder with minified code, But i don't know the exact path .So could you please help me , where it was created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I see what's going on. Since you're building your app in a separate step, you should also expose you dist folder as an artifact so the next step can access this folder to create a tar.gz file:
-step:
caches:
-node
script:
- npm install
- npm i -g bower
- bower install --allow-root
- npm i -g gulp-cli
- gulp build
artifacts:
- dist/** # this will make sure the dist/ folder is available to the next steps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now dist folder recognized, but while pushing source code from bit bucket to heroku, the deployment is going to fail.Could you please help on this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@srinu ch as logs from Heroku inform, it can't detect the buildpack automatically. Mostly likely, you should run the pipe after you set the buildpack for an application. Try moving the heroku create --buildpack and heroku buildpacks:set commands up in the script so they are executed first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.