Generate OpenAPI schema in CI

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
pull/1256/head
Stefan Prodan 4 years ago
parent e3b12a8a24
commit 68046067c5
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF

@ -53,6 +53,17 @@ jobs:
make cmd/flux/manifests make cmd/flux/manifests
./manifests/scripts/bundle.sh "" ./output manifests.tar.gz ./manifests/scripts/bundle.sh "" ./output manifests.tar.gz
kustomize build ./manifests/install > ./output/install.yaml kustomize build ./manifests/install > ./output/install.yaml
- name: Build CRDs
run: |
kustomize build manifests/crds > all-crds.yaml
- name: Generate OpenAPI JSON schemas from CRDs
uses: fluxcd/pkg//actions/crdjsonschema@main
with:
crd: all-crds.yaml
output: schemas
- name: Archive the OpenAPI JSON schemas
run: |
tar -czvf ./output/crd-schemas.tar.gz -C schemas .
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1 uses: goreleaser/goreleaser-action@v1
with: with:

@ -72,6 +72,7 @@ publishers:
.github/aur/flux-go/publish.sh {{ .Version }} .github/aur/flux-go/publish.sh {{ .Version }}
release: release:
extra_files: extra_files:
- glob: ./output/crd-schemas.tar.gz
- glob: ./output/manifests.tar.gz - glob: ./output/manifests.tar.gz
- glob: ./output/install.yaml - glob: ./output/install.yaml
dockers: dockers:

@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/fluxcd/kustomize-controller/releases/download/v0.11.0/kustomize-controller.crds.yaml
- https://github.com/fluxcd/source-controller/releases/download/v0.11.0/source-controller.crds.yaml
- https://github.com/fluxcd/helm-controller/releases/download/v0.9.0/helm-controller.crds.yaml
- https://github.com/fluxcd/notification-controller/releases/download/v0.12.0/notification-controller.crds.yaml
- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.8.0/image-reflector-controller.crds.yaml
- https://github.com/fluxcd/image-automation-controller/releases/download/v0.8.0/image-automation-controller.crds.yaml
Loading…
Cancel
Save