Avatart Daniel Meier

Daniel Meier

Peerobyte is a team of extremely enthusiastic specialists with a foothold in the European market via a Tier III Data Center in Frankfurt, Germany.

Peerobyte‘s roots are in server equipment because many of our engineers started their career in hardware infrastructure and its virtualization. That is why our team has expertise in building and developing cloud infrastructure to provide stable and flexible systems for every challenges of our clients.

answers & questions of Daniel Meier

Learn more

How to set different environment variables in a Jenkinsfile depending on the Git branch

I want to use different variables based on the Git branch to avoid using separate Jenkinsfiles for different branches. However, it seems that Groovy syntax doesn’t work within the environment{} directive. I tried something like this without success: How do you avoid creating multiple Jenkinsfiles?
Gravatar — онлайн-сервис, позволяющий пользователям Интернета поддерживать постоянную картинку на большинстве сайтов.

Replied 1 year ago

3 replies

42 votes

How to set different environment variables in a Jenkinsfile depending on the Git branch

I want to use different variables based on the Git branch to avoid using separate Jenkinsfiles for different branches. However, it seems that Groovy syntax doesn’t work within the environment{} directive. I tried something like this without success: How do you avoid creating multiple Jenkinsfiles?
Gravatar — онлайн-сервис, позволяющий пользователям Интернета поддерживать постоянную картинку на большинстве сайтов.

Replied 1 year ago

3 replies

42 votes

Subscribe to our newsletter to get articles and news