Skip to content

Commit

Permalink
Merge pull request #81 from QuickCorp/v2.3
Browse files Browse the repository at this point in the history
gitlab-runner-installer.sh
  • Loading branch information
jeanmachuca committed Aug 2, 2021
2 parents 3acf647 + 3772804 commit 408015c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions bin/install/ubuntu18/gitlab-runner-installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
REGISTRATION_TOKEN=$1

# Download the binary for your system
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64

# Give it permissions to execute
sudo chmod +x /usr/local/bin/gitlab-runner

# Create a GitLab CI user
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

# Install and run as service
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start

sudo apt install -y docker.io

sudo gitlab-runner register -n \
--url https://gitlab.com/ \
--registration-token $REGISTRATION_TOKEN \
--executor shell \
--description "QCObjects Runner"

sudo usermod -a -G sudo gitlab-runner
sudo usermod -aG docker gitlab-runner
sudo gitlab-runner restart

0 comments on commit 408015c

Please sign in to comment.