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

Revamping building and release with dagger multibuild pipeline #25

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

bishal7679
Copy link

@bishal7679 bishal7679 commented Feb 23, 2024

Fixing #22

Previous State

  • Previously, building Makefile based
  • releasing with dagger pipeline missing

Current Behavior

  • Added building file as go code with dagger build.go
  • Automated the release with dagger CI by calling for release and pull_request event separately [added deb rpm package based binary release with architecture]
  • Added Software Bill of Materials (SBOM) generation during release for each archive by analyzing the various generated artifacts using Syft
  • Added brew install support
    • We need to create a separate repo under goharbor named homebrew-tap for uploading the tap formula which will eventually be used during brew installation

Screenshot

24-02-2024:00:08:01

PS:- should be removed go.work & go.work.sum file after using the release pipeline once!
//cc @Vad1mo

Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
@Vad1mo
Copy link
Member

Vad1mo commented Feb 23, 2024

Awesome!

I'll looking forward to try this out!

Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
@bishal7679
Copy link
Author

Hello @Vad1mo @OrlinVasilev
PTAL in this PR!

@OrlinVasilev OrlinVasilev self-assigned this Feb 26, 2024
bishal7679 and others added 2 commits February 27, 2024 22:22
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
Signed-off-by: Bishal Das  <70086051+bishal7679@users.noreply.github.com>
@bishal7679
Copy link
Author

@Vad1mo could you pls take a look on it. Now with dagger CI it's also adding release binary to multiple pkg manager and its workflow files running successfully!

Signed-off-by: Bishal Das  <70086051+bishal7679@users.noreply.github.com>
@Vad1mo
Copy link
Member

Vad1mo commented Apr 24, 2024

build go is building not the harbor cli but rather the build.go file

Something lke this:
build = build.WithExec([]string{"go", "build", "-o", path, "/src/cmd/harbor/main.go"})

@Vad1mo
Copy link
Member

Vad1mo commented Apr 24, 2024

can you also provide instrustion on how to test ideally locally the release and pull-request flow?

Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
bishal7679 and others added 4 commits April 27, 2024 12:01
Signed-off-by: Bishal Das  <70086051+bishal7679@users.noreply.github.com>
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
Signed-off-by: bishal7679 <bishalhnj127@gmail.com>
@bishal7679
Copy link
Author

can you also provide instrustion on how to test ideally locally the release and pull-request flow?

To test the release and pull-request flow locally we need to follow the below steps:-

1. Release

  • Set the environment variable for GITHUB_TOKEN like this
     export GITHUB_TOKEN="Your GH token here"
  • after that make sure to push a new tag beforehand proceeding with release flow
     git tag -a v0.2.0 -m "message here..." && git push origin v0.2.0

NOTE:- The below command will automatically be triggered whenever a new tag will be pushed
to the repo for release

  • Now we are ready to run the release command
     go run ci/dagger.go release $GITHUB_TOKEN

2. Pull-request

  • Here just run the command with GITHUB_TOKEN set
     go run ci/dagger.go pull-request $GITHUB_TOKEN

NOTE:- This pull-request action flow will be triggered whenever a new pull-request come to this repo. At first it will check whether all test files are passed or not then will create a --snapshot for the current release and will signal for ready-to-merge

I hope this will help!!

Signed-off-by: Bishal Das  <70086051+bishal7679@users.noreply.github.com>
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

3 participants