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

WIP: Use gitlab API to get the latest version #928

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

debasishbsws
Copy link
Member

@debasishbsws debasishbsws commented Jun 3, 2024

For this code to work it needs chainguard-dev/melange#1231 code changes in melange.

To tryout locally

  1. Clone the melange repository locally and checkout to Add GitLabMonitor update configuration chainguard-dev/melange#1231
  2. use replace chainguard.dev/melange => ../your-local-melange-clone-path in the end of your wolfictl go.mod file and run go mod tidy

It should now use the local melange copy to build.

How it works:

for packages that are using gitlab projects we can use it to get the latest version ant its corresponding commit. for example in gitlab-pages package modify the update block with

update:
  enabled: true
  gitlab:
    identifier: gitlab-org/gitlab-pages
    strip-prefix: v
    use-tag: true

And now we can run ../wolfictl check update gitlab-pages.yaml or any other command.

NOTE: Need a GitLab token without any permission, set it in your env var export GITLAB_TOKEN=your-gitlab-token

@debasishbsws debasishbsws changed the title WIP: Use gitlab API to get the latest version from its tag and commit sha WIP: Use gitlab API to get the latest version Jun 3, 2024
Signed-off-by: debasishbsws <[email protected]>
Signed-off-by: debasishbsws <[email protected]>
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.

1 participant