Skip to content

Commit 2d5130f

Browse files
authored
temp remove dockerfile check (#670)
Signed-off-by: chensuyue <[email protected]>
1 parent 61b8fa9 commit 2d5130f

File tree

1 file changed

+60
-60
lines changed

1 file changed

+60
-60
lines changed

.github/workflows/pr-dockerfile-path-scan.yaml

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -56,66 +56,66 @@ jobs:
5656
exit 1
5757
fi
5858
59-
- name: Check all Dockerfile mode and if it exists in yaml
60-
if: always()
61-
run: |
62-
set -e
63-
shopt -s globstar
64-
no_add="FALSE"
65-
cd ${{github.workspace}}
66-
Dockerfiles=$(find ./comps -name '*Dockerfile*'|sed 's/^\.\///')
67-
if [ -n "$Dockerfiles" ]; then
68-
for Dockerfile in $Dockerfiles; do
69-
service=$(echo "$Dockerfile" | awk -F '/' '{print $2}')
70-
if grep -q "$Dockerfile" ../GenAIExamples/**/*build.yaml*; then
71-
mode="" #CI
72-
else
73-
mode="-cd" #CD
74-
fi
75-
76-
yaml_file=${{github.workspace}}/.github/workflows/docker/compose/$service'-compose'$mode'.yaml'
77-
if [ -e "$yaml_file" ]; then
78-
# check service yaml if exist
79-
if ! grep -q "$Dockerfile" "$yaml_file"; then
80-
echo "AR: Update $Dockerfile to .github/workflows/docker/compose/"$service"-compose"$mode".yaml."
81-
no_add="TRUE"
82-
fi
83-
else
84-
echo "AR: Create a new compose file .github/workflows/docker/compose/"$service"-compose"$mode".yaml for $Dockerfile and fill it in."
85-
no_add="TRUE"
86-
fi
87-
done
88-
fi
89-
90-
if [[ "$no_add" == "TRUE" ]]; then
91-
exit 1
92-
fi
93-
94-
- name: Check for the exist of Dockerfile in all yamls.
95-
if: always()
96-
run: |
97-
shopt -s globstar
98-
no_exist="FALSE"
99-
cd ${{github.workspace}}
100-
yamls=$(find .github/workflows/docker/compose/ -name '*.yaml')
101-
if [ -n "$yamls" ]; then
102-
for yaml in $yamls; do
103-
dockerfiles=$(grep 'dockerfile:' "$yaml"|sed 's/dockerfile: //')
104-
for dockerfile in $dockerfiles; do
105-
if [[ "$dockerfile" == *"comps/"* ]]; then
106-
if ! [ -e "$dockerfile" ]; then
107-
# cat "$yaml"
108-
echo "AR: The dockerfile path "$dockerfile" in "$yaml" does not exist, remove or update it."
109-
no_exist="TRUE"
110-
fi
111-
fi
112-
done
113-
done
114-
fi
115-
116-
if [[ "$no_exist" == "TRUE" ]]; then
117-
exit 1
118-
fi
59+
# - name: Check all Dockerfile mode and if it exists in yaml
60+
# if: always()
61+
# run: |
62+
# set -e
63+
# shopt -s globstar
64+
# no_add="FALSE"
65+
# cd ${{github.workspace}}
66+
# Dockerfiles=$(find ./comps -name '*Dockerfile*'|sed 's/^\.\///')
67+
# if [ -n "$Dockerfiles" ]; then
68+
# for Dockerfile in $Dockerfiles; do
69+
# service=$(echo "$Dockerfile" | awk -F '/' '{print $2}')
70+
# if grep -q "$Dockerfile" ../GenAIExamples/**/*build.yaml*; then
71+
# mode="" #CI
72+
# else
73+
# mode="-cd" #CD
74+
# fi
75+
#
76+
# yaml_file=${{github.workspace}}/.github/workflows/docker/compose/$service'-compose'$mode'.yaml'
77+
# if [ -e "$yaml_file" ]; then
78+
# # check service yaml if exist
79+
# if ! grep -q "$Dockerfile" "$yaml_file"; then
80+
# echo "AR: Update $Dockerfile to .github/workflows/docker/compose/"$service"-compose"$mode".yaml."
81+
# no_add="TRUE"
82+
# fi
83+
# else
84+
# echo "AR: Create a new compose file .github/workflows/docker/compose/"$service"-compose"$mode".yaml for $Dockerfile and fill it in."
85+
# no_add="TRUE"
86+
# fi
87+
# done
88+
# fi
89+
#
90+
# if [[ "$no_add" == "TRUE" ]]; then
91+
# exit 1
92+
# fi
93+
#
94+
# - name: Check for the exist of Dockerfile in all yamls.
95+
# if: always()
96+
# run: |
97+
# shopt -s globstar
98+
# no_exist="FALSE"
99+
# cd ${{github.workspace}}
100+
# yamls=$(find .github/workflows/docker/compose/ -name '*.yaml')
101+
# if [ -n "$yamls" ]; then
102+
# for yaml in $yamls; do
103+
# dockerfiles=$(grep 'dockerfile:' "$yaml"|sed 's/dockerfile: //')
104+
# for dockerfile in $dockerfiles; do
105+
# if [[ "$dockerfile" == *"comps/"* ]]; then
106+
# if ! [ -e "$dockerfile" ]; then
107+
# # cat "$yaml"
108+
# echo "AR: The dockerfile path "$dockerfile" in "$yaml" does not exist, remove or update it."
109+
# no_exist="TRUE"
110+
# fi
111+
# fi
112+
# done
113+
# done
114+
# fi
115+
#
116+
# if [[ "$no_exist" == "TRUE" ]]; then
117+
# exit 1
118+
# fi
119119

120120
Dockerfile-path-change-detection-in-GenAIExamples:
121121
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)