ci: add the NIXPKGS_CHANNEL shortcut
This commit is contained in:
parent
9f61ec7d27
commit
7ed6a50917
3 changed files with 11 additions and 11 deletions
|
@ -7,19 +7,17 @@ nixos-unstable:
|
||||||
stage: build
|
stage: build
|
||||||
script: nix-shell --run ./.gitlab-ci.sh
|
script: nix-shell --run ./.gitlab-ci.sh
|
||||||
variables:
|
variables:
|
||||||
NIX_PATH: nixpkgs=channel:nixos-unstable
|
NIXPKGS_CHANNEL: nixos-unstable
|
||||||
IMAGE_TAG: latest
|
IMAGE_TAG: latest
|
||||||
|
|
||||||
nixos-19.03:
|
nixos-19.03:
|
||||||
stage: build
|
stage: build
|
||||||
script: nix-shell --run ./.gitlab-ci.sh
|
script: nix-shell --run ./.gitlab-ci.sh
|
||||||
variables:
|
variables:
|
||||||
NIX_PATH: nixpkgs=channel:nixos-19.03
|
NIXPKGS_CHANNEL: nixos-19.03
|
||||||
IMAGE_TAG: nixos-19.03
|
|
||||||
|
|
||||||
nixos-19.09:
|
nixos-19.09:
|
||||||
stage: build
|
stage: build
|
||||||
script: nix-shell --run ./.gitlab-ci.sh
|
script: nix-shell --run ./.gitlab-ci.sh
|
||||||
variables:
|
variables:
|
||||||
NIX_PATH: nixpkgs=channel:nixos-19.09
|
NIXPKGS_CHANNEL: nixos-19.09
|
||||||
IMAGE_TAG: nixos-19.09
|
|
||||||
|
|
|
@ -7,12 +7,14 @@ set -euo pipefail
|
||||||
./build
|
./build
|
||||||
|
|
||||||
# default to Docker Hub
|
# default to Docker Hub
|
||||||
|
# the user has to set REGISTRY_USER and REGISTRY_PASSWORD
|
||||||
: "${REGISTRY:=docker.io}"
|
: "${REGISTRY:=docker.io}"
|
||||||
: "${IMAGE_PREFIX:=nixpkgs}"
|
: "${IMAGE_PREFIX:=nixpkgs}"
|
||||||
|
|
||||||
# IMAGE_TAG is provided by .travis.yml
|
# either pass those two or set the NIXPKGS_CHANNEL
|
||||||
|
: "${IMAGE_TAG:=$NIXPKGS_CHANNEL}"
|
||||||
# the user has to set REGISTRY_USER and REGISTRY_PASSWORD
|
: "${NIX_PATH:=nixpkgs=channel:$NIXPKGS_CHANNEL}"
|
||||||
|
export NIX_PATH
|
||||||
|
|
||||||
if [[ "$TRAVIS_BRANCH" = master && -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
|
if [[ "$TRAVIS_BRANCH" = master && -z "$TRAVIS_PULL_REQUEST_BRANCH" ]]; then
|
||||||
./docker-login "$REGISTRY_USER" "$REGISTRY_PASSWORD" "$REGISTRY"
|
./docker-login "$REGISTRY_USER" "$REGISTRY_PASSWORD" "$REGISTRY"
|
||||||
|
|
|
@ -5,11 +5,11 @@ nix: 2.2.1
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: nixos-unstable
|
- name: nixos-unstable
|
||||||
env: NIX_PATH=nixpkgs=channel:nixos-unstable IMAGE_TAG=latest
|
env: NIXPKGS_CHANNEL=nixos-unstable IMAGE_TAG=latest
|
||||||
- name: nixos-19.03
|
- name: nixos-19.03
|
||||||
env: NIX_PATH=nixpkgs=channel:nixos-19.03 IMAGE_TAG=nixos-19.03
|
env: NIXPKGS_CHANNEL=nixos-19.03
|
||||||
- name: nixos-19.09
|
- name: nixos-19.09
|
||||||
env: NIX_PATH=nixpkgs=channel:nixos-19.09 IMAGE_TAG=nixos-19.09
|
env: NIXPKGS_CHANNEL=nixos-19.09
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- nix-shell --run ./.travis.sh
|
- nix-shell --run ./.travis.sh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue