-
Notifications
You must be signed in to change notification settings - Fork 67
Checking e2e build succeeded #89
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zouyee If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @vdemeester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
test/e2e-tests.sh
Outdated
fi | ||
echo "waiting for build was successed." | ||
sleep 2 | ||
done | ||
# TODO(adrcunha): Add proper verification. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need to be removed 👼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping!
test/e2e-tests.sh
Outdated
if [ $? -ne 1 ]; then | ||
break | ||
fi | ||
echo "waiting for build was successed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about "waiting for build to be successful"?
cc @adrcunha as resident bash expert and original TODO author |
echo "Checking that build was successed:" | ||
for i in {1..100};do | ||
kubectl get build buildpack-build -o 'jsonpath={.status.conditions[?(@.type=="Succeeded")].status}' 1>/dev/null 2>&1 | ||
if [ $? -ne 1 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-eq 0
fi | ||
echo "The build was successed." | ||
sleep 2 | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some progress indicator here, I'm not sure how long the operation will take.
echo -n "."
Prior art:
https://github.com/knative/test-infra/blob/master/scripts/library.sh#L176
fi | ||
echo "The build was successed." | ||
sleep 2 | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't you fail the test if the build didn't succeed? Otherwise, this check adds no value.
# TODO(adrcunha): Add proper verification. | ||
echo "Checking that build was successed:" | ||
for i in {1..100};do | ||
kubectl get build buildpack-build -o 'jsonpath={.status.conditions[?(@.type=="Succeeded")].status}' 1>/dev/null 2>&1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume Jason agrees with this check?
echo "Checking that build was started:" | ||
kubectl get build buildpack-build -oyaml | ||
# TODO(adrcunha): Add proper verification. | ||
echo "Checking that build was successed:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "Checking that build was successed:" | |
echo -n "Waiting for build to finish" |
@@ -37,9 +37,15 @@ function run_buildpack_test() { | |||
kubectl apply -f test/build-buildpack.yaml || return 1 | |||
# Wait 5s for processing to start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that you can remove this sleep now, since you're checking for a successful build.
if [ $? -ne 1 ]; then | ||
break | ||
fi | ||
echo "The build was successed." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "The build was successed." | |
echo -e "\nBuild succeeded." |
Checking e2e build succeeded