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 63
63
-B \
64
64
-De2e.skip=false \
65
65
-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 16
16
# This script generates the model classes from a released version of cert-manager CRDs
17
17
# under src/main/java/io/cert/manager/models.
18
18
19
+ IMAGE_NAME=${IMAGE_NAME: docker.pkg.github.com/ kubernetes-client/ java/ crd-model-gen}
20
+ IMAGE_TAG=${IMAGE_TAG: v1.0.2}
21
+
19
22
# a crdgen container is run in a way that:
20
23
# 1. it has access to the docker daemon on the host so that it is able to create sibling container on the host
21
24
# 2. it runs on the host network so that it is able to communicate with the KinD cluster it launched on the host
22
25
docker run \
23
26
--rm \
24
27
-v /var/run/docker.sock:/var/run/docker.sock \
25
28
-v " $( pwd) " :" $( pwd) " \
26
- -ti \
27
29
--network host \
28
- docker.pkg.github.com/kubernetes-client/java/crd-model-gen:v1.0.2 \
30
+ ${IMAGE_NAME} : ${IMAGE_TAG} \
29
31
/generate.sh \
30
32
-u https://github.com/jetstack/cert-manager/releases/download/v0.16.1/cert-manager.crds.yaml \
31
33
-n io.cert-manager \
Original file line number Diff line number Diff line change 16
16
# This script generates the model classes from a released version of cert-manager CRDs
17
17
# under src/main/java/io/cert/manager/models.
18
18
19
+ IMAGE_NAME=${IMAGE_NAME: docker.pkg.github.com/ kubernetes-client/ java/ crd-model-gen}
20
+ IMAGE_TAG=${IMAGE_TAG: v1.0.2}
21
+
19
22
# a crdgen container is run in a way that:
20
23
# 1. it has access to the docker daemon on the host so that it is able to create sibling container on the host
21
24
# 2. it runs on the host network so that it is able to communicate with the KinD cluster it launched on the host
22
25
docker run \
23
26
--rm \
24
27
-v /var/run/docker.sock:/var/run/docker.sock \
25
28
-v " $( pwd) " :" $( pwd) " \
26
- -ti \
27
29
--network host \
28
- docker.pkg.github.com/kubernetes-client/java/crd-model-gen:v1.0.2 \
30
+ ${IMAGE_NAME} : ${IMAGE_TAG} \
29
31
/generate.sh \
30
32
-u https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.38.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml \
31
33
-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