Skip to content

Commit f7d2b08

Browse files
harshad16jiridanek
authored andcommitted
[fix] hadolint warnings to base and rstudio Dockerfiles
These changes shouldn't have any functional impact. [fix] CI for the images checks based on recent updates [fix] This fixes an inconsistency with the kustomize params Inconsistency for codeserver notebook parameters. There was upstream change recently that probably not got properly backported to downstream, see [1,2]. * [1] opendatahub-io#524 * [2] red-hat-data-services@ceb3dc8 Set the rstudio builds with the branch rhoai-2.10 Signed-off-by: Harshad Reddy Nalla <[email protected]> Update image commits for release N via digest-updater-9215094498 GitHub action Update images for release N via digest-updater-9215094498 GitHub action Update file via digest-updater-9213110410 GitHub action Allow runtime script to cp the package from bin to Rpackage default path Update codeflare-sdk version on imagestreams annotations (opendatahub-io#235) * Update codeflare-sdk version on imagestreams annotations * fix kfp version in the annotation for tensorflow Co-authored-by: Jan Stourac <[email protected]> Update images for release N and N-1 with 2024a commit db8bd76 Update file via digest-updater-8806399693 GitHub action Update annotations for kfp (opendatahub-io#229) Update image commits for release N via digest-updater-8665769109 GitHub action Update images for release N via digest-updater-8665769109 GitHub action Update manifest for code-freeze 2.9 Signed-off-by: Harshad Reddy Nalla <[email protected]> Update image commits for release N-1 via digest-updater-8581586298 GitHub action Update images for release N-1 via digest-updater-8581586298 GitHub action Update image commits for release N via digest-updater-8581586298 GitHub action Update images for release N via digest-updater-8581586298 GitHub action Update file via digest-updater-8577545330 GitHub action Fix the runtime updater github action branch 2024a Signed-off-by: Harshad Reddy Nalla <[email protected]> Fix the runtime updater github action Signed-off-by: Harshad Reddy Nalla <[email protected]> Remove the intel based image from the overlay as its ODH only - Fix the typo in the datascience notebook Signed-off-by: Harshad Reddy Nalla <[email protected]> Revert nginx version to 1.22 since 1.24 is not available on rhel yet update cuda layer for RHEL to 12.1 Add runtimes workflow updater Update digest updater workflow Fix check-params-env test with the new changes (opendatahub-io#196) Update Imagesteam for habana 1.13 Update runtime images with e1aee40 build commit Update the manifests to retain old image in shadow state Signed-off-by: Harshad Reddy Nalla <[email protected]> Update image commits for release N via digest-updater-8319475892 GitHub action Update images for release N via digest-updater-8319475892 GitHub action Update Codeserver ImageStream for the 2024a release inclusion (opendatahub-io#173) * Update Codeserver imagestream with the 2024a release Co-authored-by: Harshad Reddy Nalla <[email protected]> Fix test file for the trustyai image I don't really understand how and why this file was broken by this commit aac0662 . Our CI check notifies that something is broken in the file. Update Imagestreams with in favor of the new release 2024.1 (opendatahub-io#175) Co-authored-by: Harshad Reddy Nalla <[email protected]> Update digest updater workflow in favor 2024a release Remove opendatahub.io/dashboard: 'true' label from rstudio ImageSteams Create sync workflow for the release-2024a Format yaml and json files to statisfy code-quality - Fix validation of the params-env Signed-off-by: Harshad Reddy Nalla <[email protected]> Update RStudio-server Dockefile for RHEL version Fix library path version on rsession.conf file hot fix: bump cuda resources HotFix: Remove the annotation notebook-images=true from RStudio imagestreams Signed-off-by: Harshad Reddy Nalla <[email protected]> Fix user R library path version Update image commits for release N via digest-updater-7846262944 GitHub action Update images for release N via digest-updater-7846262944 GitHub action Remove the R-package install from workbench Co-authored-by: Diamond Bryant <[email protected]> Signed-off-by: Harshad Reddy Nalla <[email protected]> Fix naming for RStudio Server on rhel flavor Increase build resources for R Studio buildconfigs Mount the secret on the buildConfig instead of using ENVs to avoid their expose on the logs Adjust the imagestream annotation for codeflare-sdk upgrade Signed-off-by: Harshad Reddy Nalla <[email protected]> Update image commits for release N via digest-updater-7761501425 GitHub action Update images for release N via digest-updater-7761501425 GitHub action Add optional: true option for the base and server url envs Add BuildConfiguration objects to build RStudio and CUDA RStudio images on OCP cluster Fixes on the CUDA Dockerfile setup r-studio based with rhel9 base image (opendatahub-io#125) * Content of R Studio switched to the rhel based image. Add rhel9 base image [Fix] typo in logging of the `notebook-digest-updater.yaml` Update image commits for release N via digest-updater-7533330854 GitHub action Update images for release N-1 via digest-updater-7533330854 GitHub action Update images for release N via digest-updater-7533330854 GitHub action Fix: update the code-server and annotation Signed-off-by: Harshad Reddy Nalla <[email protected]> Co-authored-by: aTheo <[email protected]> Incorporate VSCode on Downstream (opendatahub-io#105) Co-authored-by: Harshad Reddy Nalla <[email protected]> hot-fix: Fix the tensorflow imagestream by removing the trailing space Signed-off-by: Harshad Reddy Nalla <[email protected]> hot-fix: Fix the imagestream minimal-cuda sha Signed-off-by: Harshad Reddy Nalla <[email protected]> hot-fix: Fixed imagestream with CVE 44487 changes Signed-off-by: Harshad Reddy Nalla <[email protected]> hot-fix: update the base ubi9 images for cve 44487 fix Signed-off-by: Harshad Reddy Nalla <[email protected]> hot-fix: CVE 44487 fix with libnghttp2 Signed-off-by: Harshad Reddy Nalla <[email protected]> Update the pipfile.lock via the weekly workflow action chores: Update the runtime image with the commit: 8bda2fa Signed-off-by: Harshad Reddy Nalla <[email protected]> Patch the imagestream by removing habana 1.11.0 Signed-off-by: Harshad Reddy Nalla <[email protected]> Update the runtime image with the commit: 8bda2fa on main Update images for release N via digest-updater-6655629712 GitHub action Fix the annotation and additional recommended-true Signed-off-by: Harshad Reddy Nalla <[email protected]> Patch the imagestream to have same name as in odh-manifests Signed-off-by: Harshad Reddy Nalla <[email protected]> Fix digest updater from failing if there are no updates on the image streams Fix the path to the params.env file Several fixes Upgrade the notebook images with 2023b and 2023a images Signed-off-by: Harshad Reddy Nalla <[email protected]> Include only sync github workflow on the main branch Signed-off-by: Harshad Reddy Nalla <[email protected]>
1 parent 66050e6 commit f7d2b08

File tree

81 files changed

+4556
-3218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+4556
-3218
lines changed
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
---
2+
# The aim of this GitHub workflow is to update the params.env file with the latest digest.
3+
name: Update notebook image build commit hashes
4+
on: # yamllint disable-line rule:truthy
5+
workflow_dispatch:
6+
inputs:
7+
branch:
8+
required: true
9+
description: "Provide branch name: "
10+
# Put the scheduler on comment until automate the full release procedure
11+
# schedule:
12+
# - cron: "0 0 * * 5" #Scheduled every Friday
13+
env:
14+
DIGEST_UPDATER_BRANCH: digest-updater-${{ github.run_id }}
15+
BRANCH_NAME: ${{ github.event.inputs.branch || 'master' }}
16+
RELEASE_VERSION_N: 2024a
17+
RELEASE_VERSION_N_1: 2023b
18+
jobs:
19+
initialize:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write
23+
steps:
24+
- name: Install Skopeo CLI
25+
shell: bash
26+
run: |
27+
sudo apt-get -y update
28+
sudo apt-get -y install skopeo
29+
30+
# Checkout the branch
31+
- name: Checkout branch
32+
uses: actions/checkout@v4
33+
with:
34+
ref: ${{ env.BRANCH_NAME }}
35+
36+
# Create a new branch
37+
- name: Create a new branch
38+
run: |
39+
echo ${{ env.DIGEST_UPDATER_BRANCH }}
40+
git checkout -b ${{ env.DIGEST_UPDATER_BRANCH }}
41+
git push --set-upstream origin ${{ env.DIGEST_UPDATER_BRANCH }}
42+
43+
update-n-version:
44+
needs: [initialize]
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: write
48+
steps:
49+
- name: Configure Git
50+
run: |
51+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
52+
git config --global user.name "GitHub Actions"
53+
54+
# Get latest build commit from the https://github.com/red-hat-data-services/notebooks/${release_branch} using this as identifier for the latest tag name
55+
- name: Retrive latest commit hash from the release branch
56+
id: hash-n
57+
shell: bash
58+
run: |
59+
PAYLOAD=$(curl --silent -H 'Accept: application/vnd.github.v4.raw' https://api.github.com/repos/red-hat-data-services/notebooks/commits?sha=release-$RELEASE_VERSION_N&per_page=1)
60+
echo "HASH_N=$(echo $PAYLOAD | jq -r '.[0].sha[0:7]')" >> ${GITHUB_OUTPUT}
61+
62+
# Checkout the release branch to apply the updates
63+
- name: Checkout release branch
64+
uses: actions/checkout@v4
65+
with:
66+
ref: ${{ env.DIGEST_UPDATER_BRANCH }}
67+
68+
- name: Fetch digest, and update the params.env file
69+
shell: bash
70+
run: |
71+
echo Latest commit is: ${{ steps.hash-n.outputs.HASH_N }} on ${{ env.RELEASE_VERSION_N}}
72+
IMAGES=("odh-minimal-notebook-image-n" "odh-minimal-gpu-notebook-image-n" "odh-pytorch-gpu-notebook-image-n" "odh-generic-data-science-notebook-image-n" "odh-tensorflow-gpu-notebook-image-n" "odh-trustyai-notebook-image-n" "odh-codeserver-notebook-image-n")
73+
REGEXES=("v2-${{ env.RELEASE_VERSION_N }}-\d{8}+-${{ steps.hash-n.outputs.HASH_N }}" "cuda-[a-z]+-minimal-[a-z0-9]+-[a-z]+-3.9-${{ env.RELEASE_VERSION_N }}-\d{8}-${{ steps.hash-n.outputs.HASH_N }}" "v2-${{ env.RELEASE_VERSION_N }}-\d{8}+-${{ steps.hash-n.outputs.HASH_N }}" \
74+
"v2-${{ env.RELEASE_VERSION_N }}-\d{8}+-${{ steps.hash-n.outputs.HASH_N }}" "cuda-[a-z]+-tensorflow-[a-z0-9]+-[a-z]+-3.9-${{ env.RELEASE_VERSION_N }}-\d{8}-${{ steps.hash-n.outputs.HASH_N }}" "v2-${{ env.RELEASE_VERSION_N }}-\d{8}+-${{ steps.hash-n.outputs.HASH_N }}" \
75+
"codeserver-[a-z0-9]+-[a-z]+-3.9-${{ env.RELEASE_VERSION_N }}-\d{8}-${{ steps.hash-n.outputs.HASH_N }}")
76+
77+
for ((i=0;i<${#IMAGES[@]};++i)); do
78+
image=${IMAGES[$i]}
79+
echo "CHECKING: " $image
80+
regex=${REGEXES[$i]}
81+
img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2)
82+
registry=$(echo $img | cut -d '@' -f1)
83+
latest_tag=$(skopeo inspect docker://$img | jq -r --arg regex "$regex" '.RepoTags | map(select(. | test($regex))) | .[0]')
84+
digest=$(skopeo inspect docker://$registry:$latest_tag | jq .Digest | tr -d '"')
85+
output=$registry@$digest
86+
echo "NEW: " $output
87+
sed -i "s|${image}=.*|${image}=$output|" manifests/base/params.env
88+
done
89+
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
90+
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/params.env && git commit -m "Update images for release N via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
91+
else
92+
echo "There were no changes detected in the images for the ${{ env.RELEASE_VERSION_N}}"
93+
fi
94+
95+
- name: Fetch digest, and update the commit.env file
96+
run: |
97+
echo Latest commit is: ${{ steps.hash-n.outputs.HASH_N }} on ${{ env.RELEASE_VERSION_N}}
98+
COMMIT=("odh-minimal-notebook-image-commit-n"
99+
"odh-minimal-gpu-notebook-image-commit-n"
100+
"odh-pytorch-gpu-notebook-image-commit-n"
101+
"odh-generic-data-science-notebook-image-commit-n"
102+
"odh-tensorflow-gpu-notebook-image-commit-n"
103+
"odh-trustyai-notebook-image-commit-n"
104+
"odh-codeserver-notebook-image-commit-n")
105+
106+
for val in "${COMMIT[@]}"; do
107+
echo $val
108+
sed -i "s|${val}=.*|${val}=${{ steps.hash-n.outputs.HASH_N }}|" manifests/base/commit.env
109+
done
110+
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
111+
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/commit.env && git commit -m "Update image commits for release N via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
112+
else
113+
echo "There were no changes detected in the images for the ${{ env.RELEASE_VERSION_N}}"
114+
fi
115+
116+
update-n-1-version:
117+
needs: [initialize, update-n-version]
118+
runs-on: ubuntu-latest
119+
permissions:
120+
contents: write
121+
steps:
122+
- name: Configure Git
123+
run: |
124+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
125+
git config --global user.name "GitHub Actions"
126+
127+
# Get latest build commit from the https://github.com/red-hat-data-services/notebooks/${release_branch} using this as identifier for the latest tag name
128+
- name: Retrive latest commit hash from the release branch
129+
id: hash-n-1
130+
shell: bash
131+
run: |
132+
PAYLOAD=$(curl --silent -H 'Accept: application/vnd.github.v4.raw' https://api.github.com/repos/red-hat-data-services/notebooks/commits?sha=release-$RELEASE_VERSION_N_1&per_page=1)
133+
echo "HASH_N_1=$(echo $PAYLOAD | jq -r '.[0].sha[0:7]')" >> ${GITHUB_OUTPUT}
134+
135+
# Checkout the release branch to apply the updates
136+
- name: Checkout release branch
137+
uses: actions/checkout@v4
138+
with:
139+
ref: ${{ env.DIGEST_UPDATER_BRANCH }}
140+
141+
- name: Fetch digest, and update the params.env file
142+
shell: bash
143+
run: |
144+
echo Latest commit is: ${{ steps.hash-n-1.outputs.HASH_N_1 }} on ${{ env.RELEASE_VERSION_N_1}}
145+
IMAGES=("odh-minimal-notebook-image-n-1" "odh-minimal-gpu-notebook-image-n-1" "odh-pytorch-gpu-notebook-image-n-1" "odh-generic-data-science-notebook-image-n-1" "odh-tensorflow-gpu-notebook-image-n-1" "odh-trustyai-notebook-image-n-1" "odh-codeserver-notebook-image-n-1")
146+
REGEXES=("v2-${{ env.RELEASE_VERSION_N_1 }}-\d{8}+-${{ steps.hash-n-1.outputs.HASH_N_1 }}" "cuda-[a-z]+-minimal-[a-z0-9]+-[a-z]+-3.9-${{ env.RELEASE_VERSION_N_1 }}-\d{8}-${{ steps.hash-n-1.outputs.HASH_N_1 }}" "v2-${{ env.RELEASE_VERSION_N_1 }}-\d{8}+-${{ steps.hash-n-1.outputs.HASH_N_1 }}" \
147+
"v2-${{ env.RELEASE_VERSION_N_1 }}-\d{8}+-${{ steps.hash-n-1.outputs.HASH_N_1 }}" "cuda-[a-z]+-tensorflow-[a-z0-9]+-[a-z]+-3.9-${{ env.RELEASE_VERSION_N_1 }}-\d{8}-${{ steps.hash-n-1.outputs.HASH_N_1 }}" "v2-${{ env.RELEASE_VERSION_N_1 }}-\d{8}+-${{ steps.hash-n-1.outputs.HASH_N_1 }}" \
148+
"codeserver-[a-z0-9]+-[a-z]+-3.9-${{ env.RELEASE_VERSION_N_1 }}-\d{8}-${{ steps.hash-n-1.outputs.HASH_N_1 }}")
149+
150+
for ((i=0;i<${#IMAGES[@]};++i)); do
151+
image=${IMAGES[$i]}
152+
echo "CHECKING: " $image
153+
regex=${REGEXES[$i]}
154+
img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2)
155+
registry=$(echo $img | cut -d '@' -f1)
156+
latest_tag=$(skopeo inspect docker://$img | jq -r --arg regex "$regex" '.RepoTags | map(select(. | test($regex))) | .[0]')
157+
digest=$(skopeo inspect docker://$registry:$latest_tag | jq .Digest | tr -d '"')
158+
output=$registry@$digest
159+
echo "NEW: " $output
160+
sed -i "s|${image}=.*|${image}=$output|" manifests/base/params.env
161+
done
162+
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
163+
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/params.env && git commit -m "Update images for release N-1 via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
164+
else
165+
echo "There were no changes detected in the images for the ${{ env.RELEASE_VERSION_N}}"
166+
fi
167+
168+
- name: Fetch digest, and update the commit.env file
169+
run: |
170+
echo Latest commit is: ${{ steps.hash-n-1.outputs.HASH_N_1 }} on ${{ env.RELEASE_VERSION_N_1}}
171+
COMMIT=("odh-minimal-notebook-image-commit-n-1"
172+
"odh-minimal-gpu-notebook-image-commit-n-1"
173+
"odh-pytorch-gpu-notebook-image-commit-n-1"
174+
"odh-generic-data-science-notebook-image-commit-n-1"
175+
"odh-tensorflow-gpu-notebook-image-commit-n-1"
176+
"odh-trustyai-notebook-image-commit-n-1"
177+
"odh-codeserver-notebook-image-commit-n-1")
178+
179+
for val in "${COMMIT[@]}"; do
180+
echo $val
181+
sed -i "s|${val}=.*|${val}=${{ steps.hash-n-1.outputs.HASH_N_1 }}|" manifests/base/commit.env
182+
done
183+
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
184+
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/commit.env && git commit -m "Update image commits for release N-1 via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
185+
else
186+
echo "There were no changes detected in the images for the ${{ env.RELEASE_VERSION_N}}"
187+
fi
188+
189+
open-pull-request:
190+
needs: [update-n-version, update-n-1-version]
191+
runs-on: ubuntu-latest
192+
permissions:
193+
pull-requests: write
194+
steps:
195+
- name: Checkout repo
196+
uses: actions/checkout@v4
197+
198+
- name: pull-request
199+
uses: repo-sync/pull-request@v2
200+
with:
201+
source_branch: ${{ env.DIGEST_UPDATER_BRANCH }}
202+
destination_branch: ${{ env.BRANCH_NAME}}
203+
github_token: ${{ secrets.GITHUB_TOKEN }}
204+
pr_label: "automated pr"
205+
pr_title: "[Digest Updater Action] Update Notebook Images"
206+
pr_body: |
207+
:rocket: This is an automated Pull Request.
208+
Created by `/.github/workflows/notebooks-digest-updater-upstream.yaml`
209+
210+
This PR updates the following files:
211+
- `manifests/base/params.env` file with the latest updated SHA digests of the notebooks (N & N-1).
212+
- `manifests/base/commit.env` file with the latest commit (N & N-1).
213+
214+
:exclamation: **IMPORTANT NOTE**: Remember to delete the ` ${{ env.DIGEST_UPDATER_BRANCH }}` branch after merging the changes

.github/workflows/runtimes-digest-updater-upstream.yaml

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)