Compare commits

...

4 Commits

Author SHA1 Message Date
b3b9e5f370 Use nix-attic image in CI 2023-05-29 15:00:18 +02:00
f283c10ae4 Merge branch 'main' of gitlab.uniworx.de:uniworx/uniworx.de 2023-05-13 22:34:15 +02:00
d0981af607 Merge branch 'mr-review' into 'main'
Provide Review Apps in MRs

See merge request uniworx/uniworx.de!1
2023-05-13 16:48:39 +00:00
a132d6bf4c Provide Review Apps in MRs 2023-05-13 16:48:39 +00:00
2 changed files with 31 additions and 7 deletions

View File

@ -1,8 +1,11 @@
image: nixpkgs/nix-flakes
default:
image:
name: registry.uniworx.de/uniworx/containers/nix-attic:latest
workflow:
rules:
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_MERGE_REQUEST_ID
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
@ -13,6 +16,10 @@ cache:
- .stack-root
- _cache
stages:
- review
- deploy
pages:
stage: deploy
script: &build-script
@ -21,13 +28,30 @@ pages:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
test:
stage: test
review:start:
stage: review
script: *build-script
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH != "main"
- if: $CI_MERGE_REQUEST_ID
environment:
name: preview/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}
url: https://${CI_PROJECT_NAMESPACE}.pages.uniworx.de/-/${CI_PROJECT_NAME}/-/jobs/${CI_JOB_ID}/artifacts/public/index.html
auto_stop_in: 2 weeks
on_stop: review:stop
review:stop:
stage: review
rules:
- if: $CI_MERGE_REQUEST_ID
when: manual
allow_failure: true
environment:
name: preview/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}
action: stop
script:
- echo 'Terminating review app'

View File

@ -1,5 +1,5 @@
#!/usr/bin/env sh
gup --always
yarn install
yarn install --frozen-lockfile --check-files --non-interactive
touch node_modules