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

Use CodeFlare machine user to push PR into OpenShift community operators repository #170

Merged
merged 2 commits into from
Jul 7, 2023
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
8 changes: 4 additions & 4 deletions .github/workflows/tag-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ jobs:

- name: Build bundle and create PR in OpenShift community operators repository
run: |
git config --global user.email "codeflare-ci@redhat.com"
git config --global user.name "CodeFlare CI"
git config --global user.email "138894154+codeflare-[email protected].com"
git config --global user.name "codeflare-machine-account"
make openshift-community-operator-release
env:
VERSION: ${{ github.event.inputs.version }}
PREVIOUS_VERSION: ${{ github.event.inputs.replaces }}
INSTASCALE_VERSION: ${{ github.event.inputs.instascale-version }}
MCAD_VERSION: ${{ github.event.inputs.mcad-version }}
GH_TOKEN: ${{ secrets.GH_PAT }}
GH_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
IMAGE_ORG_BASE: quay.io/${{ github.event.inputs.quay-organization }}
OPERATORS_REPO_FORK_ORG: ${{ github.event.inputs.community-operators-prod-fork-organization }}
OPERATORS_REPO_ORG: ${{ github.event.inputs.community-operators-prod-organization }}
Expand All @@ -125,7 +125,7 @@ jobs:
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update dependency versions for release ${{ github.event.inputs.version }}
file_pattern: 'README.md controllers/defaults.go *.yaml *.tmpl Makefile'
file_pattern: 'README.md controllers/defaults.go *.yaml Makefile'

- name: Creates a release in GitHub
run: |
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ VERSION ?= v0.0.0-dev
BUNDLE_VERSION ?= $(VERSION:v%=%)

# INSTASCALE_VERSION defines the default version of the InstaScale controller
INSTASCALE_VERSION ?= v0.0.4
INSTASCALE_VERSION ?= v0.0.5

# MCAD_VERSION defines the default version of the MCAD controller
MCAD_VERSION ?= v1.31.0
MCAD_VERSION ?= v1.32.0
# MCAD_REF, MCAD_REPO and MCAD_CRD define the reference to MCAD CRD resources
MCAD_REF ?= release-${MCAD_VERSION}
MCAD_REPO ?= github.com/project-codeflare/multi-cluster-app-dispatcher
Expand Down Expand Up @@ -368,11 +368,11 @@ bundle-push: ## Push the bundle image.

.PHONY: openshift-community-operator-release
openshift-community-operator-release: install-gh-cli bundle ## build bundle and create PR in OpenShift community operators repository
git clone https://$(GH_TOKEN)@github.com/$(OPERATORS_REPO_FORK_ORG)/community-operators-prod.git
git clone https://x-access-token:$(GH_TOKEN)@github.com/$(OPERATORS_REPO_FORK_ORG)/community-operators-prod.git
cd community-operators-prod && git remote add upstream https://github.com/$(OPERATORS_REPO_ORG)/community-operators-prod.git && git pull upstream main && git push origin main
cp -r bundle community-operators-prod/operators/codeflare-operator/$(BUNDLE_VERSION)
cd community-operators-prod && git checkout -b codeflare-release-$(BUNDLE_VERSION) && git add operators/codeflare-operator/$(BUNDLE_VERSION)/* && git commit -m "add bundle manifests codeflare version $(BUNDLE_VERSION)" && git push origin codeflare-release-$(BUNDLE_VERSION)
gh pr create --repo $(OPERATORS_REPO_FORK_ORG)/community-operators-prod --title "CodeFlare $(BUNDLE_VERSION)" --body "New release of codeflare operator" --head $(OPERATORS_REPO_ORG):codeflare-release-$(BUNDLE_VERSION) --base main
cd community-operators-prod && git checkout -b codeflare-release-$(BUNDLE_VERSION) && git add operators/codeflare-operator/$(BUNDLE_VERSION)/* && git commit -m "add bundle manifests codeflare version $(BUNDLE_VERSION)" --signoff && git push origin codeflare-release-$(BUNDLE_VERSION)
gh pr create --repo $(OPERATORS_REPO_ORG)/community-operators-prod --title "CodeFlare $(BUNDLE_VERSION)" --body "New release of codeflare operator" --head $(OPERATORS_REPO_FORK_ORG):codeflare-release-$(BUNDLE_VERSION) --base main
rm -rf community-operators-prod

.PHONY: opm
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ CodeFlare Stack Compatibility Matrix

| Component | Version |
|------------------------------|---------|
| CodeFlare Operator | v0.0.4 |
| Multi-Cluster App Dispatcher | v1.31.0 |
| CodeFlare-SDK | v0.4.4 |
| InstaScale | v0.0.4 |
| CodeFlare Operator | v0.0.5 |
| Multi-Cluster App Dispatcher | v1.32.0 |
| CodeFlare-SDK | v0.5.0 |
| InstaScale | v0.0.5 |
| KubeRay | v0.5.0 |
<!-- Compatibility Matrix end -->

Expand Down
4 changes: 2 additions & 2 deletions controllers/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ package controllers
// ***********************

const (
MCADImage = "quay.io/project-codeflare/mcad-controller:release-v1.31.0"
InstaScaleImage = "quay.io/project-codeflare/instascale-controller:v0.0.4"
MCADImage = "quay.io/project-codeflare/mcad-controller:release-v1.32.0"
InstaScaleImage = "quay.io/project-codeflare/instascale-controller:v0.0.5"
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: instascale
args:
- "--configs-namespace=default"
image: quay.io/project-codeflare/instascale-controller:v0.0.4
image: quay.io/project-codeflare/instascale-controller:v0.0.5
resources:
limits:
cpu: '2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- name: instascale
args:
- "--configs-namespace=default"
image: quay.io/project-codeflare/instascale-controller:v0.0.4
image: quay.io/project-codeflare/instascale-controller:v0.0.5
resources:
limits:
cpu: '1'
Expand Down