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
This commit is contained in:
makefu 2020-08-12 23:10:48 +02:00
parent 84da9293b0
commit a7f67a851b
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225
2 changed files with 14 additions and 0 deletions

View File

@ -14,6 +14,8 @@ before_script:
- which gpg2 - which gpg2
- echo "$secrets_gpg_key" | gpg --import - echo "$secrets_gpg_key" | gpg --import
deployment test: deployment test:
tags:
- nix
stage: test stage: test
script: script:
- GIT_SSH_COMMAND="ssh -i ~/.ssh/gitlab_deploy.key" git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain - 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-build krebs/krops.nix --no-out-link --argstr name puyak --argstr target /tmp -A test)
nix-shell test: nix-shell test:
stage: test stage: test
tags:
- nix
script: script:
- nix-shell --pure --command 'true' -p stdenv && echo success - nix-shell --pure --command 'true' -p stdenv && echo success
- nix-shell --pure --command 'false' -p stdenv || echo success - nix-shell --pure --command 'false' -p stdenv || echo success
@ -31,6 +35,9 @@ nix-shell test:
- gpg --version - gpg --version
- curl --version - curl --version
wolf deployment: wolf deployment:
tags:
- shacklan
- nix
stage: deploy stage: deploy
script: script:
- cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa - cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa
@ -46,6 +53,9 @@ wolf deployment:
- .gitmodules - .gitmodules
puyak deployment: puyak deployment:
stage: deploy stage: deploy
tags:
- shacklan
- nix
script: script:
- cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa - cp ~/.ssh/gitlab_deploy.key ~/.ssh/id_rsa
- git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain - git clone git@ssh.git.shackspace.de:rz/secrets.git ~/brain
@ -60,6 +70,8 @@ puyak deployment:
- .gitmodules - .gitmodules
nur-packages makefu: nur-packages makefu:
stage: deploy stage: deploy
tags:
- nix
script: script:
- git reset --hard origin/master - git reset --hard origin/master
- git filter-branch -f --prune-empty --subdirectory-filter makefu/5pkgs HEAD - git filter-branch -f --prune-empty --subdirectory-filter makefu/5pkgs HEAD

View File

@ -14,6 +14,8 @@ in
## registrationConfigurationFile contains: ## registrationConfigurationFile contains:
# CI_SERVER_URL=<CI server URL> # CI_SERVER_URL=<CI server URL>
# REGISTRATION_TOKEN=<registration secret> # REGISTRATION_TOKEN=<registration secret>
# RUNNER_TAG_LIST=nix,shacklan
# RUNNER_NAME=stockholm-runner-$name
registrationConfigFile = <secrets/shackspace-gitlab-ci>; registrationConfigFile = <secrets/shackspace-gitlab-ci>;
#gracefulTermination = true; #gracefulTermination = true;
}; };