Skip to content

Instantly share code, notes, and snippets.

@umutdz
Last active December 27, 2022 15:08
Show Gist options
  • Save umutdz/09c03b954895ae5df8120a0bff84434d to your computer and use it in GitHub Desktop.
Save umutdz/09c03b954895ae5df8120a0bff84434d to your computer and use it in GitHub Desktop.
options:
docker: true
definitions:
services:
docker:
memory: 3072
pipelines:
custom:
deploy-to-staging:
- variables:
- name: version
default: patch
allowed-values: # optionally restrict variable values
- patch
- minor
- major
- step:
script:
- bash ./hooks/version.sh $version $BITBUCKET_BUILD_NUMBER
- step:
name: Deploy to staging
image: google/cloud-sdk:alpine
clone:
enabled: false
deployment: staging
script:
- # deployment process
deploy-to-production:
- variables:
- name: version
default: patch
allowed-values: # optionally restrict variable values
- patch
- minor
- major
- step:
script:
- bash ./hooks/version.sh $version $BITBUCKET_BUILD_NUMBER
- step:
name: Deploy to production
image: google/cloud-sdk:alpine
clone:
enabled: false
deployment: production
script:
- # deployment process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment