Skip to content

Commit

Permalink
Updated jupyterhub tagging in the GitHub action and created placehold…
Browse files Browse the repository at this point in the history
…ers for hub and lab (#130)

* Fixed github action and created placeholder for hub and lab

* removed incore utilites folder

* removed versioning for hub using incore utilities

* Added list option in github action for debugging

* modified dockerfile for correct copy of quota.json

* give full path to fix  quota.json copy error

* make github action to fetch full directory

* make github action to fetch full directory
  • Loading branch information
ywkim312 authored Sep 24, 2024
1 parent 2464012 commit cf3ba1d
Show file tree
Hide file tree
Showing 20 changed files with 16 additions and 4,465 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ jobs:
steps:
# checkout source code
- uses: actions/checkout@v3
with:
fetch-depth: 0 # ensure full repo is checked out

# calculate component version information
- name: component version information
run: |
CHANNEL=$(cat config.yml | grep "Channel" | head -1 | awk -F ": " '{print $2}' | sed 's/["[:space:]]//g')
INCORE_VERSION=$(cat config.yml | grep "INCORE_VERSION" | head -1 | awk -F= "{print $2 }" | sed "s/[[:alpha:]|,|-|\"|:|#|[:space:]_]//g" | sed "s/-//g")
PYINCORE_VERSION=$(cat config.yml | grep "PyIncore" | head -1 | awk -F: '{print $2}' | tr -d '"|[:space:]' | sed 's/-//g')
PYINCORE_VIZ_VERSION=$(cat config.yml | grep "PyIncore-Viz" | head -1 | awk -F: '{print $2}' | tr -d '"|[:space:]' | sed 's/-//g')
PYINCORE_DATA_VERSION=$(cat config.yml | grep "PyIncore-Data" | head -1 | awk -F: '{print $2}' | tr -d '"|[:space:]' | sed 's/-//g')
CHANNEL=$(cat lab/config.yml | grep "Channel" | head -1 | awk -F ": " '{print $2}' | sed 's/["[:space:]]//g')
INCORE_VERSION=$(cat lab/config.yml | grep "INCORE_VERSION" | head -1 | awk -F= "{print $2 }" | sed "s/[[:alpha:]|,|-|\"|:|#|[:space:]_]//g" | sed "s/-//g")
PYINCORE_VERSION=$(cat lab/config.yml | grep "PyIncore" | head -1 | awk -F: '{print $2}' | tr -d '"|[:space:]' | sed 's/-//g')
PYINCORE_VIZ_VERSION=$(cat lab/config.yml | grep "PyIncore-Viz" | head -1 | awk -F: '{print $2}' | tr -d '"|[:space:]' | sed 's/-//g')
PYINCORE_DATA_VERSION=$(cat lab/config.yml | grep "PyIncore-Data" | head -1 | awk -F: '{print $2}' | tr -d '"|[:space:]' | sed 's/-//g')
echo "CHANNEL=${CHANNEL}" >> $GITHUB_ENV
echo "INCORE_VERSION=${INCORE_VERSION}" >> $GITHUB_ENV
echo "PYINCORE_VERSION=${PYINCORE_VERSION}" >> $GITHUB_ENV
Expand Down Expand Up @@ -84,11 +86,7 @@ jobs:
# figure out the versions
if [ "$BRANCH" == "main" ]; then
if [ "${{ matrix.name }}" == "hub" ]; then
version=$(grep '"version"' incore_utilities/package.json | sed 's/.*"\([0-9\.]*\)", *$/\1/')
else
version=$(awk '/^## / { print tolower($2) }' CHANGELOG.md | head -1 | sed 's/^.//;s/.$//')
fi
tags="latest"
oldversion=""
while [ "${oldversion}" != "${version}" ]; do
Expand Down Expand Up @@ -188,7 +186,7 @@ jobs:
with:
push: true
platforms: "linux/amd64"
file: Dockerfile.${{ matrix.name }}
file: ${{ matrix.name }}/Dockerfile
cache-from: type=gha,scope=${{ env.BRANCH }}-${{ matrix.name }}
cache-to: type=gha,scope=${{ env.BRANCH }}-${{ matrix.name }},mode=max
tags: ${{ env.TAGS }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Changed
- Hub containers versioning has been updated to use the changelog [#127](https://github.com/IN-CORE/incore-lab/issues/127)
- Separated code for lab and hub using their own placeholder [#128](https://github.com/IN-CORE/incore-lab/issues/128)
- Removed incore utilities code [#129](https://github.com/IN-CORE/incore-lab/issues/129)

## [1.8.0] - 2024-08-21
### Changed
- Updated base image forJupyterLab to 4.1 [#122](https://github.com/IN-CORE/incore-lab/issues/122)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.hub → hub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM jupyterhub/k8s-hub:3.0.2

USER root
WORKDIR /tmp/authenticator/
COPY authenticator /tmp/authenticator/
COPY authenticator/quota.json /etc/quota.json
COPY hub/authenticator /tmp/authenticator/
COPY hub/authenticator/quota.json /etc/quota.json
RUN pip3 install /tmp/authenticator
USER jovyan

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit cf3ba1d

Please sign in to comment.