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

fix(gitlabci): Update local include files #8810

Merged
merged 3 commits into from Mar 13, 2021

Conversation

l0nax
Copy link
Contributor

@l0nax l0nax commented Feb 22, 2021

Changes:

This PR fixes the problems as described in #6713 where the include:local blocks from the GitLab CI YAML file where ignored by renovate.

Context:

Fixes #6713

Reimplementation of #8805.

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 unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

lib/manager/gitlabci/index.ts Show resolved Hide resolved
lib/manager/gitlabci/extract.ts Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Feb 23, 2021

@rarkins I think we should merge gitlabci-include to gitlabci as they both do nearly the same.

@l0nax
Copy link
Contributor Author

l0nax commented Feb 23, 2021

@rarkins I think we should merge gitlabci-include to gitlabci as they both do nearly the same.

@viceice should this be part of this PR?

@l0nax l0nax requested a review from viceice February 24, 2021 08:05
@rarkins rarkins marked this pull request as draft February 28, 2021 06:02
@rarkins
Copy link
Collaborator

rarkins commented Mar 1, 2021

@rarkins I think we should merge gitlabci-include to gitlabci as they both do nearly the same.

@viceice should this be part of this PR?

No, it should be done before or after to keep the refactoring separate

@l0nax
Copy link
Contributor Author

l0nax commented Mar 1, 2021

@rarkins I think we should merge gitlabci-include to gitlabci as they both do nearly the same.

@viceice should this be part of this PR?

No, it should be done before or after to keep the refactoring separate

And what should we do for the things mentioned here #8810 (comment)?

@l0nax
Copy link
Contributor Author

l0nax commented Mar 2, 2021

@rarkins @viceice

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.

needs deconflicting

lib/manager/gitlabci/extract.spec.ts Outdated Show resolved Hide resolved
lib/manager/gitlabci/extract.ts Show resolved Hide resolved
lib/manager/gitlabci/index.ts Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Mar 8, 2021

first finish this, then merge managers in separate pr

@l0nax
Copy link
Contributor Author

l0nax commented Mar 11, 2021

@viceice sorry for my late response, I had to finish some internal stuff. I've added a seen file list to prevent an endless loop as requested by you.

@l0nax l0nax marked this pull request as ready for review March 11, 2021 11:39
@l0nax l0nax requested a review from viceice March 11, 2021 11:39
lib/manager/gitlabci/extract.ts Outdated Show resolved Hide resolved
lib/manager/gitlabci/extract.ts Outdated Show resolved Hide resolved
If local files are imported from the GitLab CI YAML file, the
dependencies will be recognized but not updated by renovate.
Renovate needs to respect the 'include:local' imports and update the
depedependencies in those files.

`extractPackageFile` is replaced by `extractAllPackageFiles` since the
functionality of those two functions are the same.

Related to renovatebot#6745
Fixes renovatebot#6713
}
}

const result = extractPackageFile(content);
Copy link
Member

Choose a reason for hiding this comment

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

@HonkingGoose Please open a new issue:

Refactor extractPackageFile to use js-yaml and reuse already parsed object from extractAllPackageFiles.
So we should extract a new function parseDoc to be reused by both extract functions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done, see #9115. 😉

@rarkins rarkins changed the title fix(manager/gitlabci): Update local include files fix(gitlabci): Update local include files Mar 13, 2021
@rarkins rarkins enabled auto-merge (squash) March 13, 2021 09:33
@rarkins rarkins merged commit b7b268e into renovatebot:master Mar 13, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.80.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gitlab-ci include:local not working
5 participants