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
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- dev-contain-pipeline.yaml
|
|
||||||
- ostree-package-pipeline.yaml
|
|
||||||
- simple-ros-pipeline.yaml
|
|
||||||
- test-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
|
apiVersion: tekton.dev/v1beta1
|
||||||
kind: Pipeline
|
kind: Pipeline
|
||||||
|
|
@ -23,7 +23,7 @@ spec:
|
||||||
workspace: git-credentials
|
workspace: git-credentials
|
||||||
params:
|
params:
|
||||||
- name: url
|
- name: url
|
||||||
value: ssh://git.jpace121.net:2222/tests/job-test
|
value: ssh://git@git.jpace121.net:2222/tests/job-test.git
|
||||||
- name: branch
|
- name: branch
|
||||||
value: master
|
value: master
|
||||||
taskRef:
|
taskRef:
|
||||||
|
|
@ -43,17 +43,15 @@ spec:
|
||||||
cat $(workspaces.source.path)/README.md
|
cat $(workspaces.source.path)/README.md
|
||||||
exit 0
|
exit 0
|
||||||
finally:
|
finally:
|
||||||
- name: notify-onedev
|
- name: gitea-status
|
||||||
params:
|
params:
|
||||||
- name: tekton-login-secret-name
|
- name: git-owner
|
||||||
value: onedev-api-key
|
value: tests
|
||||||
- name: feedback-url
|
- name: git-repo-name
|
||||||
value: https://git.jpace121.net/
|
value: job-test
|
||||||
- name: pr-id
|
- name: sha
|
||||||
value: $(params.pr-id)
|
value: $(tasks.fetch-repo.results.hash)
|
||||||
- name: run-name
|
|
||||||
value: $(context.pipelineRun.name)
|
|
||||||
- name: status
|
- name: status
|
||||||
value: $(tasks.status)
|
value: $(tasks.status)
|
||||||
taskRef:
|
taskRef:
|
||||||
name: j7s-onedev-pr-review
|
name: j7s-gitea-status
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ spec:
|
||||||
- name: cosign-credentials
|
- name: cosign-credentials
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: harbor.internal.jpace121.net/buildah:latest
|
image: harbor.internal.jpace121.net/k8s/buildah:latest
|
||||||
workingDir: $(workspaces.source.path)
|
workingDir: $(workspaces.source.path)
|
||||||
script: |
|
script: |
|
||||||
set -x
|
set -x
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@ spec:
|
||||||
params:
|
params:
|
||||||
- name: url
|
- name: url
|
||||||
- name: hash
|
- name: hash
|
||||||
|
results:
|
||||||
|
- name: hash
|
||||||
steps:
|
steps:
|
||||||
- image: harbor.internal.jpace121.net/gitssh:latest
|
- image: harbor.internal.jpace121.net/k8s/gitssh:latest
|
||||||
script: |
|
script: |
|
||||||
set -x
|
set -x
|
||||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||||
|
|
@ -21,3 +23,5 @@ spec:
|
||||||
git clone $(params.url) $(workspaces.output.path)
|
git clone $(params.url) $(workspaces.output.path)
|
||||||
cd $(workspaces.output.path)
|
cd $(workspaces.output.path)
|
||||||
git checkout $(params.hash)
|
git checkout $(params.hash)
|
||||||
|
|
||||||
|
git rev-parse HEAD > $(results.hash.path)
|
||||||
|
|
@ -9,8 +9,10 @@ spec:
|
||||||
params:
|
params:
|
||||||
- name: url
|
- name: url
|
||||||
- name: branch
|
- name: branch
|
||||||
|
results:
|
||||||
|
- name: hash
|
||||||
steps:
|
steps:
|
||||||
- image: harbor.internal.jpace121.net/gitssh:latest
|
- image: harbor.internal.jpace121.net/k8s/gitssh:latest
|
||||||
script: |
|
script: |
|
||||||
set -x
|
set -x
|
||||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||||
|
|
@ -19,3 +21,6 @@ spec:
|
||||||
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
|
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path)
|
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: branch
|
||||||
- name: repos-file
|
- name: repos-file
|
||||||
steps:
|
steps:
|
||||||
- image: harbor.internal.jpace121.net/vcs:latest
|
- image: harbor.internal.jpace121.net/k8s/vcs:latest
|
||||||
script: |
|
script: |
|
||||||
set -x
|
set -x
|
||||||
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
cp -r $(workspaces.ssh-directory.path) ~/.ssh
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,4 @@ resources:
|
||||||
- j7s-git-clone-hash.yaml
|
- j7s-git-clone-hash.yaml
|
||||||
- j7s-git-clone.yaml
|
- j7s-git-clone.yaml
|
||||||
- j7s-ros-clone.yaml
|
- j7s-ros-clone.yaml
|
||||||
|
- j7s-gitea-status.yaml
|
||||||
Loading…
Reference in New Issue