Skip to content

Commit 1842314

Browse files
committed
add release pipeline
1 parent 384c814 commit 1842314

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,5 +252,8 @@ jobs:
252252
run: echo "$QUAY_BOT_PASSWORD" | docker login -u "$QUAY_BOT_USERNAME" --password-stdin quay.io
253253
- name: Build and Push images
254254
run: |
255+
export IMG=quay.io/pulp/pulp-operator:nightly
256+
export CATALOG_IMG=quay.io/pulp/pulp-operator-catalog:nightly
257+
export BUNDLE_IMG=quay.io/pulp/pulp-operator-bundle:nightly
255258
make docker-buildx bundle-build bundle-push catalog-build catalog-push
256259
shell: bash

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Release Image
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: ./.github/actions/pre-reqs
12+
with:
13+
deploy: true
14+
- name: Quay login
15+
env:
16+
QUAY_BOT_PASSWORD: ${{ secrets.QUAY_BOT_PASSWORD }}
17+
QUAY_BOT_USERNAME: pulp+github
18+
run: echo "$QUAY_BOT_PASSWORD" | docker login -u "$QUAY_BOT_USERNAME" --password-stdin quay.io
19+
- name: Build and Push images
20+
run: |
21+
make docker-buildx bundle-build bundle-push catalog-build catalog-push
22+
shell: bash

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
CR_KIND ?= Pulp
2-
LOWER_CR_KIND = $(shell echo $(CR_KIND) | tr A-Z a-z)
3-
CR_PLURAL ?= pulps
4-
CR_DOMAIN ?= pulpproject.org
5-
APP_IMAGE ?= quay.io/pulp/pulp-minimal
6-
WEB_IMAGE ?= quay.io/pulp/pulp-web
7-
81
# VERSION defines the project version for the bundle.
92
# Update this value when you upgrade the version of your project.
103
# To re-generate a bundle for another specific version without changing the standard setup, you can:
@@ -41,7 +34,7 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
4134
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
4235
# pulpproject.org/pulp-operator-bundle:$VERSION and pulpproject.org/pulp-operator-catalog:$VERSION.
4336
#IMAGE_TAG_BASE ?= pulpproject.org/pulp-operator
44-
IMAGE_TAG_BASE ?= quay.io/pulp/$(LOWER_CR_KIND)-operator
37+
IMAGE_TAG_BASE ?= quay.io/pulp/pulp-operator
4538

4639
# BUNDLE_IMG defines the image:tag used for the bundle.
4740
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
@@ -60,7 +53,7 @@ endif
6053

6154
# Image URL to use all building/pushing image targets
6255
IMG ?= $(IMAGE_TAG_BASE):v$(VERSION)
63-
NAMESPACE ?= $(LOWER_CR_KIND)-operator-system
56+
NAMESPACE ?= pulp-operator-system
6457
WATCH_NAMESPACE ?= $(NAMESPACE)
6558

6659
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -115,9 +108,9 @@ help: ## Display this help.
115108
.PHONY: manifests
116109
manifests: tidy controller-gen crd-to-markdown ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
117110
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
118-
$(CRD_MARKDOWN) -f apis/repo-manager.$(CR_DOMAIN)/v1/pulp_types.go -n $(CR_KIND) > controllers/repo_manager/README.md
119-
$(CRD_MARKDOWN) -f apis/repo-manager.$(CR_DOMAIN)/v1/pulp_backup_types.go -n $(CR_KIND)Backup > controllers/backup/README.md
120-
$(CRD_MARKDOWN) -f apis/repo-manager.$(CR_DOMAIN)/v1/pulp_restore_types.go -n $(CR_KIND)Restore > controllers/restore/README.md
111+
$(CRD_MARKDOWN) -f apis/repo-manager.pulpproject.org/v1/pulp_types.go -n Pulp > controllers/repo_manager/README.md
112+
$(CRD_MARKDOWN) -f apis/repo-manager.pulpproject.org/v1/pulp_backup_types.go -n PulpBackup > controllers/backup/README.md
113+
$(CRD_MARKDOWN) -f apis/repo-manager.pulpproject.org/v1/pulp_restore_types.go -n PulpRestore > controllers/restore/README.md
121114

122115
.PHONY: generate
123116
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -216,7 +209,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
216209

217210
.PHONY: local
218211
local: kustomize ## Run controller in the K8s cluster specified in ~/.kube/config.
219-
.ci/scripts/local.sh $(CR_KIND) $(CR_DOMAIN) $(CR_PLURAL) $(APP_IMAGE) $(WEB_IMAGE)
212+
.ci/scripts/local.sh Pulp pulpproject.org pulps quay.io/pulp/pulp-minimal quay.io/pulp/pulp-web
220213

221214
.PHONY: deploy
222215
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.

0 commit comments

Comments
 (0)