chore(gitlab-ci): ...

This commit is contained in:
Gregor Kleen 2021-09-15 11:29:00 +02:00
parent 6950b533f4
commit e1e5693a2a
2 changed files with 17 additions and 23 deletions

View File

@ -19,12 +19,10 @@ stages:
node dependencies:
stage: frontend:build
script:
- nix -L build -o node-dependencies .#uniworxNodeDependencies
- nix-store --export $(nix-store -qR node-dependencies) > node-dependencies.nar
before_script: &nix
- install -m 0644 .gitlab-ci/nix-bootstrap.conf /etc/nix/nix.conf
- nix-env -f '<nixpkgs>' -riA envsubst
- envsubst -i .gitlab-ci/nix.conf -o /etc/nix/nix.conf
- nix -L build -o result .#uniworxNodeDependencies
- nix-store --export $(nix-store -qR result) > node-dependencies.nar
before_script: &nix-before
- install -m 0644 .gitlab-ci/nix.conf /etc/nix/nix.conf
- git config --global init.defaultBranch master
- install -v -m 0700 -d ~/.ssh
- install -v -T -m 0644 "${SSH_KNOWN_HOSTS}" ~/.ssh/known_hosts
@ -42,9 +40,9 @@ well known:
stage: frontend:build
script:
- nix-store --import <node-dependencies.nar
- nix -L build -o well-known .#uniworxWellKnown
- nix-store --export $(nix-store -qR well-known) > well-known.nar
before_script: *nix
- nix -L build -o result .#uniworxWellKnown
- nix-store --export $(nix-store -qR result) > well-known.nar
before_script: *nix-before
needs:
- job: node dependencies
artifacts: true
@ -61,9 +59,9 @@ frontend:
script:
- nix-store --import <node-dependencies.nar
- nix-store --import <well-known.nar
- nix -L build -o frontend .#uniworxFrontend
- nix-store --export $(nix-store -qR frontend) > frontend.nar
before_script: *nix
- nix -L build -o result .#uniworxFrontend
- nix-store --export $(nix-store -qR result) > frontend.nar
before_script: *nix-before
needs:
- job: node dependencies
artifacts: true
@ -81,9 +79,9 @@ backend:
stage: backend:build
script:
- nix-store --import <frontend.nar
- nix -L build -o backend .#uniworxBackend
- cp -pr --reflink=auto result/bin .
before_script: *nix
- nix -L build -o result .#uniworxBackend
- cp -pr --reflink=auto -L result/bin .
before_script: *nix-before
needs:
- job: frontend
artifacts: true
@ -99,9 +97,9 @@ demo docker:
stage: docker:build
script:
- nix-store --import <backend.nar
- nix -L build -o backend .#uniworxDemoDocker
- nix -L build -o result .#uniworxDemoDocker
- cp -pr --reflink=auto -L result uniworx-demo.tar.gz
before_script: *nix
before_script: *nix-before
needs:
- job: backend
artifacts: true
@ -117,9 +115,9 @@ docker:
stage: docker:build
script:
- nix-store --import <backend.nar
- nix -L build -o backend .#uniworxDocker
- nix -L build -o result .#uniworxDocker
- cp -pr --reflink=auto -L result uniworx.tar.gz
before_script: *nix
before_script: *nix-before
needs:
- job: backend
artifacts: true

View File

@ -1,4 +0,0 @@
sandbox = true
substituters = https://hydra.iohk.io https://cache.nixos.org/
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
require-sigs = true