Ask Your Question

How can cucumber tags be passed in Gitlab CI?

asked 2022-11-19 11:00:00 +0000

pufferfish gravatar image

updated 2023-04-07 21:50:39 +0000

qstack gravatar image

How can cucumber tags be passed in Gitlab CI?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-11-19 11:20:00 +0000

woof gravatar image

To pass cucumber tags in GitLab CI, you can add the following script in your .gitlab-ci.yml file:

    - bundle exec cucumber --tags "your_cucumber_tags"

Replace "your_cucumber_tags" with the tags you want to use to run your cucumber tests.

You can also use environment variables to pass cucumber tags dynamically:

    - bundle exec cucumber --tags "$CI_COMMIT_TAG"

In the above example, the $CI_COMMIT_TAG variable is used to pass the cucumber tags dynamically based on the current Git commit tag.

Note: Make sure to update the script section according to your project setup.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools


Asked: 2022-11-19 11:00:00 +0000

Seen: 20 times

Last updated: Nov 19 '22