Add gitlab-runner helpers/template
This commit is contained in:
parent
787a678a79
commit
0fc31dfa56
5 changed files with 89 additions and 1 deletions
14
bin/gitlab-runner-helper.sh
Executable file
14
bin/gitlab-runner-helper.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
echo "Waiting for network to come online..."
|
||||
|
||||
while ! ping -c 1 google.fr ; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
pacman -Sy
|
||||
pacman --noconfirm -S gitlab-runner docker
|
||||
ln -sf /etc/gitlab-runner.toml /etc/gitlab-runner/config.toml
|
||||
systemctl enable gitlab-runner docker
|
||||
systemctl start docker
|
||||
systemctl restart gitlab-runner
|
||||
14
bin/gitlab-runner.sh
Executable file
14
bin/gitlab-runner.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "gitlab-runner.sh CONFIG"
|
||||
echo " where CONFIG is a /etc/gitlab-runner/config.toml file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$1" ]; then
|
||||
echo "WRONG CONFIG FILE: "$1""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkvm.sh -k --copy "$1" /etc/gitlab-runner.toml --copy /usr/sbin/gitlab-runner-helper.sh /usr/sbin/gitlab-runner-helper.sh gitlab-runner /usr/sbin/gitlab-runner-helper.sh
|
||||
Loading…
Reference in a new issue