prepare for multi-CI

split things out so more can be shared between CIs
This commit is contained in:
zimbatm 2019-02-06 11:56:31 +01:00
parent 7a8122c5f4
commit 6b517528ee
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
7 changed files with 53 additions and 45 deletions

View file

@ -2,31 +2,17 @@ image: nixos/nix:latest
stages:
- build
- publish
before_script:
- nix-shell --run .gitlab/docker-login
nixos-unstable:
extends: .build
stage: build
script: nix-shell --run ./.gitlab-ci.sh
variables:
NIXPKGS_CHANNEL: nixos-unstable
NIX_PATH: nixpkgs=channel:nixos-unstable
IMAGE_TAG: latest
nixos-18.09:
extends: .build
variables:
NIXPKGS_CHANNEL: nixos-18.09
IMAGE_TAG: nixos-18.09
# ---- templates ---
.build:
stage: build
script:
- nix-shell --run ./build
- nix-shell --run .gitlab/push-master
script: nix-shell --run ./.gitlab-ci.sh
variables:
NIX_PATH: "nixpkgs=channel:${NIXPKGS_CHANNEL}"
REGISTRY_URL: "${CI_REGISTRY_IMAGE}"
NIX_PATH: nixpkgs=channel:nixos-18.09
IMAGE_TAG: nixos-18.09