chore(gitlab-ci): cleanup; move before_script to default
This commit is contained in:
parent
89d9018bc4
commit
a6db39c056
@ -12,11 +12,13 @@
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
image:
|
image:
|
||||||
name: registry.uniworx.de/fradrive/fradrive/fradrive-env:latest # bookworm # registry.uniworx.de/uniworx/containers/nix-attic:latest
|
name: registry.uniworx.de/fradrive/fradrive/fradrive-env:latest # bookworm
|
||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
docker:
|
docker:
|
||||||
platform: x86_64
|
platform: x86_64
|
||||||
user: fradrive-env
|
user: fradrive-env
|
||||||
|
before_script:
|
||||||
|
- chown -R ${ENV_USER} . #
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-23.11/nixexprs.tar.xz"
|
NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-23.11/nixexprs.tar.xz"
|
||||||
@ -51,20 +53,7 @@ node modules:
|
|||||||
- .npm
|
- .npm
|
||||||
- node_modules
|
- node_modules
|
||||||
script:
|
script:
|
||||||
- make .npmrc # TODO: debug
|
|
||||||
- cat .npmrc # TODO: debug
|
|
||||||
- make node_modules
|
- make node_modules
|
||||||
before_script: &nix-before
|
|
||||||
- chown -R ${ENV_USER} .
|
|
||||||
# - 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
|
|
||||||
# - echo ${FONTAWESOME_NPM_AUTH_TOKEN} # TODO: debug
|
|
||||||
# - echo ${FONTAWESOME_NPM_AUTH_TOKEN} > .npmrc
|
|
||||||
# - cat .npmrc # TODO: debug
|
|
||||||
# - install -v -T -m 0644 "${NIX_NETRC}" /etc/nix/netrc
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- node_modules/
|
- node_modules/
|
||||||
@ -79,7 +68,6 @@ well-known:
|
|||||||
stage: setup
|
stage: setup
|
||||||
script:
|
script:
|
||||||
- make well-known
|
- make well-known
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: node modules
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -107,7 +95,6 @@ backend dependencies:
|
|||||||
script:
|
script:
|
||||||
- echo ${LC_ALL} ${LANG}
|
- echo ${LC_ALL} ${LANG}
|
||||||
- make backend-dependencies-prod
|
- make backend-dependencies-prod
|
||||||
before_script: *nix-before
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- .stack
|
- .stack
|
||||||
@ -121,7 +108,6 @@ frontend lint:
|
|||||||
stage: lint
|
stage: lint
|
||||||
script:
|
script:
|
||||||
- make frontend-lint
|
- make frontend-lint
|
||||||
before_script: *nix-before
|
|
||||||
cache:
|
cache:
|
||||||
- *frontend-cache
|
- *frontend-cache
|
||||||
needs:
|
needs:
|
||||||
@ -138,7 +124,6 @@ backend lint:
|
|||||||
- *stack-cache
|
- *stack-cache
|
||||||
script:
|
script:
|
||||||
- make backend-lint-prod
|
- make backend-lint-prod
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: backend dependencies
|
- job: backend dependencies
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -152,7 +137,6 @@ frontend build:
|
|||||||
- *frontend-cache
|
- *frontend-cache
|
||||||
script:
|
script:
|
||||||
- make frontend-build
|
- make frontend-build
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: node modules
|
||||||
artifacts: true
|
artifacts: true
|
||||||
@ -178,7 +162,6 @@ backend build:
|
|||||||
- make bin/uniworx
|
- make bin/uniworx
|
||||||
- cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint
|
- cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint
|
||||||
- cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod
|
- cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: node modules # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -205,7 +188,6 @@ uniworxdb:
|
|||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- make bin/uniworxdb
|
- make bin/uniworxdb
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: node modules # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -225,7 +207,6 @@ uniworx:exe:uniworxload:
|
|||||||
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||||
- nix -L build -o result ".#uniworx:exe:uniworxload"
|
- nix -L build -o result ".#uniworx:exe:uniworxload"
|
||||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworxload.nar.xz
|
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworxload.nar.xz
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: node modules # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -246,7 +227,6 @@ uniworx:exe:uniworxload:
|
|||||||
# - xzcat frontend.nar.xz | nix-store --import
|
# - xzcat frontend.nar.xz | nix-store --import
|
||||||
# - xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
# - xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||||
# - nix -L flake check .
|
# - nix -L flake check .
|
||||||
# before_script: *nix-before
|
|
||||||
# needs:
|
# needs:
|
||||||
# - job: node modules # transitive
|
# - job: node modules # transitive
|
||||||
# artifacts: false
|
# artifacts: false
|
||||||
@ -259,7 +239,6 @@ frontend test:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- make frontend-test
|
- make frontend-test
|
||||||
before_script: *nix-before
|
|
||||||
cache: *frontend-cache
|
cache: *frontend-cache
|
||||||
needs:
|
needs:
|
||||||
- job: node modules
|
- job: node modules
|
||||||
@ -271,7 +250,6 @@ backend test:
|
|||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- "nix shell .#gnumake .#stack --command make backend-test"
|
- "nix shell .#gnumake .#stack --command make backend-test"
|
||||||
before_script: *nix-before
|
|
||||||
cache: *stack-cache
|
cache: *stack-cache
|
||||||
needs:
|
needs:
|
||||||
- job: backend dependencies
|
- job: backend dependencies
|
||||||
@ -285,7 +263,6 @@ container:
|
|||||||
script:
|
script:
|
||||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||||
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxDocker") uniworx.tar.gz
|
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxDocker") uniworx.tar.gz
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: node modules # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -309,7 +286,6 @@ test container:
|
|||||||
script:
|
script:
|
||||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||||
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxTestDocker") uniworx.tar.gz
|
- cp -pr --reflink=auto -L $(nix build --print-out-paths ".#uniworxTestDocker") uniworx.tar.gz
|
||||||
before_script: *nix-before
|
|
||||||
needs:
|
needs:
|
||||||
- job: node modules # transitive
|
- job: node modules # transitive
|
||||||
artifacts: false
|
artifacts: false
|
||||||
@ -335,7 +311,6 @@ parse changelog:
|
|||||||
- job: node modules
|
- job: node modules
|
||||||
artifacts: true
|
artifacts: true
|
||||||
rules: *release-rules
|
rules: *release-rules
|
||||||
before_script: *nix-before
|
|
||||||
script:
|
script:
|
||||||
- xzcat node-dependencies.nar.xz | nix-store --import
|
- xzcat node-dependencies.nar.xz | nix-store --import
|
||||||
- nix -L run ".#jqChangelogJson" -- -r '.versions[0].version' > .current-version
|
- nix -L run ".#jqChangelogJson" -- -r '.versions[0].version' > .current-version
|
||||||
@ -357,7 +332,6 @@ parse test changelog:
|
|||||||
- job: node modules
|
- job: node modules
|
||||||
artifacts: true
|
artifacts: true
|
||||||
rules: *test-release-rules
|
rules: *test-release-rules
|
||||||
before_script: *nix-before
|
|
||||||
script:
|
script:
|
||||||
- xzcat node-dependencies.nar.xz | nix-store --import
|
- xzcat node-dependencies.nar.xz | nix-store --import
|
||||||
- nix -L run ".#jqChangelogJson" -- -r '.versions[0].version' > .current-version
|
- nix -L run ".#jqChangelogJson" -- -r '.versions[0].version' > .current-version
|
||||||
|
|||||||
Reference in New Issue
Block a user