Skip to content

Commit 6a5b479

Browse files
add CF_BRANCH variable
1 parent 6f3ba97 commit 6a5b479

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
* A secret with name `CF_API_KEY` and value your Codefresh API token ( https://codefresh.io/docs/docs/integrations/codefresh-api/#authentication-instructions )
5757
* An environment variable called `PIPELINE_NAME` with a value of `<project_name>/<pipeline_name>`
5858
* An optional environment variable called `TRIGGER_NAME` with trigger name attached to this pipeline. See the [triggers section](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/triggers/) for more information
59+
* An optional environment variable called `CF_BRANCH` with branch name .
5960

6061
Click the Done button to save your changes and commit.
6162

runner-entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ fi
1616
codefresh auth create-context context --api-key $CF_API_KEY
1717
codefresh auth use-contex context
1818

19+
if [ -n "$CF_BRANCH" ]
20+
then
21+
BRANCH=$CF_BRANCH
22+
fi
23+
24+
echo "Execute pipeline with branch $BRANCH"
1925

2026
if [ -n "$TRIGGER_NAME" ]
2127
then

0 commit comments

Comments
 (0)