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

ci: Make flank release more automatically #1352

Merged
merged 8 commits into from
Nov 27, 2020

Conversation

piotradamczyk5
Copy link
Contributor

@piotradamczyk5 piotradamczyk5 commented Nov 25, 2020

Fixes #1346

Test Plan

How do we know the code works?

  1. Create release notes job (this which generates documentation and changelog) will run each 1st day of the month
  2. After merge Pr with changelog
  3. Flank-release bot will push the tag with next version to repository
  4. Then release job will run as usual

Checklist

  • Documented
  • At schedule to run release job at 1st day of the month
  • Create job which will push release tag after merge PR

@piotradamczyk5 piotradamczyk5 marked this pull request as ready for review November 25, 2020 15:27
@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2020

Timestamp: 2020-11-27 06:18:30
Buildscan url for ubuntu-workflow run 386539063

Copy link
Contributor

@Sloox Sloox left a comment

Choose a reason for hiding this comment

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

Can we test this somehow before we go ahead with it? Also #1354 should probably be a blocking issue for this.

@piotradamczyk5
Copy link
Contributor Author

Can we test this somehow before we go ahead with it? Also #1354 should probably be a blocking issue for this.

Agreed #1354 block release job. However this task is for simplify release process.

I have tested it on my fork

jobs:
create_release:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
Copy link
Contributor

Choose a reason for hiding this comment

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

This job can be triggered by any merged PR with a specific label (which can be added manually). (I can create PR compromised PR, add release label and merge it. If I understand the job description correctly -- it will start release)

If I am not wrong, release notes PR is created by a bot, I think we should consider adding an additional condition which verifies who is the creator or merged PR.

It's the first that came to my mind, if there is a better way to make it more secure I think it would be worth to implement it.

Of course, let me know, I might be wrong and this implementation is already secure 💪

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are 100% right that if someone uses release label it will generate new release,
I think that we could make additional check if issue is created by bot and/or check if title starts with chore: release notes for

Copy link
Contributor

@adamfilipow92 adamfilipow92 left a comment

Choose a reason for hiding this comment

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

Yaml looks good, I also check cron expression, and it's valid.

Action should run at


07:00 AM, on day 1 of the month

@piotradamczyk5 piotradamczyk5 merged commit b4679f6 into master Nov 27, 2020
@piotradamczyk5 piotradamczyk5 deleted the #1346-make-flank-release-more-automatically branch November 27, 2020 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Flank releases more automatically
4 participants