We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cf9b7f commit c53ea46Copy full SHA for c53ea46
jobs/hook_container.yml
@@ -30,7 +30,7 @@
30
# Alternatively, we can obtain the branch in detached-head state using the
31
# environment variable GIT_BRANCH if it is set. This helps out Jenkins.
32
- name: Obtain current branch of this repository.
33
- shell: if [ -z "$GIT_BRANCH" ]; then git symbolic-ref HEAD | grep -o [^/]*$; else echo "$GIT_BRANCH"; fi
+ shell: if [ -z "$GIT_BRANCH" ]; then git symbolic-ref HEAD | grep -o [^/]*$; else echo "$GIT_BRANCH" | grep -o [^/][a-zA-Z0-9-]*$; fi
34
args:
35
chdir: "{{ container_dir }}"
36
executable: /bin/bash
0 commit comments