@@ -56,66 +56,66 @@ jobs:
56
56
exit 1
57
57
fi
58
58
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
119
119
120
120
Dockerfile-path-change-detection-in-GenAIExamples :
121
121
runs-on : ubuntu-latest
0 commit comments