ci check branch
This commit is contained in:
parent
1a552844da
commit
63863f69c0
2 changed files with 4 additions and 2 deletions
|
@ -7,11 +7,13 @@ CONFIG_PATH=${config_path}
|
|||
JSON="$1"
|
||||
REPO_NAME=$(jq -r .repository.name <<< $JSON)
|
||||
CLONE_URL=$(jq -r .repository.clone_url <<< $JSON)
|
||||
REPO_BRANCH=$(jq -r .ref <<< $JSON | cut -d'/' -f3)
|
||||
SSH_OPTIONS='-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'
|
||||
|
||||
for INTEGRATION in "$(cat $CONFIG_PATH | jq -r '.ci | values[]')"
|
||||
do
|
||||
[[ $(jq -r '.repo' <<< $INTEGRATION) = $REPO_NAME ]] || continue
|
||||
[[ $(jq -r '.repo' <<< $INTEGRATION) = "$REPO_NAME" ]] || continue
|
||||
[[ $(jq -r '.branch' <<< $INTEGRATION) = "$REPO_BRANCH" ]] || continue
|
||||
|
||||
HOSTNAME=$(jq -r '.hostname' <<< $INTEGRATION)
|
||||
DEST_PATH=$(jq -r '.path' <<< $INTEGRATION)
|
||||
|
|
|
@ -7,7 +7,7 @@ defaults = {
|
|||
'lonercrew': {
|
||||
'path': '/opt/lonercrew',
|
||||
'group': 'www-data',
|
||||
'rev': 'master',
|
||||
'branch': 'master',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue