-
Notifications
You must be signed in to change notification settings - Fork 22
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
ci: add Github Actions workflow to check convergence in a release PR #1752
Changes from 1 commit
858e83e
50268f3
0141068
3d25694
c197be4
3b842a6
4c820e1
a5c385e
2771fa8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -13,4 +13,41 @@ jobs: | |||||
with: | ||||||
java-version: 8 | ||||||
- run: java -version | ||||||
- run: .kokoro/dashboard.sh | ||||||
|
||||||
converge: | ||||||
runs-on: ubuntu-latest | ||||||
if: github.repository_owner == 'googleapis' && github.head_ref == 'release-please/branches/master' | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
- uses: actions/setup-java@v1 | ||||||
with: | ||||||
java-version: 8 | ||||||
script: | | ||||||
// only approve PRs from release-please | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if (context.payload.pull_request.user.login !== "release-please") { | ||||||
return; | ||||||
} | ||||||
|
||||||
// only approve PRs like "chore: release <release version>" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
if (!(/^chore: release.*$/.test(context.payload.pull_request.title))) { | ||||||
return; | ||||||
} | ||||||
|
||||||
// only approve PRs with README.md, CHANGELOG.md, pom.xml and versions.txt changes | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const files = new Set( | ||||||
( | ||||||
await github.paginate( | ||||||
github.pulls.listFiles.endpoint({ | ||||||
owner: context.repo.owner, | ||||||
repo: context.repo.repo, | ||||||
pull_number: context.payload.pull_request.number, | ||||||
}) | ||||||
) | ||||||
).map(file => file.filename) | ||||||
); | ||||||
if (files.size != 4 || !files.has("README.md") || !files.has("CHANGELOG.md") || !files.has("pom.xml") || !files.has("versions.txt")) { | ||||||
return; | ||||||
} | ||||||
- run: java -version | ||||||
- run: .kokoro/dashboard.sh | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you are checking
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,19 @@ cd dashboard/ | |
echo -e "\n******************** BUILDING THE DASHBOARD ********************" | ||
|
||
mvn --fail-at-end clean install | ||
Neenu1995 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
INSTALL_RETURN_CODE=$? | ||
chingor13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RETURN_CODE=${INSTALL_RETURN_CODE} | ||
|
||
case ${JOB_TYPE} in | ||
converge) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please update this accordingly |
||
mvn exec:java -Dexec.args="-f ../pom.xml --report" | ||
Neenu1995 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CONVERGE_RETURN_CODE=$? | ||
if [[ $INSTALL_RETURN_CODE -eq 0 ]] | ||
then | ||
RETURN_CODE=${CONVERGE_RETURN_CODE} | ||
fi | ||
;; | ||
esac | ||
|
||
echo "exiting with ${RETURN_CODE}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would only tell you if the report was built successfully or not (which is important) but I'm not seeing the output being checked. Ideally, if we have full convergence, the script should exit with 0 and output |
||
exit ${RETURN_CODE} |
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.
Let's be more specific here:
dependency-convergence-check
.