Skip to content

Commit 09b81d5

Browse files
hudeng-godeepin-ci-robot
authored andcommitted
fix(CI): Get obs log error when package arch exclude
1 parent f8cc621 commit 09b81d5

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/02-build-obs.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,20 @@ jobs:
173173
pkgname="${{ needs.build.outputs.pkgname }}"
174174
if [ "$COMPONENT" = "main" ]; then
175175
osc co deepin:CI:TestingIntegration:${TOPIC}/${pkgname} && cd $_
176-
if [ -z $(osc buildinfo testing ${ARCH} |grep "<error>excluded</error>") ];then osc buildlog testing ${ARCH}; else echo "${ARCH} build excluded"; fi
177-
if [ "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}/testing/${ARCH}/${pkgname}/_status |grep 'succeeded')" = "" -a "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}/testing/${ARCH}/${pkgname}/_status |grep 'finished')" = "" ];\
178-
then echo "${ARCH} build failed" && -1; else echo "${ARCH} build succeeded"; fi
176+
if [ -z $(osc buildinfo testing ${ARCH} |grep "<error>excluded</error>") ]; then
177+
osc buildlog testing ${ARCH}
178+
if [ "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}/testing/${ARCH}/${pkgname}/_status |grep 'succeeded')" = "" -a "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}/testing/${ARCH}/${pkgname}/_status |grep 'finished')" = "" ];\
179+
then echo "${ARCH} build failed" && -1; else echo "${ARCH} build succeeded"; fi
180+
else
181+
echo "${ARCH} build excluded"
182+
fi
179183
else
180184
osc co deepin:CI:TestingIntegration:${TOPIC}:${COMPONENT}/${pkgname} && cd $_
181-
if [ -z $(osc buildinfo testing ${ARCH} |grep "<error>excluded</error>") ];then osc buildlog testing ${ARCH}; else echo "${ARCH} build excluded"; fi
182-
if [ "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}:${COMPONENT}/testing/${ARCH}/${pkgname}/_status |grep 'succeeded')" = "" -a "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}:${COMPONENT}/testing/${ARCH}/${pkgname}/_status |grep 'finished')" = "" ];\
183-
then echo "${ARCH} build failed" && -1; else echo "${ARCH} build succeeded"; fi
185+
if [ -z $(osc buildinfo testing ${ARCH} |grep "<error>excluded</error>") ]; then
186+
osc buildlog testing ${ARCH}
187+
if [ "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}:${COMPONENT}/testing/${ARCH}/${pkgname}/_status |grep 'succeeded')" = "" -a "$(osc api -X GET /build/deepin:CI:TestingIntegration:${TOPIC}:${COMPONENT}/testing/${ARCH}/${pkgname}/_status |grep 'finished')" = "" ];\
188+
then echo "${ARCH} build failed" && -1; else echo "${ARCH} build succeeded"; fi
189+
else
190+
echo "${ARCH} build excluded"
191+
fi
184192
fi

0 commit comments

Comments
 (0)