This content originally appeared on DEV Community and was authored by Alan Schio
It is easy to find integrations for Github or GitLab, but i spent a couple of minutes trying to make it work, so why no sharing?
Create Fly Token
First go to your Fly.io App and create a Deploy Token (https://fly.io/apps/your-app/tokens
)
Let the Expiration
if you want it to never expires
Add a Repository Variable
Now go to your bitbucket repository settings, under Pipeline side menu, at Repository Variables (https://bitbucket.org/YOURORG/YOURPROJECT/YOURREPO/pipelines/repository-variables
).
And create a new variable with the name FLY_API_TOKEN
.
Create the pipeline file
Now create your bitbucket-pipelines.yml
file and use the golang
image so you can install the flyctl
and deploy your app.
image: golang:1.15
pipelines:
default:
- step:
name: Deploy to Fly.io
deployment: production
script:
- apt-get update -qq && apt-get install -y curl
- curl -L https://fly.io/install.sh | sh
- export FLYCTL_INSTALL="/root/.fly"
- export PATH="$FLYCTL_INSTALL/bin:$PATH"
- flyctl deploy
This content originally appeared on DEV Community and was authored by Alan Schio
Alan Schio | Sciencx (2024-08-28T00:25:48+00:00) Deploy to Fly.io with bitbucket-pipelines. Retrieved from https://www.scien.cx/2024/08/28/deploy-to-fly-io-with-bitbucket-pipelines/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.