File tree Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 6363 -B \
6464 -De2e.skip=false \
6565 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
66+ codegen :
67+ runs-on : ubuntu-latest
68+ services :
69+ registry :
70+ image : registry:2
71+ ports :
72+ - 5000:5000
73+ name : CRD Java Models Code Generation
74+ steps :
75+ - name : Publish to Registry
76+ uses : elgohr/Publish-Docker-Github-Action@master
77+ with :
78+ name : kubernetes-client/java/crd-model-gen
79+ tags : gh-action-tmp
80+ username : ${{ github.actor }}
81+ password : ${{ secrets.GITHUB_TOKEN }}
82+ registry : docker.pkg.github.com
83+ workdir : client-java-contrib
84+ no_push : true
85+ - name : Run Code-gen for Cert-Manager
86+ working-directory : ${{ github.workspace }}/client-java-contrib/cert-manager
87+ run : IMAGE_TAG=gh-action-tmp ./update.sh
88+ - name : Run Code-gen for Prometheus-Operator
89+ working-directory : ${{ github.workspace }}/client-java-contrib/prometheus-operator
90+ run : IMAGE_TAG=gh-action-tmp ./update.sh
91+
Original file line number Diff line number Diff line change 1616# This script generates the model classes from a released version of cert-manager CRDs
1717# under src/main/java/io/cert/manager/models.
1818
19+ IMAGE_NAME=${IMAGE_NAME: docker.pkg.github.com/ kubernetes-client/ java/ crd-model-gen}
20+ IMAGE_TAG=${IMAGE_TAG: v1.0.2}
21+
1922# a crdgen container is run in a way that:
2023# 1. it has access to the docker daemon on the host so that it is able to create sibling container on the host
2124# 2. it runs on the host network so that it is able to communicate with the KinD cluster it launched on the host
2225docker run \
2326 --rm \
2427 -v /var/run/docker.sock:/var/run/docker.sock \
2528 -v " $( pwd) " :" $( pwd) " \
26- -ti \
2729 --network host \
28- docker.pkg.github.com/kubernetes-client/java/crd-model-gen:v1.0.2 \
30+ ${IMAGE_NAME} : ${IMAGE_TAG} \
2931 /generate.sh \
3032 -u https://github.com/jetstack/cert-manager/releases/download/v0.16.1/cert-manager.crds.yaml \
3133 -n io.cert-manager \
Original file line number Diff line number Diff line change 1616# This script generates the model classes from a released version of cert-manager CRDs
1717# under src/main/java/io/cert/manager/models.
1818
19+ IMAGE_NAME=${IMAGE_NAME: docker.pkg.github.com/ kubernetes-client/ java/ crd-model-gen}
20+ IMAGE_TAG=${IMAGE_TAG: v1.0.2}
21+
1922# a crdgen container is run in a way that:
2023# 1. it has access to the docker daemon on the host so that it is able to create sibling container on the host
2124# 2. it runs on the host network so that it is able to communicate with the KinD cluster it launched on the host
2225docker run \
2326 --rm \
2427 -v /var/run/docker.sock:/var/run/docker.sock \
2528 -v " $( pwd) " :" $( pwd) " \
26- -ti \
2729 --network host \
28- docker.pkg.github.com/kubernetes-client/java/crd-model-gen:v1.0.2 \
30+ ${IMAGE_NAME} : ${IMAGE_TAG} \
2931 /generate.sh \
3032 -u https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.38.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml \
3133 -u https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.38.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml \
You can’t perform that action at this time.
0 commit comments