silikonlasvegas.blogg.se

Teamcity build branch
Teamcity build branch








You will need to add the following environment variables as build parameters or by exporting them inside your Simple Command Runner. We would love some advice on improving this setup. You could do this via the GitLab API potentially. However, you will need to find a way to add the environment vars: `GITLAB_REPO_SLUG`, `GITLAB_PULL_REQUEST_ID` and `GITLAB_REPO_URL`. The alternative is to pass in the token as a prefix to the command `DANGER_GITLAB_API_TOKEN=“123” bundle exec danger`. Or if you are using the pull request feature you can set an environment parameter called `GITHUB_PULL_REQUEST_ID` to the value of: `%`Īs this is self-hosted, you will need to add the `DANGER_GITLAB_API_TOKEN` to your build user's ENV. “`sh branch=“%%” export GITHUB_PULL_REQUEST_ID=($) “`

teamcity build branch

You can slice the Pull Request ID out by doing the following: You can manually add `GITHUB_REPO_SLUG` and `GITHUB_REPO_URL` as build parameters or by exporting them inside your Simple Command Runner.Īs for `GITHUB_PULL_REQUEST_ID`, TeamCity provides the `%%` variable which is in the format `PR_NUMBER/merge`.

teamcity build branch

However, you will need to find a way to add the environment vars: `GITHUB_REPO_SLUG`, `GITHUB_PULL_REQUEST_ID` and `GITHUB_REPO_URL`. The alternative is to pass in the token as a prefix to the command `DANGER_GITHUB_API_TOKEN=“123” bundle exec danger`. You want to be able to run the command `bundle exec danger`, so the “Simple Command Runner” should be all you need to do that.Īs this is self-hosted, you will need to add the `DANGER_GITHUB_API_TOKEN` to your build user's ENV. Then depending on the type of your build settings, you may need to add a new build step for Danger.










Teamcity build branch