You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/odh-notebooks-sync.yml
+13-37
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,11 @@ jobs:
57
57
package_name=codeflare-sdk
58
58
available_python_versions=("3.9", "3.11") # add space separated python versions according to 'python-versions' specified in 'Setup Python Environment' step
59
59
install_package_using_pipenv(){
60
+
# args allow custom names for Pipfile and Pipfile.lock
61
+
if $# -eq 2; then
62
+
mv $1 Pipfile
63
+
mv $2 Pipfile.lock
64
+
fi
60
65
if ! pipenv install ${package_name}~="${CODEFLARE_RELEASE_VERSION}"; then
61
66
echo "Failed to install ${package_name} with version ${CODEFLARE_RELEASE_VERSION} in $dir"
62
67
exit 1
@@ -71,6 +76,10 @@ jobs:
71
76
echo "Failed to remove virtual environment"
72
77
exit 1
73
78
fi
79
+
if $# -eq 2; then
80
+
mv Pipfile $1
81
+
mv Pipfile.lock $2
82
+
fi
74
83
}
75
84
# Get the list of available versions for the package
76
85
if ! versions=$(pipenv run pip-versions list $package_name);then
@@ -81,31 +90,8 @@ jobs:
81
90
if echo "$versions" | grep -q "${CODEFLARE_RELEASE_VERSION}"; then
82
91
echo "Version ${CODEFLARE_RELEASE_VERSION} is available for $package_name"
83
92
# list all Pipfile paths having Codeflare-SDK listed
84
-
paths+=($(grep -rl "${package_name} = \"~=.*\""))
85
-
# Extracting only directories from file paths, excluding a `.gitworkflow` directory
86
-
directories=()
87
-
exclude_directories=(
88
-
".git/objects/pack"
89
-
".github/workflows/",
90
-
)
91
-
for path in "${paths[@]}"; do
92
-
current_dir=$(dirname "$path")
93
-
#Check if current_dir is not in exclude_directories list
94
-
if [[ ! "${exclude_directories[@]}" =~ "$current_dir" ]]; then
95
-
#Check if Pipfile exists in current_dir
96
-
if ls "$current_dir"/Pipfile* 1> /dev/null 2>&1;then
0 commit comments