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

feat(gitlab-ci): ref add logic for updating non top level includes #16819

Merged
merged 4 commits into from Aug 16, 2022

Conversation

fredrondina
Copy link
Contributor

@fredrondina fredrondina commented Jul 27, 2022

Changes

Context

Current gitlab-ci ref bump logic only accounts for include sections that are at the top level of the .gitlab-ci.yml. This does not allows for the pipeline ref's contained within any subsection (such as within another job) of the .yml file to be updated. This pattern is commonly seen in .gitlab-cy.yml files used to configure parent child pipelines.

Closes #16833
Closes #9610

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Jul 27, 2022

CLA assistant check
All committers have signed the CLA.

@fredrondina fredrondina changed the title gitlab-ci ref: add logic for updating non top level includes feat: gitlab-ci ref add logic for updating non top level includes Jul 27, 2022
@a1flecke
Copy link

This is awesome. We really need this Gitlab CI ref support before we can use renovate in our enterprise

@rmacconn
Copy link

This would be awesome to be able to support Gitlab refs at all levels.

@fredrondina
Copy link
Contributor Author

image

There seems to be a bug with the CLA status check, I have signed it and attached a screenshot showing this.

@a1flecke
Copy link

@astellingwerf @fredrondina any updates on when this will land?

@fredrondina fredrondina dismissed a stale review via ae41b48 August 1, 2022 16:54
@a1flecke
Copy link

a1flecke commented Aug 3, 2022

@viceice, @astellingwerf, @secustor, @fredrondina Looks like this is coming along nicely. Do you think this will land this week?

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

we should probably merge both managers before this PR as planned for future

lib/modules/manager/gitlabci-include/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci-include/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci-include/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci-include/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci/extract.ts Outdated Show resolved Hide resolved
@a1flecke
Copy link

a1flecke commented Aug 4, 2022

we should probably merge both managers before this PR as planned for future

Hey @viceice. Would it be possible to get this in first? My company is transitioning to Gitlab CI and wants to adopt renovate and move away from dependabot since dependabot does not support gitlab includes. We are using a lot of gitlab triggers that include refs. Renovate does not currently bump those refs since they are not top level. This is stopping us from launching renovate.

@viceice
Copy link
Member

viceice commented Aug 4, 2022

we should probably merge both managers before this PR as planned for future

Hey @viceice. Would it be possible to get this in first? My company is transitioning to Gitlab CI and wants to adopt renovate and move away from dependabot since dependabot does not support gitlab includes. We are using a lot of gitlab triggers that include refs. Renovate does not currently bump those refs since they are not top level. This is stopping us from launching renovate.

you need at least fix all requested changes

@fredrondina
Copy link
Contributor Author

Requested changes have been made, ready for re-review

lib/modules/manager/gitlabci-include/common.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci-include/common.ts Outdated Show resolved Hide resolved
@a1flecke
Copy link

a1flecke commented Aug 8, 2022

Any updates on this?

@a1flecke
Copy link

a1flecke commented Aug 9, 2022

@viceice, @secustor , @astellingwerf , @rarkins , @fredrondina is this close? If not then we will need to launch Renovate with gitlab ci support turned off.

lib/modules/manager/gitlabci-include/extract.spec.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci-include/extract.ts Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci/__fixtures__/gitlab-ci.5.yaml Outdated Show resolved Hide resolved
lib/modules/manager/gitlabci/extract.ts Outdated Show resolved Hide resolved
astellingwerf
astellingwerf previously approved these changes Aug 10, 2022
viceice
viceice previously approved these changes Aug 10, 2022
rarkins
rarkins previously approved these changes Aug 10, 2022
@viceice viceice enabled auto-merge (squash) August 10, 2022 18:07
@fredrondina
Copy link
Contributor Author

I am still having issues with the CLA check, I think it is due to some of my commits not being verified. What is the best step for me to take to get this last check passing?

@viceice
Copy link
Member

viceice commented Aug 10, 2022

probably squash or rebase your commits and fix author.

@fredrondina
Copy link
Contributor Author

squashed and rebased in order to fix commit verification

astellingwerf
astellingwerf previously approved these changes Aug 11, 2022
Copy link
Collaborator

@astellingwerf astellingwerf left a comment

Choose a reason for hiding this comment

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

This is your chance to sneak something extra in, because I'm just gonna assume that the squashed commit is identical to the 25+ earlier commits combined.

viceice
viceice previously approved these changes Aug 11, 2022
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

nothing changed from gut perspective 👍

@rarkins rarkins changed the title feat: gitlab-ci ref add logic for updating non top level includes feat(gitlab-ci): ref add logic for updating non top level includes Aug 12, 2022
@rarkins rarkins enabled auto-merge (squash) August 12, 2022 04:49
@fredrondina
Copy link
Contributor Author

Any idea when this will be merged?

@astellingwerf
Copy link
Collaborator

That won't be until at least after the conflicts are resolved.

@fredrondina
Copy link
Contributor Author

That won't be until at least after the conflicts are resolved.

Ok, can I rebase to fix the conflict, and then force push back to my branch?

@viceice
Copy link
Member

viceice commented Aug 15, 2022

no, please do merge commit with the fix

@rarkins rarkins marked this pull request as draft August 16, 2022 06:04
auto-merge was automatically disabled August 16, 2022 06:04

Pull request was converted to draft

@fredrondina fredrondina dismissed stale reviews from viceice and astellingwerf via d37bd79 August 16, 2022 13:40
@fredrondina fredrondina marked this pull request as ready for review August 16, 2022 13:40
@fredrondina
Copy link
Contributor Author

Merge conflicts resolved, ready for re-review

@viceice viceice enabled auto-merge (squash) August 16, 2022 15:26
@viceice viceice merged commit 21ff27d into renovatebot:main Aug 16, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.161.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
9 participants