blob: 298fd3c4786bc7103dcd5c3c6c4165a3f442b648 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env bash
set -e
COMMAND="$1"
# this is hack to workaround a issue where vyos didn't create sagitta branch
# like the case of vyos-xe-guest-utilities, thus we need to build current
# branch and then redirect from here to sagitta repository
if [ ! -L ~/VyOS/current ]; then
rm -rf ~/VyOS/current
mkdir -p ~/VyOS/sagitta
ln -s ~/VyOS/sagitta ~/VyOS/current
fi
if [[ "$COMMAND" == *"repositories/current"* ]]; then
COMMAND=${COMMAND//current/sagitta}
fi
if [[ "$COMMAND" == *"vyos-xe-guest-utilities"* ]] && [[ "$COMMAND" == *"current"* ]]; then
COMMAND=${COMMAND//current/sagitta}
fi
/var/lib/jenkins/uncron/src/uncron-add "$COMMAND"
|