chore(gitlab-ci): ...
This commit is contained in:
parent
01bdbd1b25
commit
5f7b5cb380
@ -11,6 +11,7 @@ default:
|
||||
variables:
|
||||
NIX_PATH: "nixpkgs=http://nixos.org/channels/nixos-21.05/nixexprs.tar.xz"
|
||||
AWS_SHARED_CREDENTIALS_FILE: "/etc/aws/credentials"
|
||||
FLAKE: "${CI_REPOSITORY_URL}?ref=${CI_COMMIT_SHA}"
|
||||
|
||||
stages:
|
||||
- frontend:build
|
||||
@ -23,8 +24,7 @@ stages:
|
||||
node dependencies:
|
||||
stage: frontend:build
|
||||
script:
|
||||
- git status --short --porcelain # debug
|
||||
- nix -L build -o result .#uniworxNodeDependencies
|
||||
- nix -L build -o result "${FLAKE}#uniworxNodeDependencies"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > node-dependencies.nar.xz
|
||||
before_script: &nix-before
|
||||
- mkdir -p /etc/nix
|
||||
@ -55,7 +55,7 @@ well known:
|
||||
stage: frontend:build
|
||||
script:
|
||||
- xzcat node-dependencies.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworxWellKnown
|
||||
- nix -L build -o result "${FLAKE}#uniworxWellKnown"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > well-known.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -74,7 +74,7 @@ frontend:
|
||||
script:
|
||||
- xzcat node-dependencies.nar.xz | nix-store --import
|
||||
- xzcat well-known.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworxFrontend
|
||||
- nix -L build -o result "${FLAKE}#uniworxFrontend"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > frontend.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -94,7 +94,7 @@ uniworx:lib:uniworx:
|
||||
stage: backend:build
|
||||
script:
|
||||
- xzcat frontend.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworx:lib:uniworx
|
||||
- nix -L build -o result "${FLAKE}#uniworx:lib:uniworx"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:lib:uniworx.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -116,7 +116,7 @@ uniworx:exe:uniworx:
|
||||
stage: backend:build
|
||||
script:
|
||||
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworx:exe:uniworx
|
||||
- nix -L build -o result "${FLAKE}#uniworx:exe:uniworx"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworx.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -140,7 +140,7 @@ uniworx:exe:uniworx-wflint:
|
||||
stage: backend:build
|
||||
script:
|
||||
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworx:exe:uniworx-wflint
|
||||
- nix -L build -o result "${FLAKE}#uniworx:exe:uniworx-wflint"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworx-wflint.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -164,7 +164,7 @@ uniworx:exe:uniworxdb:
|
||||
stage: backend:build
|
||||
script:
|
||||
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworx:exe:uniworxdb
|
||||
- nix -L build -o result "${FLAKE}#uniworx:exe:uniworxdb"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworxdb.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -188,7 +188,7 @@ uniworx:exe:uniworxload:
|
||||
stage: backend:build
|
||||
script:
|
||||
- xzcat uniworx:lib:uniworx.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworx:exe:uniworxload
|
||||
- nix -L build -o result "${FLAKE}#uniworx:exe:uniworxload"
|
||||
- nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworxload.nar.xz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -232,7 +232,7 @@ demo docker:
|
||||
script:
|
||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||
- xzcat uniworx:exe:uniworxdb.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworxDemoDocker
|
||||
- nix -L build -o result "${FLAKE}#uniworxDemoDocker"
|
||||
- cp -pr --reflink=auto -L result uniworx-demo.tar.gz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -266,7 +266,7 @@ docker:
|
||||
stage: docker
|
||||
script:
|
||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||
- nix -L build -o result .#uniworxDocker
|
||||
- nix -L build -o result "${FLAKE}#uniworxDocker"
|
||||
- cp -pr --reflink=auto -L result uniworx.tar.gz
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
@ -305,9 +305,12 @@ parse changelog:
|
||||
before_script: *nix-before
|
||||
script:
|
||||
- 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].body' > .current-changelog.md
|
||||
- nix -L run "${FLAKE}#jqChangelogJson" -- -r '.versions[0].version' > .current-version
|
||||
- nix -L run "${FLAKE}#jqChangelogJson" -- -r '.versions[0].body' > .current-changelog.md
|
||||
- echo "VERSION=$(cat .current-version)" >> build.env
|
||||
artifacts:
|
||||
reports:
|
||||
dotenv: build.env
|
||||
paths:
|
||||
- .current-version
|
||||
- .current-changelog.md
|
||||
@ -320,7 +323,7 @@ upload docker:
|
||||
stage: docker
|
||||
script:
|
||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||
- nix -L run .#pushUniworxDocker
|
||||
- nix -L run "${FLAKE}#pushUniworxDocker"
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
- job: node dependencies # transitive
|
||||
@ -344,7 +347,7 @@ upload demo docker:
|
||||
script:
|
||||
- xzcat uniworx:exe:uniworx.nar.xz | nix-store --import
|
||||
- xzcat uniworx:exe:uniworxdb.nar.xz | nix-store --import
|
||||
- nix -L run .#pushUniworxDemoDocker
|
||||
- nix -L run "${FLAKE}#pushUniworxDemoDocker"
|
||||
before_script: *nix-before
|
||||
needs:
|
||||
- job: node dependencies # transitive
|
||||
@ -373,8 +376,6 @@ release:
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9].*/
|
||||
when: on_success
|
||||
before_script:
|
||||
- export VERSION="$(cat .current-version)"
|
||||
script:
|
||||
- release-cli create --name "${VERSION}" --tag-name $CI_COMMIT_TAG --description .current-changelog.md
|
||||
needs:
|
||||
|
||||
Reference in New Issue
Block a user