Skip to content

Commit abd490d

Browse files
authored
Merge pull request #2286 from rnc/NCL8774
Add driver module and CLI to control it
2 parents d5eb184 + 0696a3c commit abd490d

File tree

33 files changed

+2095
-10
lines changed

33 files changed

+2095
-10
lines changed

deploy/pipeline/mw-pipeline-v0.1.yaml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
apiVersion: tekton.dev/v1
2+
kind: Pipeline
3+
metadata:
4+
name: mw-pipeline
5+
spec:
6+
params:
7+
- name: QUAY_REPO
8+
type: string
9+
- name: URL
10+
description: Repository URL to clone from
11+
type: string
12+
- name: REVISION
13+
description: 'Revision to checkout. (branch, tag, sha, ref, etc...)'
14+
type: string
15+
default: main
16+
- name: BUILD_SCRIPT
17+
description: 'The build script to embed with the Containerfile'
18+
type: string
19+
default: |
20+
date
21+
- name: RECIPE_IMAGE
22+
type: string
23+
- name: BUILD_TOOL
24+
type: string
25+
- name: BUILD_TOOL_VERSION
26+
type: string
27+
- name: JAVA_VERSION
28+
type: string
29+
- name: MVN_REPO_DEPLOY_URL
30+
description: Maven repository to deploy to
31+
type: string
32+
default: http://indyhost/ #TODO remove default
33+
- name: MVN_REPO_DEPENDENCIES_URL
34+
description: Maven repository to get dependencies from
35+
type: string
36+
- name: ACCESS_TOKEN
37+
type: string
38+
- name: BUILD_ID
39+
type: string
40+
- name: caTrustConfigMapName
41+
type: string
42+
- name: ENABLE_INDY_PROXY
43+
type: string
44+
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE
45+
type: string
46+
workspaces:
47+
- name: source
48+
description: Workspace containing the source code
49+
# - name: ssh-directory
50+
# configMap:
51+
# name: ssh-directory
52+
tasks:
53+
- name: git-clone
54+
params:
55+
- name: url
56+
value: $(params.URL)
57+
- name: revision
58+
value: $(params.REVISION)
59+
- name: verbose
60+
value: 'true'
61+
taskRef:
62+
resolver: bundles
63+
params:
64+
- name: name
65+
value: git-clone
66+
- name: bundle
67+
value: quay.io/konflux-ci/tekton-catalog/task-git-clone:0.1
68+
- name: kind
69+
value: task
70+
workspaces:
71+
- name: output
72+
workspace: source
73+
# - name: ssh-directory
74+
# workspace: ssh-directory
75+
- name: pre-build
76+
runAfter:
77+
- git-clone
78+
params:
79+
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE
80+
value: $(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE)
81+
- name: IMAGE_URL
82+
value: $(params.QUAY_REPO):trusted-source-$(context.pipelineRun.name)
83+
- name: NAME
84+
value: $(context.pipelineRun.name)
85+
- name: RECIPE_IMAGE
86+
value: $(params.RECIPE_IMAGE)
87+
- name: BUILD_TOOL
88+
value: $(params.BUILD_TOOL)
89+
- name: BUILD_TOOL_VERSION
90+
value: $(params.BUILD_TOOL_VERSION)
91+
- name: JAVA_VERSION
92+
value: $(params.JAVA_VERSION)
93+
- name: BUILD_SCRIPT
94+
value: $(params.BUILD_SCRIPT)
95+
# TODO: Below is needed for deploy-pre-build-source step and could be skipped if its removed.
96+
- name: SCM_URL
97+
value: $(params.URL)
98+
- name: SCM_HASH
99+
value: $(params.REVISION)
100+
taskRef:
101+
resolver: http
102+
params:
103+
- name: url
104+
value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/pre-build.yaml
105+
workspaces:
106+
- name: source
107+
workspace: source
108+
109+
- name: buildah-oci-ta
110+
runAfter:
111+
- pre-build
112+
params:
113+
- name: SOURCE_ARTIFACT
114+
value: $(tasks.pre-build.results.PRE_BUILD_IMAGE_DIGEST)
115+
- name: HERMETIC
116+
value: "false"
117+
- name: IMAGE # output image
118+
value: $(params.QUAY_REPO):build-$(context.pipelineRun.name)
119+
- name: DOCKERFILE # local path to the containerfile
120+
value: .jbs/Containerfile
121+
- name: caTrustConfigMapName
122+
value: $(params.caTrustConfigMapName)
123+
- name: ENABLE_INDY_PROXY
124+
value: $(params.ENABLE_INDY_PROXY)
125+
- name: BUILD_ARGS #TODO this should be baked in the OCI source image only a ACCESS_TOKEN should be passed
126+
value:
127+
- PROXY_URL=$(params.MVN_REPO_DEPENDENCIES_URL)
128+
- BUILD_ID=$(params.BUILD_ID)
129+
- ACCESS_TOKEN=$(params.ACCESS_TOKEN)
130+
taskRef:
131+
#resolver: bundles
132+
#params:
133+
# - name: name
134+
# value: buildah-oci-ta
135+
# - name: bundle
136+
# value: quay.io/konflux-ci/tekton-catalog/task-buildah-oci-ta:0.2
137+
# - name: kind
138+
# value: task
139+
140+
resolver: http
141+
params:
142+
- name: url
143+
value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/buildah-oci-ta.yaml
144+
145+
- name: maven-deployment
146+
runAfter:
147+
- buildah-oci-ta
148+
params:
149+
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE
150+
value: $(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE)
151+
- name: IMAGE_URL
152+
value: $(tasks.buildah-oci-ta.results.IMAGE_URL)
153+
- name: IMAGE_DIGEST
154+
value: $(tasks.buildah-oci-ta.results.IMAGE_DIGEST)
155+
- name: MVN_REPO
156+
value: $(params.MVN_REPO_DEPLOY_URL)
157+
- name: ACCESS_TOKEN
158+
value: $(params.ACCESS_TOKEN)
159+
taskRef:
160+
resolver: http
161+
params:
162+
- name: url
163+
value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/maven-deployment.yaml

0 commit comments

Comments
 (0)