Page MenuHomePhorge

D6.1732377750.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D6.1732377750.diff

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,16 +1,31 @@
+workflow:
+ rules:
+ # Branch pipelines always run
+ - if: $CI_COMMIT_BRANCH
+ # Tags other than phorge's staging area
+ - if: '$CI_COMMIT_TAG !~ /^phabricator\//'
+ # Run when triggered manually
+ - if: '$CI_PIPELINE_SOURCE == "trigger"'
+
stages:
- prepare
- build
+ - report
+
+default:
+ after_script:
+ - touch status.env
+ - 'if [ "$CI_JOB_STATUS" != "success" ]; then echo FAILED=1 >> status.env; fi'
+ artifacts: &defaultArtifacts
+ reports:
+ dotenv: status.env
prepare-env:
stage: prepare
script: |
tag="$CI_COMMIT_REF_SLUG"
- echo "tag=$tag" >> prepare.env
- echo "libkazvTag=servant" >> prepare.env
- artifacts:
- reports:
- dotenv: prepare.env
+ echo source="$CI_PIPELINE_SOURCE"
+ echo target="$TARGET_PHID"
build-debug:
stage: build
@@ -19,6 +34,7 @@
script: |
./script.sh
artifacts:
+ <<: *defaultArtifacts
paths:
- testfile
expire_in: 1 week
@@ -30,6 +46,7 @@
script: |
./script.sh
artifacts:
+ <<: *defaultArtifacts
paths:
- testfile
expire_in: 1 week
@@ -42,6 +59,17 @@
export VAR=foo
./script.sh
artifacts:
+ <<: *defaultArtifacts
paths:
- testfile
expire_in: 1 week
+
+report:
+ stage: report
+ image:
+ name: 'reg.lily.kazv.moe/infra/phorge-ci-tools:servant'
+ when: always
+ script:
+ - TYPE=pass
+ - if [ -n "$FAILED" ]; then TYPE=fail; fi
+ - 'echo "{\"receiver\": \"$TARGET_PHID\", \"type\": \"$TYPE\"}" | /tools/arcanist/bin/arc call-conduit --conduit-uri https://iron.lily-is.land/ --conduit-token "$CONDUIT_TOKEN" -- harbormaster.sendmessage'
diff --git a/hello.sh b/hello.sh
--- a/hello.sh
+++ b/hello.sh
@@ -1,2 +1,3 @@
#!/bin/bash
echo 'Hello, world'
+### Something

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 8:02 AM (12 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39377
Default Alt Text
D6.1732377750.diff (1 KB)

Event Timeline