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
@Adewale Abdulhammed 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 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 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.
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:
- npm install
- npm i -g bower
- bower install --allow-root
- npm i -g gulp-cli
- gulp build
- dist/** # this will make sure the dist/ folder is available to the next steps
@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.
Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...
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