Skip to content

Commit

Permalink
feat(release): build a release package from a tag
Browse files Browse the repository at this point in the history
also add support for building and pushing rh releases on rhel
  • Loading branch information
ecordell committed Jul 11, 2018
1 parent 2d1292d commit 515b9ea
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,35 @@ ansible-release: $(YQ)
# link newest release into playbook
ln -sfF ../../../../deploy/aos-olm/$(ver) deploy/aos-olm/playbook/private/roles/olm

# make ver=0.3.0 release
release: tectonic-release upstream-release ansible-release
OLM_REF:=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/coreos/olm:$(ver))
CATALOG_REF:=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/coreos/catalog:$(ver))

# must have already tagged a version release in github so that the docker images are available
release:
ifndef ver
$(error ver is undefined)
endif
docker pull quay.io/coreos/olm:$(ver)
docker pull quay.io/coreos/catalog:$(ver)
yaml w -i deploy/upstream/values.yaml alm.image.ref $(OLM_REF)
yaml w -i deploy/upstream/values.yaml catalog.image.ref $(CATALOG_REF)
yaml w -i deploy/tectonic-alm-operator/values.yaml alm.image.ref $(OLM_REF)
yaml w -i deploy/tectonic-alm-operator/values.yaml catalog.image.ref $(CATALOG_REF)
$(MAKE) tectonic-release upstream-release

OLM_REF_RH:=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/coreos/olm:$(ver)-rhel)
CATALOG_REF_RH:=$(shell docker inspect --format='{{index .RepoDigests 0}}' quay.io/coreos/catalog:$(ver)-rhel)

# this will build locally on rhel
release-rh:
ifndef ver
$(error ver is undefined)
endif
docker build -f Dockerfile.rhel7 -t quay.io/coreos/olm:$(ver)-rhel -t quay.io/coreos/catalog:$(ver)-rhel .
docker push quay.io/coreos/olm:$(ver)-rhel
docker push quay.io/coreos/catalog:$(ver)-rhel
yaml w -i deploy/aos-olm/values.yaml alm.image.ref $(OLM_REF_RH)
yaml w -i deploy/aos-olm/values.yaml catalog.image.ref $(CATALOG_REF_RH)
$(MAKE) ansible-release

release-all: release release-rh

0 comments on commit 515b9ea

Please sign in to comment.