Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does when: tag: require* works? #125

Closed
iamsudip opened this issue Jul 15, 2020 · 2 comments
Closed

Does when: tag: require* works? #125

iamsudip opened this issue Jul 15, 2020 · 2 comments
Labels
pipeline-config related to pipeline config files (.yaml)

Comments

@iamsudip
Copy link

My steps are still getting executed even if the tag doesn't starts with require

Trigger is only on git tag events.

My config:

---
pipeline:
  propensity-base-build:
    image: plugins/ecr
    repo: image-repo
    context: ./
    dockerfile: ./commons/Dockerfile.base
    tags:
      - propensity-base
    when:
      tag: require*
  propensity-build:
    image: plugins/ecr
    repo: image-repo
    context: ./
    dockerfile: ./commons/Dockerfile
    tags:
      - ${DRONE_COMMIT_SHA:0:8}
      - propensity-${DRONE_TAG}
      - latest
@laszlocph
Copy link
Member

Not as documented. I will update the docs, meanwhile you can try matching on the ref

pipeline:
  step1:
    when:
      event: push
      ref: [ refs/heads/feature/*, refs/tags/* ]
      event: [ push, tag ]

as per

https://discourse.drone.io/t/execute-a-build-step-only-when-a-feature-branch-is-tagged-with-a-specific-pattern/1237/3

@anbraten anbraten added pipeline-config related to pipeline config files (.yaml) question labels Sep 19, 2021
@anbraten
Copy link
Member

This should be solved in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipeline-config related to pipeline config files (.yaml)
Projects
None yet
Development

No branches or pull requests

3 participants