This repository has been archived by the owner on Mar 17, 2023. It is now read-only.
forked from jupyter-on-openshift/poc-hub-openshift-auth
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile to build and push the JupyterHub image
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |