Merge pull request #1599 from pikasTech/ci/nc01-web-probe-sentinel-pac
添加 NC01 Web Probe Sentinel PaC
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
apiVersion: tekton.dev/v1
|
||||||
|
kind: PipelineRun
|
||||||
|
metadata:
|
||||||
|
generateName: hwlab-web-probe-sentinel-nc01-
|
||||||
|
annotations:
|
||||||
|
pipelinesascode.tekton.dev/on-event: "[push]"
|
||||||
|
pipelinesascode.tekton.dev/on-target-branch: "[master]"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: hwlab-web-probe-sentinel-nc01-pac
|
||||||
|
app.kubernetes.io/part-of: hwlab-web-probe-sentinel
|
||||||
|
unidesk.ai/source-commit: "{{revision}}"
|
||||||
|
hwlab.pikastech.local/source-commit: "{{revision}}"
|
||||||
|
spec:
|
||||||
|
timeouts:
|
||||||
|
pipeline: 300s
|
||||||
|
taskRunTemplate:
|
||||||
|
serviceAccountName: default
|
||||||
|
podTemplate:
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
|
pipelineSpec:
|
||||||
|
tasks:
|
||||||
|
- name: publish
|
||||||
|
taskSpec:
|
||||||
|
steps:
|
||||||
|
- name: sentinel-publish
|
||||||
|
image: 127.0.0.1:5000/hwlab/hwlab-ci-node-tools:node22-alpine-bun-v1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
workingDir: /workspace
|
||||||
|
env:
|
||||||
|
- name: GIT_READ_URL
|
||||||
|
value: http://gitea-http.devops-infra.svc.cluster.local:3000/mirrors/pikasTech-unidesk.git
|
||||||
|
- name: SOURCE_COMMIT
|
||||||
|
value: "{{revision}}"
|
||||||
|
- name: SOURCE_STAGE_REF
|
||||||
|
value: refs/unidesk/snapshots/gitea-actions/unidesk-master-nc01/{{revision}}
|
||||||
|
script: |
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
rm -rf source
|
||||||
|
git clone --filter=blob:none --no-checkout "$GIT_READ_URL" source
|
||||||
|
cd source
|
||||||
|
git fetch --depth=1 --filter=blob:none origin "+$SOURCE_STAGE_REF:refs/remotes/origin/unidesk-source-snapshot"
|
||||||
|
git checkout --detach "$SOURCE_COMMIT"
|
||||||
|
bun scripts/cli.ts web-probe sentinel publish-current \
|
||||||
|
--node NC01 \
|
||||||
|
--lane v03 \
|
||||||
|
--sentinel nc01-web-probe-sentinel \
|
||||||
|
--confirm \
|
||||||
|
--wait \
|
||||||
|
--timeout-seconds 180 \
|
||||||
|
--source-commit "$SOURCE_COMMIT" \
|
||||||
|
--source-stage-ref "$SOURCE_STAGE_REF" \
|
||||||
|
--source-authority gitea-snapshot
|
||||||
Reference in New Issue
Block a user