-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: introduce helpers for automation (#19)
* testt bundle * test * test * Add tests * customizable native operator build * test jvm * fix jvm * rename phase * enhance * add ci helpers
- Loading branch information
1 parent
e1bf893
commit e3e8b8f
Showing
9 changed files
with
300 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Make Operator Bundle | ||
description: | | ||
Make an operator bundle. This does not save the image for you. | ||
inputs: | ||
operator_bundle: | ||
description: "image uri for operator bundle (ie. ghcr.io/<namespace>/<image-name>:<tag>)" | ||
required: true | ||
operator: | ||
description: "image uri for operator (ie. ghcr.io/<namespace>/<image-name>:<tag>)" | ||
required: false | ||
default: "" | ||
server: | ||
description: "image uri for trustify server (ie. ghcr.io/<namespace>/<image-name>:<tag>)" | ||
required: false | ||
default: "" | ||
server_postgres: | ||
description: "image uri for trustify postgres (ie. ghcr.io/<namespace>/<image-name>:<tag>)" | ||
required: false | ||
default: "" | ||
version: | ||
description: "operator version" | ||
required: false | ||
default: "" | ||
channels: | ||
description: "comma separated channel(s) this operator should be available on" | ||
required: false | ||
default: "" | ||
push_bundle: | ||
description: "" | ||
required: false | ||
default: "false" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Make and Push bundle | ||
env: | ||
BUNDLE_IMG: ${{ inputs.operator_bundle }} | ||
run: | | ||
[ -n "${{ inputs.channels }}" ] && export CHANNELS="${{ inputs.channels }}" | ||
[ -n "${{ inputs.version }}" ] && export VERSION="${{ inputs.version }}" | ||
[ -n "${VERSION}" ] && export VERSION="${VERSION:1}" | ||
[ -n "${{ inputs.operator }}" ] && export IMG="${{ inputs.operator }}" | ||
OPTS="" | ||
[ -n "${{ inputs.server }}" ] && OPTS+=" -Drelated.image.server=${{ inputs.server }}" | ||
[ -n "${{ inputs.server_postgres }}" ] && OPTS+=" -Drelated.image.db=${{ inputs.server_postgres }}" | ||
QUARKUS_OPTS="${OPTS}" make bundle-build | ||
docker cp $(docker create --name download $BUNDLE_IMG ls):/manifests/trustify-operator.clusterserviceversion.yaml . && docker rm download | ||
cat trustify-operator.clusterserviceversion.yaml | ||
working-directory: ${{ github.action_path }}/../../.. | ||
shell: bash | ||
|
||
- name: Push bundle | ||
if: ${{ inputs.push_bundle == 'true' }} | ||
env: | ||
BUNDLE_IMG: ${{ inputs.operator_bundle }} | ||
run: | | ||
make bundle-push | ||
working-directory: ${{ github.action_path }}/../../.. | ||
shell: bash |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 AS build | ||
COPY --chown=quarkus:quarkus mvnw /code/mvnw | ||
COPY --chown=quarkus:quarkus .mvn /code/.mvn | ||
COPY --chown=quarkus:quarkus pom.xml /code/ | ||
USER quarkus | ||
WORKDIR /code | ||
RUN ./mvnw -B org.apache.maven.plugins:maven-dependency-plugin:3.1.2:go-offline | ||
COPY src/main /code/src/main | ||
RUN ./mvnw package -DskipTests | ||
|
||
FROM registry.access.redhat.com/ubi8/openjdk-21:1.19 | ||
ENV LANGUAGE='en_US:en' | ||
|
||
COPY --from=build --chown=185 /code/target/quarkus-app/lib/ /deployments/lib/ | ||
COPY --from=build --chown=185 /code/target/quarkus-app/*.jar /deployments/ | ||
COPY --from=build --chown=185 /code/target/quarkus-app/app/ /deployments/app/ | ||
COPY --from=build --chown=185 /code/target/quarkus-app/quarkus/ /deployments/quarkus/ | ||
|
||
EXPOSE 8080 | ||
USER 185 | ||
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" | ||
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" | ||
|
||
ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] |
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