Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Fix up release pipeline #47

Merged
merged 2 commits into from
Jun 21, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/auto-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Release Version
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v*"

jobs:
auto-release:
runs-on: ubuntu-18.04
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref_name, '-alpha.') && !contains(github.ref_name, '-beta.')
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -18,3 +19,20 @@ jobs:
files: |
storageos-etcd-cluster-operator.yaml
config/samples/storageos-etcd-cluster.yaml


auto-prerelease:
runs-on: ubuntu-18.04
if: startsWith(github.ref, 'refs/tags/v') && (contains(github.ref_name, '-alpha.') || contains(github.ref_name, '-beta.'))
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Make manifest
run: make uber
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
files: |
storageos-etcd-cluster-operator.yaml
config/samples/storageos-etcd-cluster.yaml
11 changes: 4 additions & 7 deletions .github/workflows/release-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@ jobs:
registry: docker.io
username: ${{ secrets.DH_USERNAME }}
password: ${{ secrets.DH_PASSWORD }}
- name: Build container image
run: make docker-build
- name: Push container image to dockerhub
run: make docker-push

- name: Login to quay container registry
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.RED_HAT_QUAY_CLI_USERNAME }}
password: ${{ secrets.RED_HAT_QUAY_CLI_PASSWORD }}
- name: Push container image to quay container registry
run: make docker-push-quay
- name: Build container image
run: make docker-build
- name: Push container image to dockerhub and quay
run: make docker-push

publish-manifests-image:
runs-on: ubuntu-latest
Expand Down
26 changes: 3 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GO_VERSION ?= 1.14
GO := $(or $(shell which go${GO_VERSION}),$(shell which go))

# Docker image configuration
# Docker images are published to https://quay.io/repository/improbable-eng/etcd-cluster-operator
# Docker images are published to https://quay.io/repository/storageos/etcd-cluster-operator
DOCKER_TAG ?= ${VERSION}
DOCKER_REPO ?= storageos
DOCKER_IMAGES ?= controller proxy backup-agent restore-agent
Expand Down Expand Up @@ -233,46 +233,26 @@ docker-build-%: FORCE
--build-arg BACKUP_AGENT_IMAGE=${DOCKER_IMAGE_BACKUP_AGENT} \
--build-arg RESTORE_AGENT_IMAGE=${DOCKER_IMAGE_RESTORE_AGENT} \
--tag ${DOCKER_REPO}/${DOCKER_IMAGE_NAME_PREFIX}$*:${DOCKER_TAG} \
--file Dockerfile \
${CURDIR}
FORCE:

.PHONY: docker-build-quay
docker-build-quay: ## Build the all the docker images
docker-build-quay: $(addprefix docker-build-quay-,$(DOCKER_IMAGES))

docker-build-quay-%: FORCE
docker build --target $* \
--build-arg GO_VERSION=${GO_VERSION} \
--build-arg VERSION=$(VERSION) \
--build-arg BACKUP_AGENT_IMAGE=${DOCKER_IMAGE_BACKUP_AGENT} \
--build-arg RESTORE_AGENT_IMAGE=${DOCKER_IMAGE_RESTORE_AGENT} \
--tag quay.io/${DOCKER_REPO}/${DOCKER_IMAGE_NAME_PREFIX}$*:${DOCKER_TAG} \
--file Dockerfile \
${CURDIR}
FORCE:

FORCE:

.PHONY: docker-push
docker-push: ## Push all the docker images
docker-push: $(addprefix docker-push-,$(DOCKER_IMAGES))

docker-push-%: FORCE
docker push ${DOCKER_REPO}/${DOCKER_IMAGE_NAME_PREFIX}$*:${DOCKER_TAG}
docker push quay.io/${DOCKER_REPO}/${DOCKER_IMAGE_NAME_PREFIX}$*:${DOCKER_TAG}
FORCE:

# Run the supplied make target argument in a temporary workspace and diff the results.
verify-%: FORCE
./hack/verify.sh ${MAKE} -s $*
FORCE:

.PHONY: docker-push-quay
docker-push-quay: ## Push all the docker images
docker-push-quay: $(addprefix docker-push-quay-,$(DOCKER_IMAGES))

docker-push-quay-%: FORCE
docker push quay.io/${DOCKER_REPO}/${DOCKER_IMAGE_NAME_PREFIX}$*:${DOCKER_TAG}
FORCE:

# Run the supplied make target argument in a temporary workspace and diff the results.
verify-%: FORCE
Expand Down