Fix pipeline status
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
All checks were successful
lint/clippy Checking for common mistakes and opportunities for code improvement
build/msvc Build for the target platform: msvc
build/linux Build for the target platform: linux
Since the PR pipeline is not re-applied on new commits, the `pr.head.ref` variable doesn't get updated, and isn't suitable for the status reporting.
This commit is contained in:
parent
b86ea337d1
commit
92546f6f5e
3 changed files with 30 additions and 15 deletions
|
@ -40,4 +40,4 @@ jobs:
|
||||||
pr: ((.:pr))
|
pr: ((.:pr))
|
||||||
gitea_api_key: ((gitea_api_key))
|
gitea_api_key: ((gitea_api_key))
|
||||||
instance_vars:
|
instance_vars:
|
||||||
n: ((.:pr.number))
|
number: ((.:pr.number))
|
||||||
|
|
|
@ -37,7 +37,6 @@ resources:
|
||||||
url: http://forgejo:3000
|
url: http://forgejo:3000
|
||||||
owner: bitsquid_dt
|
owner: bitsquid_dt
|
||||||
repo: dtmt
|
repo: dtmt
|
||||||
sha: ((pr.head.sha))
|
|
||||||
context: lint/clippy
|
context: lint/clippy
|
||||||
description: Checking for common mistakes and opportunities for code improvement
|
description: Checking for common mistakes and opportunities for code improvement
|
||||||
|
|
||||||
|
@ -48,7 +47,6 @@ resources:
|
||||||
url: http://forgejo:3000
|
url: http://forgejo:3000
|
||||||
owner: bitsquid_dt
|
owner: bitsquid_dt
|
||||||
repo: dtmt
|
repo: dtmt
|
||||||
sha: ((pr.head.sha))
|
|
||||||
context: build/msvc
|
context: build/msvc
|
||||||
description: "Build for the target platform: msvc"
|
description: "Build for the target platform: msvc"
|
||||||
|
|
||||||
|
@ -59,7 +57,6 @@ resources:
|
||||||
url: http://forgejo:3000
|
url: http://forgejo:3000
|
||||||
owner: bitsquid_dt
|
owner: bitsquid_dt
|
||||||
repo: dtmt
|
repo: dtmt
|
||||||
sha: ((pr.head.sha))
|
|
||||||
context: build/linux
|
context: build/linux
|
||||||
description: "Build for the target platform: linux"
|
description: "Build for the target platform: linux"
|
||||||
|
|
||||||
|
@ -72,6 +69,7 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: success
|
state: success
|
||||||
|
sha: ((.:git_sha))
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
put: state-failure
|
put: state-failure
|
||||||
|
@ -79,16 +77,21 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: failure
|
state: failure
|
||||||
|
sha: ((.:git_sha))
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
|
- get: repo
|
||||||
|
trigger: true
|
||||||
|
|
||||||
|
- load_var: git_sha
|
||||||
|
file: repo/.git/ref
|
||||||
|
|
||||||
- put: state-pending
|
- put: state-pending
|
||||||
resource: pr-status-lint-clippy
|
resource: pr-status-lint-clippy
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: pending
|
state: pending
|
||||||
|
sha: ((.:git_sha))
|
||||||
- get: repo
|
|
||||||
trigger: true
|
|
||||||
|
|
||||||
- task: check
|
- task: check
|
||||||
file: repo/.ci/tasks/clippy.yml
|
file: repo/.ci/tasks/clippy.yml
|
||||||
|
@ -103,6 +106,7 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: success
|
state: success
|
||||||
|
sha: ((.:git_sha))
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
put: state-failure
|
put: state-failure
|
||||||
|
@ -110,16 +114,21 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: failure
|
state: failure
|
||||||
|
sha: ((.:git_sha))
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
|
- get: repo
|
||||||
|
trigger: true
|
||||||
|
|
||||||
|
- load_var: git_sha
|
||||||
|
file: repo/.git/ref
|
||||||
|
|
||||||
- put: state-pending
|
- put: state-pending
|
||||||
resource: pr-status-build-msvc
|
resource: pr-status-build-msvc
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: pending
|
state: pending
|
||||||
|
sha: ((.:git_sha))
|
||||||
- get: repo
|
|
||||||
trigger: true
|
|
||||||
|
|
||||||
- task: build
|
- task: build
|
||||||
file: repo/.ci/tasks/build.yml
|
file: repo/.ci/tasks/build.yml
|
||||||
|
@ -154,6 +163,7 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: success
|
state: success
|
||||||
|
sha: ((.:git_sha))
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
put: state-failure
|
put: state-failure
|
||||||
|
@ -161,16 +171,21 @@ jobs:
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: failure
|
state: failure
|
||||||
|
sha: ((.:git_sha))
|
||||||
|
|
||||||
plan:
|
plan:
|
||||||
|
- get: repo
|
||||||
|
trigger: true
|
||||||
|
|
||||||
|
- load_var: git_sha
|
||||||
|
file: repo/.git/ref
|
||||||
|
|
||||||
- put: state-pending
|
- put: state-pending
|
||||||
resource: pr-status-build-linux
|
resource: pr-status-build-linux
|
||||||
no_get: true
|
no_get: true
|
||||||
params:
|
params:
|
||||||
state: pending
|
state: pending
|
||||||
|
sha: ((.:git_sha))
|
||||||
- get: repo
|
|
||||||
trigger: true
|
|
||||||
|
|
||||||
- task: build
|
- task: build
|
||||||
file: repo/.ci/tasks/build.yml
|
file: repo/.ci/tasks/build.yml
|
||||||
|
|
4
Justfile
4
Justfile
|
@ -29,7 +29,7 @@ ci-image-linux:
|
||||||
docker push registry.sclu1034.dev/dtmt-ci-base-linux
|
docker push registry.sclu1034.dev/dtmt-ci-base-linux
|
||||||
|
|
||||||
set-base-pipeline:
|
set-base-pipeline:
|
||||||
fly -t ((fly_target)) set-pipeline \
|
fly -t {{fly_target}} set-pipeline \
|
||||||
--pipeline dtmt-prs \
|
--pipeline dtmt-prs \
|
||||||
--config .ci/pipelines/base-pipeline.yml \
|
--config .ci/pipelines/base-pipeline.yml \
|
||||||
-v gitea_api_key=${GITEA_API_KEY} \
|
-v gitea_api_key=${GITEA_API_KEY} \
|
||||||
|
@ -46,7 +46,7 @@ set-pr-pipeline pr:
|
||||||
--pipeline dtmt-pr \
|
--pipeline dtmt-pr \
|
||||||
--config .ci/pipelines/pr.yml \
|
--config .ci/pipelines/pr.yml \
|
||||||
-v gitea_api_key=${GITEA_API_KEY} \
|
-v gitea_api_key=${GITEA_API_KEY} \
|
||||||
-i n={{pr}} \
|
-i number={{pr}} \
|
||||||
-y branch="$(yq -y '.head.ref' 'pr-{{pr}}.yaml')" \
|
-y branch="$(yq -y '.head.ref' 'pr-{{pr}}.yaml')" \
|
||||||
-y pr="$(cat 'pr-{{pr}}.yaml')"
|
-y pr="$(cat 'pr-{{pr}}.yaml')"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue