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

Unify branch names for odh-manifests and notebooks #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,9 @@ To get help about the script
./rhods-disconnected-helper.sh -h
```

After running the script, the list of images with an example will be saved in a file by default called rhods-< version >.md with version the version of RHODS you are using.
After running the script, the list of images with an example will be saved in a file by default called rhods-< version >.md with version the version of RHODS you are using.

By default, the repositories for odh-manifests and notebooks are checked out to the same branch (rhods version). To use different notebooks branch, execute
```bash
./rhods-disconnected-helper.sh --rhods-version <version> --notebooks-branch <branch>
```
15 changes: 14 additions & 1 deletion rhods-disconnected-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set_defaults() {
rhods_version="${rhods_version:-}"
repository_folder="${repository_folder:-.odh-manifests}"
notebooks_folder="${notebooks_folder:-.odh-notebooks}"
notebooks_branch="${notebooks_branch:-release-2023a}"
notebooks_branch="${notebooks_branch:-}"
file_name="${file_name:-$rhods_version.md}"
skip_tls="${skip_tls:-false}"
mirror_url="${mirror_url:-registry.example.com:5000/mirror/oc-mirror-metadata}"
Expand All @@ -32,6 +32,7 @@ function help() {
echo " --set-registry Set the registry"
echo " --set-openshift-version Set the OpenShift version"
echo " --set-channel Set the channel"
echo " --notebooks-branch Set the notebooks branch"
}

function get_latest_rhods_version() {
Expand Down Expand Up @@ -186,6 +187,13 @@ function change_rhods_version() {
echo "Error: Version $rhods_version does not exist"
exit 1
fi

# Set the same version for notebooks if not set otherwise via
# --notebooks-branch <notebooks_branch>
if [ -z "${notebooks_branch}" ]; then
notebooks_branch="${rhods_version}"
fi

echo "Switching to $rhods_version"
git switch "$rhods_version"
return 0
Expand Down Expand Up @@ -244,6 +252,11 @@ parse_args() {
shift
shift
;;
--notebooks-branch)
notebooks_branch="$2"
shift
shift
;;
--skip-image-verification)
skip_image_verification=true
shift
Expand Down