Use odo-robot to post logs to PR (#5302)

This commit is contained in:
Philippe Martin
2021-12-20 13:30:28 +01:00
committed by GitHub
parent 47f66a5c9e
commit 2b00f1cc01
2 changed files with 5 additions and 3 deletions

View File

@@ -13,4 +13,6 @@ RUN curl -fsSL https://clis.cloud.ibm.com/install/linux | sh && \
./install-oc-tools.sh --latest 4.7 && \
apt-get update -y && \
apt-get install -y sshpass && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*
RUN go get github.com/kadel/odo-robot@965ea0dd848856691bfc76e6824a8b787b950045

View File

@@ -28,8 +28,8 @@ save_logs() {
else
STATUS="with errors"
fi
cat <<EOF | gh pr comment ${GIT_PR_NUMBER} --body-file -
${NAME} finished ${STATUS}.
cat <<EOF | odo-robot -key-from-env-var ODO_ROBOT_KEY -pr-comment ${GIT_PR_NUMBER} -pipeline ${NAME}
${NAME} on commit ${GIT_COMMIT} finished ${STATUS}.
View logs: [TXT](${BASE_URL}/${LOGFILE}.txt) [HTML](${BASE_URL}/${LOGFILE}.html)
EOF
}