Multiple cleanups working toward run of test-pipeline.
This commit is contained in:
parent
6c28be4490
commit
ad8dd1cdda
|
|
@ -1,7 +1,4 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- dev-contain-pipeline.yaml
|
||||
- ostree-package-pipeline.yaml
|
||||
- simple-ros-pipeline.yaml
|
||||
- test-pipeline.yaml
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# A pipeline to test the infrasture around calling pipelines.
|
||||
# A pipeline to test the infrastructure around calling pipelines.
|
||||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Pipeline
|
||||
|
|
@ -23,7 +23,7 @@ spec:
|
|||
workspace: git-credentials
|
||||
params:
|
||||
- name: url
|
||||
value: ssh://git.jpace121.net:2222/tests/job-test
|
||||
value: ssh://git@git.jpace121.net:2222/tests/job-test.git
|
||||
- name: branch
|
||||
value: master
|
||||
taskRef:
|
||||
|
|
@ -43,17 +43,15 @@ spec:
|
|||
cat $(workspaces.source.path)/README.md
|
||||
exit 0
|
||||
finally:
|
||||
- name: notify-onedev
|
||||
- name: gitea-status
|
||||
params:
|
||||
- name: tekton-login-secret-name
|
||||
value: onedev-api-key
|
||||
- name: feedback-url
|
||||
value: https://git.jpace121.net/
|
||||
- name: pr-id
|
||||
value: $(params.pr-id)
|
||||
- name: run-name
|
||||
value: $(context.pipelineRun.name)
|
||||
- name: git-owner
|
||||
value: tests
|
||||
- name: git-repo-name
|
||||
value: job-test
|
||||
- name: sha
|
||||
value: $(tasks.fetch-repo.results.hash)
|
||||
- name: status
|
||||
value: $(tasks.status)
|
||||
taskRef:
|
||||
name: j7s-onedev-pr-review
|
||||
name: j7s-gitea-status
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ spec:
|
|||
- name: cosign-credentials
|
||||
steps:
|
||||
- name: build
|
||||
image: harbor.internal.jpace121.net/buildah:latest
|
||||
image: harbor.internal.jpace121.net/k8s/buildah:latest
|
||||
workingDir: $(workspaces.source.path)
|
||||
script: |
|
||||
set -x
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@ spec:
|
|||
params:
|
||||
- name: url
|
||||
- name: hash
|
||||
results:
|
||||
- name: hash
|
||||
steps:
|
||||
- image: harbor.internal.jpace121.net/gitssh:latest
|
||||
- image: harbor.internal.jpace121.net/k8s/gitssh:latest
|
||||
script: |
|
||||
set -x
|
||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||
|
|
@ -21,3 +23,5 @@ spec:
|
|||
git clone $(params.url) $(workspaces.output.path)
|
||||
cd $(workspaces.output.path)
|
||||
git checkout $(params.hash)
|
||||
|
||||
git rev-parse HEAD > $(results.hash.path)
|
||||
|
|
@ -9,8 +9,10 @@ spec:
|
|||
params:
|
||||
- name: url
|
||||
- name: branch
|
||||
results:
|
||||
- name: hash
|
||||
steps:
|
||||
- image: harbor.internal.jpace121.net/gitssh:latest
|
||||
- image: harbor.internal.jpace121.net/k8s/gitssh:latest
|
||||
script: |
|
||||
set -x
|
||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||
|
|
@ -19,3 +21,6 @@ spec:
|
|||
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
|
||||
|
||||
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path)
|
||||
|
||||
cd $(workspaces.output.path)
|
||||
git rev-parse HEAD > $(results.hash.path)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: j7s-gitea-status
|
||||
spec:
|
||||
params:
|
||||
- name: git-owner
|
||||
- name: git-repo-name
|
||||
- name: sha
|
||||
- name: context
|
||||
- name: status
|
||||
- name: description
|
||||
default: ""
|
||||
- name: targetUrl
|
||||
default: ""
|
||||
- name: base-url
|
||||
default: "https://git.jpace121.net/"
|
||||
- name: token-secret-name
|
||||
default: gitea-token
|
||||
steps:
|
||||
- image: harbor.internal.jpace121.net/k8s/j7s-gitea-status:latest
|
||||
env:
|
||||
- name: GIT_URL
|
||||
value: $(params.base-url)
|
||||
- name: GIT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: $(params.token-secret-name)
|
||||
key: token
|
||||
- name: GIT_OWNER
|
||||
value: $(params.git-owner)
|
||||
- name: GIT_REPO
|
||||
value: $(params.git-repo-name)
|
||||
script: |
|
||||
set -x
|
||||
cd /
|
||||
./j7s-gitea-status -sha $(params.sha) \
|
||||
-context $(params.context) \
|
||||
-statusFlag $(params.status) \
|
||||
-description $(params.description) \
|
||||
-targetUrl $(params.targetUrl)
|
||||
|
|
@ -11,7 +11,7 @@ spec:
|
|||
- name: branch
|
||||
- name: repos-file
|
||||
steps:
|
||||
- image: harbor.internal.jpace121.net/vcs:latest
|
||||
- image: harbor.internal.jpace121.net/k8s/vcs:latest
|
||||
script: |
|
||||
set -x
|
||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||
|
|
|
|||
|
|
@ -6,3 +6,4 @@ resources:
|
|||
- j7s-git-clone-hash.yaml
|
||||
- j7s-git-clone.yaml
|
||||
- j7s-ros-clone.yaml
|
||||
- j7s-gitea-status.yaml
|
||||
Loading…
Reference in New Issue