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

The state of the galaxy release #269

Closed
AFriemann opened this issue Apr 24, 2020 · 13 comments
Closed

The state of the galaxy release #269

AFriemann opened this issue Apr 24, 2020 · 13 comments

Comments

@AFriemann
Copy link

So, i've been struggling with both this and the ssh-hardening playbook for the past two days.

Most of my issues came from the fact that readme contents have diverged from the releases that are available in galaxy.

I know that it is entirely possible to run both playbooks easily from git directly, but keeping the releases available in galaxy combined with the fact that the readme on galaxy is apparently pulled from master is almost malicious.
The last release on galaxy was a year ago and current master is 33 commits ahead; the ssh-hardening repo looks very similar.

Is there any plan to fix this situation in the future? What is the intention towards galaxy?

Why are releases apparently not kept up-to-date?

Do you need support in automating anywhere?

@rndmh3ro
Copy link
Member

Thanks for bringing up your concerns!

the fact that the readme on galaxy is apparently pulled from master is almost malicious.

I wasn't aware of that. This sure sounds like a bug on galaxy side.

Is there any plan to fix this situation in the future?

What situation do you mean? That galaxy shows the wrong readme?

What is the intention towards galaxy?

Galaxy is the main distribution of roles and will probably stay that way, unless RedHat does something else.

Why are releases apparently not kept up-to-date?

If you mean why there is no newer release than 5.2.1: I haven't found the time, sadly.

Do you need support in automating anywhere?

Yes, absolutely. Right now doing releases is a manual process. For this I use the github_changelog_generator to automatically create a nice looking and complete changelog, then manually tag and release on Github (see for example https://github.com/dev-sec/ansible-os-hardening/releases/tag/5.2.1). Galaxy automatically pulls the latest releases afterwards.

If you want to help automate this, let's talk! :)
I'm open for using travis, or github actions or whatever makes this easier.

@chicks-net
Copy link

I'm happy to help with this also. I've done a lot of CI work in jenkins and buildkite. I'd love for a reason to play with github actions.

@rndmh3ro
Copy link
Member

Sounds great.

Just writing down my ideas what is needed/how this should work.

@micheelengronne
Copy link
Member

Do you know semantic-release ? It can create a release by simply creating a commit with the angular convention. We use that internally, works like a charm.

@AFriemann
Copy link
Author

What we're using right now on our internal projects is release-drafter. There is github action (https://github.com/marketplace/actions/release-drafter) for it that should be a good fit.

I don't think it offers a way to update the CHANGELOG.md, but it neatly keeps releases up-to-date with PRs and reduces a release to a single click.

What is the process to push the release to galaxy, or is that picked up automatically? @rndmh3ro

@AFriemann
Copy link
Author

AFriemann commented Apr 27, 2020

Additionally I found this

https://github.com/marketplace/actions/release-notifier-action

that might be a good fit for the mailinglist message

@rndmh3ro
Copy link
Member

Do you know semantic-release ? It can create a release by simply creating a commit with the angular convention. We use that internally, works like a charm.

I know this. Since these roles rely on external contributors, I don't know if its a good idea to force specific commit-styles on them.

What is the process to push the release to galaxy, or is that picked up automatically? @rndmh3ro

That's automatic. As soon as there is a new tag/release in Github, Galaxy pulls it.

What we're using right now on our internal projects is release-drafter. There is github action (https://github.com/marketplace/actions/release-drafter) for it that should be a good fit.

This looks pretty great! I'd definetly use this, once this PR release-drafter/release-drafter#259 is merged.

@wkhayrattee
Copy link

Hey guys, just curious if this has been fixed as I see the latest commits being reported by Galaxy now:

image

@ivanovv
Copy link

ivanovv commented May 5, 2020

@7php I think Galaxy uses releases/tags, and there were no changes there:

rndmh3ro released this on 9 Jun 2019 · 33 commits to master since this release

@rndmh3ro
Copy link
Member

rndmh3ro commented May 5, 2020

@ivanovv is right.

@rndmh3ro
Copy link
Member

rndmh3ro commented May 5, 2020

I uploaded a new version!

I'm still looking for ways to automate this so if anyone wants to do this, tell me!

@rndmh3ro
Copy link
Member

rndmh3ro commented May 5, 2020

Okay,

I started experimenting. I can automatically update the changelog after closed PRs/issues.

Here's the github action: https://github.com/dev-sec/ansible-os-hardening/runs/647446423
And here's the generated changelog: https://github.com/dev-sec/ansible-os-hardening/blob/changelog/CHANGELOG.md

Now this is still missing:

  • With the click of a button, a new release should be created. I should have to insert the changes (from the CHANGELOG, or somehow automatically?) and specify a version.

For this maybe this works: https://github.com/marketplace/actions/ensure-release.
Combine with the output of the github-changelog-generator and create a draft release. Then I manually check this draft, give it a tag and we're good.

  • Bonus: Send an email to our mailinglist.

@rndmh3ro
Copy link
Member

rndmh3ro commented May 8, 2020

Next step:

I have a workflow that runs on every merged PR and then does the following:

  • get the previous tag (to generate the changelog from this tag)
  • get the next tag with the help of labels on PRs (major, minor, patch)
  • generate a changelog
  • create a release draft with the generated changelog and the release- and tag-name of the next tag
  • (if I am confident with the created release draft, I can publish it automatically, too)

This works good so far in my personal repo. I'm going to put it into the hardening-roles next and do a little write-up.

You can find the workflow here: https://github.com/rndmh3ro/ansible-os-hardening/blob/7.0.0/.github/workflows/release.yml:

rndmh3ro added a commit that referenced this issue Jul 24, 2020
divialth pushed a commit to divialth/ansible-collection-hardening that referenced this issue Aug 3, 2022
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

No branches or pull requests

6 participants