Deploy tagged version to production

deployment

#1

Hi,

I’m tagging my development branch with a tag v0.0.1 and CI still deploys to staging.

Here’s my setup:

deployment:
  staging:
    branch: develop
    commands:
      - do smth to deploy to staging
  production:
    tag: /v[0-9]+(\.[0-9]+)*/
    commands:
      - do smth to deploy to production

So I tag my develop branch with a tag v0.0.0 and CI still deploys it to staging? Any ideas?


#2

I’m pretty sure it’s order based. Try changing it to:

deployment:
  production:
    tag: /v[0-9]+(\.[0-9]+)*/
    commands:
      - do smth to deploy to production
  staging:
    branch: develop
    commands:
      - do smth to deploy to staging

and see if that works.

Also, this completely my own opinion, but I wouldn’t be deploying production tags if the tags are based off a develop branch.


#3