-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into domain-proxy
- Loading branch information
Showing
42 changed files
with
1,409 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: mw-pipeline | ||
spec: | ||
params: | ||
- name: QUAY_REPO | ||
type: string | ||
- name: URL | ||
description: Repository URL to clone from | ||
type: string | ||
- name: REVISION | ||
description: 'Revision to checkout. (branch, tag, sha, ref, etc...)' | ||
type: string | ||
default: main | ||
- name: BUILD_SCRIPT | ||
description: 'The build script to embed with the Containerfile' | ||
type: string | ||
default: | | ||
date | ||
- name: RECIPE_IMAGE | ||
type: string | ||
- name: BUILD_TOOL | ||
type: string | ||
- name: BUILD_TOOL_VERSION | ||
type: string | ||
- name: JAVA_VERSION | ||
type: string | ||
- name: MVN_REPO_DEPLOY_URL | ||
description: Maven repository to deploy to | ||
type: string | ||
default: http://indyhost/ #TODO remove default | ||
- name: MVN_REPO_DEPENDENCIES_URL | ||
description: Maven repository to get dependencies from | ||
type: string | ||
- name: ACCESS_TOKEN | ||
type: string | ||
- name: BUILD_ID | ||
type: string | ||
- name: caTrustConfigMapName | ||
type: string | ||
- name: ENABLE_INDY_PROXY | ||
type: string | ||
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE | ||
type: string | ||
workspaces: | ||
- name: source | ||
description: Workspace containing the source code | ||
# - name: ssh-directory | ||
# configMap: | ||
# name: ssh-directory | ||
tasks: | ||
- name: git-clone | ||
params: | ||
- name: url | ||
value: $(params.URL) | ||
- name: revision | ||
value: $(params.REVISION) | ||
- name: verbose | ||
value: 'true' | ||
taskRef: | ||
resolver: bundles | ||
params: | ||
- name: name | ||
value: git-clone | ||
- name: bundle | ||
value: quay.io/konflux-ci/tekton-catalog/task-git-clone:0.1 | ||
- name: kind | ||
value: task | ||
workspaces: | ||
- name: output | ||
workspace: source | ||
# - name: ssh-directory | ||
# workspace: ssh-directory | ||
- name: pre-build | ||
runAfter: | ||
- git-clone | ||
params: | ||
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE | ||
value: $(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE) | ||
- name: IMAGE_URL | ||
value: $(params.QUAY_REPO):trusted-source-$(context.pipelineRun.name) | ||
- name: NAME | ||
value: $(context.pipelineRun.name) | ||
- name: RECIPE_IMAGE | ||
value: $(params.RECIPE_IMAGE) | ||
- name: BUILD_TOOL | ||
value: $(params.BUILD_TOOL) | ||
- name: BUILD_TOOL_VERSION | ||
value: $(params.BUILD_TOOL_VERSION) | ||
- name: JAVA_VERSION | ||
value: $(params.JAVA_VERSION) | ||
- name: BUILD_SCRIPT | ||
value: $(params.BUILD_SCRIPT) | ||
# TODO: Below is needed for deploy-pre-build-source step and could be skipped if its removed. | ||
- name: SCM_URL | ||
value: $(params.URL) | ||
- name: SCM_HASH | ||
value: $(params.REVISION) | ||
taskRef: | ||
resolver: http | ||
params: | ||
- name: url | ||
value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/pre-build.yaml | ||
workspaces: | ||
- name: source | ||
workspace: source | ||
|
||
- name: buildah-oci-ta | ||
runAfter: | ||
- pre-build | ||
params: | ||
- name: SOURCE_ARTIFACT | ||
value: $(tasks.pre-build.results.PRE_BUILD_IMAGE_DIGEST) | ||
- name: HERMETIC | ||
value: "false" | ||
- name: IMAGE # output image | ||
value: $(params.QUAY_REPO):build-$(context.pipelineRun.name) | ||
- name: DOCKERFILE # local path to the containerfile | ||
value: .jbs/Containerfile | ||
- name: caTrustConfigMapName | ||
value: $(params.caTrustConfigMapName) | ||
- name: ENABLE_INDY_PROXY | ||
value: $(params.ENABLE_INDY_PROXY) | ||
- name: BUILD_ARGS #TODO this should be baked in the OCI source image only a ACCESS_TOKEN should be passed | ||
value: | ||
- PROXY_URL=$(params.MVN_REPO_DEPENDENCIES_URL) | ||
- BUILD_ID=$(params.BUILD_ID) | ||
- ACCESS_TOKEN=$(params.ACCESS_TOKEN) | ||
taskRef: | ||
#resolver: bundles | ||
#params: | ||
# - name: name | ||
# value: buildah-oci-ta | ||
# - name: bundle | ||
# value: quay.io/konflux-ci/tekton-catalog/task-buildah-oci-ta:0.2 | ||
# - name: kind | ||
# value: task | ||
|
||
resolver: http | ||
params: | ||
- name: url | ||
value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/buildah-oci-ta.yaml | ||
|
||
- name: maven-deployment | ||
runAfter: | ||
- buildah-oci-ta | ||
params: | ||
- name: JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE | ||
value: $(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE) | ||
- name: IMAGE_URL | ||
value: $(tasks.buildah-oci-ta.results.IMAGE_URL) | ||
- name: IMAGE_DIGEST | ||
value: $(tasks.buildah-oci-ta.results.IMAGE_DIGEST) | ||
- name: MVN_REPO | ||
value: $(params.MVN_REPO_DEPLOY_URL) | ||
- name: ACCESS_TOKEN | ||
value: $(params.ACCESS_TOKEN) | ||
taskRef: | ||
resolver: http | ||
params: | ||
- name: url | ||
value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/maven-deployment.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
|
||
# Task Definitions | ||
|
||
Note that while `pre-build.yaml` and `maven-deployment.yaml` are created by our team the `buildah-oci-yaml` is a temporary copy from https://github.com/konflux-ci/build-definitions/blob/main/task/buildah-oci-ta/0.2/buildah-oci-ta.yaml. | ||
|
||
|
||
## buildah-oci-ta | ||
|
||
It should be base-lined to the most recent definition from Konflux build-definitions repository and then the following changes should be applied to that: | ||
|
||
### Indy Sidecar | ||
Adds Indy configuration to the build: | ||
* https://github.com/redhat-appstudio/jvm-build-service/blob/main/deploy/tasks/buildah-oci-ta.yaml#L134-L137 | ||
* https://github.com/redhat-appstudio/jvm-build-service/blob/main/deploy/tasks/buildah-oci-ta.yaml#L170-L180 | ||
* https://github.com/redhat-appstudio/jvm-build-service/blob/main/deploy/tasks/buildah-oci-ta.yaml#L737-L757 | ||
|
||
|
||
### Trusted CA | ||
Adds the trusted ca to the build: | ||
* https://github.com/redhat-appstudio/jvm-build-service/blob/main/deploy/tasks/buildah-oci-ta.yaml#L504-L508 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
FROM registry.access.redhat.com/ubi8/openjdk-21@sha256:5ab904e6262629fca79d6f65fa859bfa376405522d2f660bdbfaaae2742586f1 AS builder | ||
|
||
USER root | ||
RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y git | ||
|
||
USER 185 | ||
WORKDIR /work | ||
COPY ./ . | ||
|
||
RUN mvn -V -B package -pl cli -am -DskipTests | ||
# Quarkus GitInfo causes injection failure if there isn't a git commit to use. | ||
RUN git init && \ | ||
git config user.email "[email protected]" && \ | ||
git config user.name "HACBS" && \ | ||
git add cli && git commit -m "CLI" -a && \ | ||
mvn -V -B package -pl cli -am -DskipTests | ||
|
||
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime@sha256:c1bf8370627eaed6711ea22915b476d4216517c35c8f8268c0d39ed983bceaff | ||
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime@sha256:0a8cf41082f11f5bc56bd9438851e54593e17051df49592e953fb59376c7d539 | ||
WORKDIR /work/ | ||
|
||
COPY --from=builder /work/cli/target/quarkus-app/lib/ /deployments/lib/ | ||
|
Oops, something went wrong.