aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio Jesus Gallego Arias2019-01-30 16:48:00 +0100
committerEmilio Jesus Gallego Arias2019-01-30 16:48:00 +0100
commitbae97b8d592dd1a5a92236959264c57ef9c57f53 (patch)
treef5346167d930a75a7e11d8862de7eb25a8b4fe12
parent469032d0274812cbf00823f86fc3db3a1204647e (diff)
parent045968c2753471e7ebc0e465184d91db7f991799 (diff)
Merge PR #9440: Create deployment environment for Cachix.
Reviewed-by: SkySkimmer Reviewed-by: ejgallego
-rw-r--r--.gitlab-ci.yml23
1 files changed, 19 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e981c592a2..5382eaffdd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -288,7 +288,7 @@ pkg:opam:
variables:
OPAM_SWITCH: edge
-pkg:nix:
+.nix-template: &nix-template
image: nixorg/nix:latest # Minimal NixOS image which doesn't even contain git
stage: test
variables:
@@ -297,7 +297,6 @@ pkg:nix:
EXTRA_PUBLIC_KEYS: coq.cachix.org-1:Jgt0DwGAUo+wpxCM52k2V+E0hLoOzFPzvg94F65agtI=
# The following variables should not be overridden
GIT_STRATEGY: none
- CACHIX_PUBLIC_KEY: cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=
NIXOS_PUBLIC_KEY: cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
dependencies: [] # We don't need to download build artifacts
@@ -305,8 +304,6 @@ pkg:nix:
script:
# Use current worktree as tmpdir to allow exporting artifacts in case of failure
- export TMPDIR=$PWD
- # Install Cachix as documented at https://github.com/cachix/cachix
- - nix-env -if https://github.com/cachix/cachix/tarball/master --substituters https://cachix.cachix.org --trusted-public-keys "$CACHIX_PUBLIC_KEY"
# We build an expression rather than a direct URL to not be dependent on
# the URL location; we are forced to put the public key of cache.nixos.org
# because there is no --extra-trusted-public-key option.
@@ -317,6 +314,24 @@ pkg:nix:
paths:
- nix-build-coq.drv-0/*/test-suite/logs
+pkg:nix:deploy:
+ <<: *nix-template
+ environment:
+ name: cachix
+ url: https://coq.cachix.org
+ before_script:
+ # Install Cachix as documented at https://github.com/cachix/cachix
+ - nix-env -iA cachix -f https://cachix.org/api/v1/install
+ only:
+ - master
+ - /^v.*\..*$/
+
+pkg:nix:
+ <<: *nix-template
+ except:
+ - master
+ - /^v.*\..*$/
+
doc:refman:
<<: *doc-template
dependencies: