Page MenuHomePhorge

D6.1732505155.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D6.1732505155.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:
+ # Run when triggered manually
+ - if: '$CI_PIPELINE_SOURCE == "trigger"'
+ # Branch pipelines always run
+ - if: $CI_COMMIT_BRANCH
+ # Tags other than phorge's staging area
+ - if: '$CI_COMMIT_TAG !~ /^phabricator\//'
+
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
@@ -29,7 +45,9 @@
name: 'ubuntu:21.04'
script: |
./script.sh
+ false
artifacts:
+ <<: *defaultArtifacts
paths:
- testfile
expire_in: 1 week
@@ -42,6 +60,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
Sun, Nov 24, 7:25 PM (4 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40032
Default Alt Text
D6.1732505155.diff (1 KB)

Event Timeline