summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-08-12 23:10:48 +0200
committermakefu <github@syntax-fehler.de>2020-08-12 23:10:48 +0200
commita7f67a851b9cc2988169b96b06a9befc89de4c1c (patch)
treeeacc2b4ad0d47ac79084fcb188320e245b4b179b
parent84da9293b05160f3a55b598de16e88b26c82520c (diff)
gitlab-ci: run only on tags
we have some rogue non-nix runners going around on gitlab-ci therefore we now tag the runners shacklan - inside the shack lan nix - has nix installed
-rw-r--r--.gitlab-ci.yml12
-rw-r--r--krebs/2configs/shack/gitlab-runner.nix2
2 files changed, 14 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cf8f6e8f4..76a304af8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,6 +14,8 @@ before_script:
- which gpg2
- echo "$secrets_gpg_key" | gpg --import
deployment test:
+ tags:
+ - nix
stage: test
script:
- GIT_SSH_COMMAND="ssh -i ~/.ssh/gitlab_deploy.key" git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain
@@ -23,6 +25,8 @@ deployment test:
- $(nix-build krebs/krops.nix --no-out-link --argstr name puyak --argstr target /tmp -A test)
nix-shell test:
stage: test
+ tags:
+ - nix
script:
- nix-shell --pure --command 'true' -p stdenv && echo success
- nix-shell --pure --command 'false' -p stdenv || echo success
@@ -31,6 +35,9 @@ nix-shell test:
- gpg --version
- curl --version
wolf deployment:
+ tags:
+ - shacklan
+ - nix
stage: deploy
script:
- cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa
@@ -46,6 +53,9 @@ wolf deployment:
- .gitmodules
puyak deployment:
stage: deploy
+ tags:
+ - shacklan
+ - nix
script:
- cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa
- git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain
@@ -60,6 +70,8 @@ puyak deployment:
- .gitmodules
nur-packages makefu:
stage: deploy
+ tags:
+ - nix
script:
- git reset --hard origin/master
- git filter-branch -f --prune-empty --subdirectory-filter makefu/5pkgs HEAD
diff --git a/krebs/2configs/shack/gitlab-runner.nix b/krebs/2configs/shack/gitlab-runner.nix
index 5f2ca02d9..bd391851a 100644
--- a/krebs/2configs/shack/gitlab-runner.nix
+++ b/krebs/2configs/shack/gitlab-runner.nix
@@ -14,6 +14,8 @@ in
## registrationConfigurationFile contains:
# CI_SERVER_URL=<CI server URL>
# REGISTRATION_TOKEN=<registration secret>
+ # RUNNER_TAG_LIST=nix,shacklan
+ # RUNNER_NAME=stockholm-runner-$name
registrationConfigFile = <secrets/shackspace-gitlab-ci>;
#gracefulTermination = true;
};