Skip to content

Combine catalogd and operator-controller goreleaser configurations #1342

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

Closed
Tracked by #1335
OchiengEd opened this issue Oct 3, 2024 · 7 comments · Fixed by #1542
Closed
Tracked by #1335

Combine catalogd and operator-controller goreleaser configurations #1342

OchiengEd opened this issue Oct 3, 2024 · 7 comments · Fixed by #1542
Assignees

Comments

@OchiengEd
Copy link
Contributor

Combine goreleaser files from the catalogd and operator-controller files.

@jsm84
Copy link
Contributor

jsm84 commented Nov 21, 2024

Linked to internal Jira story EET-4420.

@LalatenduMohanty LalatenduMohanty self-assigned this Dec 10, 2024
@LalatenduMohanty
Copy link
Member

We can use GoReleaser within a monorepo and use tag prefixes to mark "which tags belong to which sub project" [1]

[1] https://goreleaser.com/customization/monorepo/

@LalatenduMohanty
Copy link
Member

We can create a .goreleaser.yaml for each subproject

# subroj1/.goreleaser.yaml
project_name: subproj1

monorepo:
  tag_prefix: subproject1/
  dir: subproj1

Then, you can release with (from the project's root directory):

goreleaser release --clean -f ./subproj1/.goreleaser.yaml

@LalatenduMohanty
Copy link
Member

After the monorepo prep script is run the go releaser is working fine

go: module github.com/operator-framework/catalogd: not a known dependency
(re)installing /home/lmohanty/go/bin/goreleaser-v1.26.2
/home/lmohanty/go/bin/goreleaser-v1.26.2 --snapshot --clean
  • starting release...
 xxxxxxx
  • release succeeded after 14s
  • thanks for using goreleaser!
 
=======================================================
lmohanty@LenovoP16v:~/code/operator-controller/catalogd$ make release 
sed: can't read go.mod: No such file or directory
/home/lmohanty/go/bin/goreleaser-v1.26.2 --snapshot --clean
  • starting release...
xxxxxx
  • release succeeded after 46s
  • thanks for using goreleaser!

@LalatenduMohanty
Copy link
Member

However there are two warnings i.e. for operator-controller go: module github.com/operator-framework/catalogd: not a known dependency and catalogd sed: can't read go.mod: No such file or directory

@LalatenduMohanty
Copy link
Member

So current goreleaser files work fine after the monorepo script is run. However the release of operator-controller will get all change long from catalog directory as well, which is not desired.

@LalatenduMohanty
Copy link
Member

As discussed in the #olm-dev slack channel. We do not need any changes in the go-releaser files.

[1] https://kubernetes.slack.com/archives/C0181L6JYQ2/p1734649103901029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants