-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathrun_gitlab_local.sh
More file actions
executable file
·23 lines (19 loc) · 963 Bytes
/
run_gitlab_local.sh
File metadata and controls
executable file
·23 lines (19 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
echo "Run a gitlab build step on the local machine"
if [[ $(type gitlab-runner) -eq 1 ]]; then
echo "The cmd gilab-runner looks not available, do you want to install it ?"
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
sudo chmod +x /usr/local/bin/gitlab-runner
fi
gitlab-runner exec docker \
--cache-type s3 \
--cache-s3-server-address s3.amazonaws.com \
--cache-s3-bucket-name ci-runner-cache-eu1 \
--cache-s3-bucket-location eu-west-1 \
--cache-s3-access-key $AWS_ACCESS_KEY \
--cache-s3-secret-key $AWS_SECRET_KEY \
--docker-volumes /var/run/docker.sock:/var/run/docker.sock \
--env GITLAB_PACKAGE_REGISTRY_PYPI_SIMPLE_URL=gitlab.com/api/v4/projects/71271774/packages/pypi/simple \
--env GITLAB_PACKAGE_REGISTRY_USER=$GITLAB_PACKAGE_REGISTRY_USER \
--env GITLAB_PACKAGE_REGISTRY_TOKEN=$GITLAB_PACKAGE_REGISTRY_TOKEN \
"$@"