Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure scratch build from PR finished #193

Merged
merged 1 commit into from Oct 15, 2019

Conversation

bgoncalv
Copy link
Collaborator

@bgoncalv bgoncalv changed the title make sure PR scratch build finished make sure scratch build from PR finished Oct 15, 2019
@bgoncalv
Copy link
Collaborator Author

@thrix could you check this?

popd

SCRATCHID=$(cat ${LOGDIR}/kojioutput.txt | awk '/Created task:/ { print $3 }')
echo "koji_task_id=${SCRATCHID}" >> ${LOGDIR}/job.props

# Make sure koji build finished
# https://pagure.io/fedora-ci/general/issue/76
while koji taskinfo ${SCRATCHID} | grep "State: open"; do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this (taskinfo) could have a temporary error that leads to grep failure. also, the status could be "free". should this grep the other way around (i.e. continue to loop if it cannot grep closed|failed|cancelled?

popd

SCRATCHID=$(cat ${LOGDIR}/kojioutput.txt | awk '/Created task:/ { print $3 }')
echo "koji_task_id=${SCRATCHID}" >> ${LOGDIR}/job.props

# Make sure koji build finished
# https://pagure.io/fedora-ci/general/issue/76
while koji taskinfo ${SCRATCHID} | grep "State:" | grep -Ev "closed|failed|cancelled"; do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when this greps failed...

fi
done

echo "status=SUCCESS" >> ${LOGDIR}/job.props
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...it jumps here and sets the result to success.

Copy link

@hroncok hroncok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested the code, but the logic seems legit now.

@thrix
Copy link
Collaborator

thrix commented Oct 15, 2019

@bgoncalv seems legit to me also. so +1

@thrix thrix self-requested a review October 15, 2019 14:23
Copy link
Collaborator

@thrix thrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bgoncalv
Copy link
Collaborator Author

[merge]

@bgoncalv
Copy link
Collaborator Author

@hroncok thanks for the review :)

@adl-bot adl-bot merged commit ceacce2 into CentOS-PaaS-SIG:master Oct 15, 2019
@adl-bot
Copy link

adl-bot commented Oct 15, 2019

The following image promotions have taken place:

  • fedoraci-runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants