Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2024a] Sync 2024a branch with all the commit of main branch #559

Merged
merged 18 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bf0b553
Intel AI Tools Images rebased
sharvil10 May 28, 2024
da7c9da
Run the static code checks on push and when manually triggered
jiridanek May 29, 2024
feae009
Update file via digest-updater-9314210216 GitHub action
github-actions[bot] May 31, 2024
28e9828
Merge pull request #550 from opendatahub-io/digest-updater-9314210216
harshad16 May 31, 2024
691f7fe
Updated notebooks via odh-sync-updater-9401865801 GitHub action
codeflare-machine-account Jun 6, 2024
dbd4c21
Merge pull request #547 from jiridanek/jd_run_static_checks_on_push_too
openshift-merge-bot[bot] Jun 6, 2024
66050e6
Merge pull request #544 from sharvil10/sharvils/intel-ai-tools-rebase
openshift-merge-bot[bot] Jun 6, 2024
e9c3f9a
RHOAIENG-8255: Fix spawn-fcgi-1.6.3-23.fc37.x86_64.rpm download location
jiridanek Jun 6, 2024
ab0f785
fixup from review, use a little bit more proper rpm link
jiridanek Jun 7, 2024
2d8899f
Merge pull request #553 from jiridanek/jd_fsomething_cgi_workaround
openshift-merge-bot[bot] Jun 7, 2024
8e19ee2
RHOAIENG-8299: Fix CentOS Stream 8 download location
jiridanek Jun 7, 2024
ed22ccd
Merge pull request #554 from jiridanek/jd_temporary_workaround_centos…
openshift-merge-bot[bot] Jun 10, 2024
5c4029b
RHOAIENG-7525: Build opendatahub-io/notebooks in GitHub Action with c…
jiridanek May 22, 2024
4d4841f
Merge pull request #543 from jiridanek/jd_try_dep_inside_nodes
openshift-merge-bot[bot] Jun 12, 2024
1fb7f57
Add launch.json configuration on .vscode directory together with sett…
atheo89 Jun 12, 2024
2c36c11
Merge pull request #556 from atheo89/python-path
openshift-merge-bot[bot] Jun 13, 2024
583dcd3
Merge pull request #552 from project-codeflare/odh-sync-updater-94018…
harshad16 Jun 13, 2024
2660de8
Merge branch 'main' of github.com:opendatahub-io/notebooks into sync-…
harshad16 Jun 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/build-notebooks-TEMPLATE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# inspired by
# https://github.com/thesuperzapper/kubeflow/blob/master/.github/workflows/example_notebook_servers_publish_TEMPLATE.yaml
---
name: Build & Publish Notebook Servers (TEMPLATE)
"on":
workflow_call:
inputs:
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
# https://docs.github.com/en/actions/learn-github-actions/contexts
target:
required: true
description: "make target to build"
type: string
github:
required: true
description: "top workflow's `github`"
type: string

jobs:
build:
runs-on: ubuntu-latest
env:
# GitHub image registry used for storing $(CONTAINER_ENGINE)'s cache
CACHE: "ghcr.io/${{ github.repository }}/workbench-images/build-cache"

steps:

- uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/containers/buildah/issues/2521#issuecomment-884779112
- name: Workaround https://github.com/containers/podman/issues/22152#issuecomment-2027705598
run: sudo apt-get -qq remove podman crun

- uses: actions/cache@v4
id: cached-linuxbrew
with:
path: /home/linuxbrew/.linuxbrew
key: linuxbrew

- name: Install podman
if: steps.cached-linuxbrew.outputs.cache-hit != 'true'
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/home/linuxbrew/.linuxbrew/bin/brew install podman

- name: Add linuxbrew to PATH
run: echo "/home/linuxbrew/.linuxbrew/bin/" >> $GITHUB_PATH

- name: Configure Podman
run: |
mkdir -p $HOME/.config/containers/
cp ci/cached-builds/containers.conf $HOME/.config/containers/containers.conf
cp ci/cached-builds/storage.conf $HOME/.config/containers/storage.conf
# should at least reset storage when touching storage.conf
sudo mkdir -p /mnt/containers/
sudo chown -R $USER:$USER /mnt/containers
podman system reset --force
# podman bug? need to create this _after_ doing the reset
mkdir -p /mnt/containers/tmp

# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push
- name: "push: make ${{ inputs.target }}"
run: "make ${{ inputs.target }}"
if: "${{ fromJson(inputs.github).event_name == 'push' }}"
env:
IMAGE_TAG: "${{ github.ref_name }}_${{ github.sha }}"
IMAGE_REGISTRY: "ghcr.io/${{ github.repository }}/workbench-images"
CONTAINER_BUILD_CACHE_ARGS: "--cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"

# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
- name: "pull_request: make ${{ inputs.target }}"
run: |
# start a black hole container registry as make target always does a push
mkdir -p $HOME/.config/containers/registries.conf.d/
cp ci/cached-builds/insecure_localhost_registry.conf $HOME/.config/containers/registries.conf.d/insecure_localhost_registry.conf
go run ci/cached-builds/dev_null_container_registry.go &
# build and push the image
make ${{ inputs.target }}
if: "${{ fromJson(inputs.github).event_name == 'pull_request' }}"
env:
IMAGE_TAG: "${{ github.sha }}"
IMAGE_REGISTRY: "localhost:5000/workbench-images"
CONTAINER_BUILD_CACHE_ARGS: "--cache-from ${{ env.CACHE }}"

- run: df -h
if: "${{ !cancelled() }}"
29 changes: 29 additions & 0 deletions .github/workflows/build-notebooks-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
"name": "Build Notebooks"
"permissions":
"packages": "read"
"on":
"pull_request":

jobs:
gen:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.gen.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- run: python3 ci/cached-builds/gen_gha_matrix_jobs.py
id: gen

# base images
build:
needs: ["gen"]
strategy:
fail-fast: false
matrix: "${{ fromJson(needs.gen.outputs.matrix) }}"
uses: ./.github/workflows/build-notebooks-TEMPLATE.yaml
with:
target: "${{ matrix.target }}"
github: "${{ toJSON(github) }}"
secrets: inherit
Loading