Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BOP-251] Generate versioned manifest in CI #89

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/push-manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ jobs:
with:
env-file: .github/development.env

- name: Determine the build version
run: |
SEMVER=${GITHUB_REF#refs/*/}
echo "SEMVER=$SEMVER" >> $GITHUB_ENV

- name: Generate the manifest
run: |
VERSION=$SEMVER make build-operator-manifest

- name: Publish the manifest to the public blueprint repository
uses: softprops/action-gh-release@v1
with:
Expand All @@ -40,6 +49,16 @@ jobs:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
# This needs to be done first so that the tag is removed in the following steps
- name: Delete tag and release
continue-on-error: true
uses: dev-drprasad/[email protected]
with:
tag_name: dev
github_token: ${{ secrets.PAT_CI_BOUNDLESS }}
delete_release: true
repo: mirantiscontainers/blueprint-operator

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -48,6 +67,10 @@ jobs:
with:
env-file: .github/development.env

- name: Generate the manifest
run: |
VERSION=dev make build-operator-manifest

- name: Publish the manifest to the private operator repository
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Dockerfile.cross
*.swp
*.swo
*~

deploy/
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,9 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi

.PHONY: build-operator-manifest
build-operator-manifest: kustomize manifests ## builds mke operator manifest file
cd config/manager && $(KUSTOMIZE) edit set image ghcr.io/mirantiscontainers/blueprint-operator=${IMG}
@$(KUSTOMIZE) build config/default > ./deploy/static/blueprint-operator.yaml
# TODO: remove this once all references to boundless-operator.yaml are eliminated
cd deploy/static && ln -sf blueprint-operator.yaml boundless-operator.yaml
@cd config/manager && $(KUSTOMIZE) edit set image ghcr.io/mirantiscontainers/blueprint-operator=${IMG}
@mkdir -p deploy/static
@$(KUSTOMIZE) build config/default > deploy/static/blueprint-operator.yaml

##@ Build Dependencies

Expand Down
Loading
Loading