Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Add Makefile to build and push the JupyterHub image
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlin committed May 22, 2020
1 parent e36ea98 commit 7b62296
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
BASE_REPO=https://github.com/jupyter-on-openshift/jupyterhub-quickstart
BASE_REF=3.0.7
ODH_REPO=https://github.com/aicoe/jupyterhub-ocp-oauth
ODH_REF=master
COMMIT=$(shell git rev-parse --short HEAD)
REGISTRY=quay.io
REPO=odh-jupyterhub
VERSION=3.0.7
FINAL_IMG_VERSION=$(VERSION)-$(COMMIT)
FINAL_IMG_URL=$(REGISTRY)/$(REPO)/jupyterhub-img:$(FINAL_IMG_VERSION)
S2I_ARGS=--with-builder podman

all: build tag-jupyterhub-img push-jupyterhub-img

build: build-jupyterhub build-jupyterhub-img

build-jupyterhub:
$(eval TEMP_DIR := $(shell mktemp -d))
git clone $(BASE_REPO) ${TEMP_DIR}/base
cd $(TEMP_DIR)/base &&\
git checkout $(BASE_REF) &&\
s2i build $(S2I_ARGS) . registry.access.redhat.com/ubi7/python-36 jupyterhub:$(VERSION)

build-jupyterhub-img:
s2i build $(S2I_ARGS) . jupyterhub:$(VERSION) jupyterhub-img:$(FINAL_IMG_VERSION)

tag-jupyterhub-img:
podman tag jupyterhub-img:$(FINAL_IMG_VERSION) $(FINAL_IMG_URL)
push-jupyterhub-img:
podman push $(FINAL_IMG_URL)
clean:
rm -rf upload

0 comments on commit 7b62296

Please sign in to comment.