fradrive/.gitlab-ci.yml
2021-09-14 12:51:32 +02:00

37 lines
1.1 KiB
YAML

workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
when: always
- when: never
default:
image:
name: nixpkgs/nix-flakes:nixos-21.05
variables:
NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz"
stages:
- setup
node dependencies:
stage: setup
script:
- nix -L build -o node-dependencies .#uniworxNodeDependencies
before_script:
- 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
- git config --global init.defaultBranch master
- install -v -m 0700 -d ~/.ssh
- install -v -T -m 0644 "${SSH_KNOWN_HOSTS}" ~/.ssh/known_hosts
- install -v -T -m 0400 "${SSH_DEPLOY_KEY}" ~/.ssh/deploy && echo "IdentityFile ~/.ssh/deploy" >> ~/.ssh/config;
- install -v -T -m 0644 "${FONTAWESOME_NPM_AUTH_FILE}" /etc/fontawesome-token
artifacts:
paths:
- node-dependencies
name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}"
expire_in: "1 day"
retry: 2
interruptible: true