8000 New release workflow by grantseltzer · Pull Request #1367 · aquasecurity/tracee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

New release workflow #1367

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

Merged
merged 3 commits into from
Feb 8, 2022
Merged

New release workflow #1367

merged 3 commits into from
Feb 8, 2022

Conversation

grantseltzer
Copy link
Contributor
@grantseltzer grantseltzer commented Jan 19, 2022

This PR:

  • Creates a new Makefile.release which has two targets:
    • Snapshot
      • Builds tracee-ebpf, tracee-rules, rules
      • Builds an archive of build artifacts along with license
      • Takes checksum of archive
      • Builds container images
    • Publish
      • Pushes container images to dockerhub
      • Creates github release with the build artifact archive

For both of these targets the main environment variables to set are:

PUSH_DOCKER_REPO (default: aquasec/tracee)

SNAPSHOT_VERSION - the tag or SHA to label the release/snapshot as (default: latest git SHA)

This PR also does the following:

  • Updates the github action for releasing to use this new makefile
  • Fixes existing Makefile to cleanup intermediate images

@grantseltzer grantseltzer linked an issue Jan 19, 2022 that may be closed by this pull request
Copy link
Contributor
@mtcherni95 mtcherni95 left a comment

Choose a reason for hiding this comment

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

Looks very promising! shouldn't we also run tests and benchmarks if any?

@danielpacak danielpacak added this to the v0.6.6 milestone Jan 24, 2022
@rafaeldtinoco
Copy link
Contributor

I'm reviewing this now... sorry for the delay

Copy link
Contributor
@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

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

The change looks very good. Most of the comments are related to formatting only (to keep uniform with other Makefiles we have). I haven't tested the release, just read it. I wonder how you're testing it as well.

@grantseltzer
Copy link
Contributor Author

The change looks very good. Most of the comments are related to formatting only (to keep uniform with other Makefiles we have). I haven't tested the release, just read it. I wonder how you're testing it as well.

I'm working on testing this in my fork, with a separate container registry.

Also want to note, that I want to be careful that we have consensus on the container image tags. We have 3 images now:

  • tracee-core
  • tracee-core-btfhub
  • tracee-nocore

So the images have tags like:

  • docker.io/aquasec/tracee:tracee-core-0.6.1
  • docker.io/aquasec/tracee:tracee-core-btfhub-0.6.1
  • docker.io/aquasec/tracee:tracee-nocore-0.6.1

And then there may be a need to have docker.io/aquasec/tracee:latest which I set to default to the latest tracee-core-btfhub. Thoughts? @rafaeldtinoco @itaysk @danielpacak

@rafaeldtinoco
Copy link
Contributor

And then there may be a need to have docker.io/aquasec/tracee:latest which I set to default to the latest tracee-core-btfhub. Thoughts? @rafaeldtinoco @itaysk @danielpacak

I agree to have the default set to tracee-core-btfhub.

Also, I'd like to keep the tracee-core Makefile target, even if we decide not to publish the image.

Copy link
Contributor
@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Not sure if it's possible now, but I think we should also have a way to just run the release target and see that it works and builds release artifacts (executable binaries and container images) locally without creating Git tag and publishing to GitHub or DockerHub. In some other build systems, e.g. GoReleaser, it's called a release snapshot. Only when we pass PUBLISH=1 or similar explicit flag it would trigger an actual release. (Ideally such release snapshot would run in the PR validation workflow before we run integration tests.)

@grantseltzer
Copy link
Contributor Author
grantseltzer commented Jan 25, 2022

I'm going to add Daniel's suggestion but for now this works (finished)

https://github.com/grantseltzer/tracee/releases/tag/v0.9.16

@grantseltzer grantseltzer self-assigned this Jan 26, 2022
@itaysk itaysk modified the milestones: v0.6.6, v0.7.0 Jan 26, 2022
@grantseltzer
Copy link
Contributor Author

As it stands now, this is working. I believe this is how you described it @danielpacak. Tested it on my personal fork: https://github.com/grantseltzer/tracee/runs/4992692333?check_suite_focus=true

@rafaeldtinoco
Copy link
Contributor

I believe you're still working on this @grantseltzer, right ? Please let me know once you're good (so I can review). Thanks!

@grantseltzer
Copy link
Contributor Author
grantseltzer commented Feb 8, 2022

I believe you're still working on this @grantseltzer, right ? Please let me know once you're good (so I can review). Thanks!

I could have commented in here instead of messaging you offline, but regardless yes this is ready for review. The only thing I want to point out is asking your thoughts on the convention of 'aquasec/tracee:full-v0.6.6', as in having the version number in the tag.

    - Snapshot
        - Builds tracee-ebpf, tracee-rules, rules
        - Builds an archive of build artifacts along with license
        - Takes checksum of archive
        - Builds container images
    - Publish
        - Pushes container images to dockerhub
        - Creates github release with the build artifact archive

For both of these targets the main environment variables to set are:

PUSH_DOCKER_REPO (default: aquasec/tracee)

SNAPSHOT_VERSION - the tag or SHA to label the release/snapshot as (default: latest git SHA)

This commit also does the following:

- Updates the github action for releasing to use this new makefile
- Fixes existing Makefile to cleanup intermediate images

Signed-off-by: grantseltzer <grantseltzer@gmail.com>
Signed-off-by: grantseltzer <grantseltzer@gmail.com>
Signed-off-by: grantseltzer <grantseltzer@gmail.com>
@rafaeldtinoco rafaeldtinoco self-requested a review February 8, 2022 21:30
Copy link
Contributor
@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

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

LGTM. I'll squash this and merge (fixing git log). Thanks a lot for this change and all the tests you've made.

@rafaeldtinoco rafaeldtinoco merged commit 382eaf2 into aquasecurity:main Feb 8, 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

Successfully merging this pull request may close these issues.

Revise release script
5 participants
0