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

Simplify the ccache/git latest version fetch #1312

Merged
merged 4 commits into from
Jun 12, 2018
Merged

Simplify the ccache/git latest version fetch #1312

merged 4 commits into from
Jun 12, 2018

Conversation

LucaLanziani
Copy link
Contributor

Use an ansible filter to fetch the latest version

Still to verify if the grep -Eo works as expected on OSX

@LucaLanziani
Copy link
Contributor Author

If we think it's ok to merge this I'll squash the commits

@refack
Copy link
Contributor

refack commented Jun 3, 2018

If we think it's ok to merge this I'll squash the commits

Need to make sure grep -Eo is available on all platforms 🤕
We have several non GNU (freeBSD, smartOS, AIX) ones.

I'd run ansible test* -a "cat x | grep -Eo" but I'm recovering from a complete SSD wipe, and still don't have my WSL (Ubuntu on Windows) up and running.

BTW @LucaLanziani Do you have experience with setting up an Ansible Tower (or AWX or Semaphore). It might be useful for running playbooks for maintenance and upgrades. ATM we use sometimes use Jenkins jobs for that.

Use an ansible filter to fetch the latest version

Still to verify if the `grep -Eo` works as expected on OSX
With the current version of the regex we are matching even non
semver version (eg. versions with 4 digits)

This solution seems to work with any number of digits on the version.

A possible alternative (we might prefer) is that to change the regex
only to match versions with 2/3 digits and then we can go back
using the python `StrictVersion` function.
@LucaLanziani
Copy link
Contributor Author

Need to make sure grep -Eo is available on all platforms face_with_head_bandage
We have several non GNU (freeBSD, smartOS, AIX) ones.

Yeah, this is exactly my fear.

Unfortunately @refack I have no experience with Ansible Tower or alternatives, never had to use it, I use jenkins too in my projects.

Btw I saw that in the previous implementation the code was just matching semver version (2 or 3 digits) ignoring the versions with 4 digits.
As for the comment in the second commit I can change the regex to have the same behavior and then we can go back using the StrictVersion function in python.

Ansible offers the regex_findall filter that works like the
grep -Eo with the plus of being OS independent.
@LucaLanziani
Copy link
Contributor Author

@refack the last commit should solve the is grep -Eo available on all platforms problem ;)

maclover7

This comment was marked as off-topic.

LucaLanziani

This comment was marked as off-topic.

@LucaLanziani
Copy link
Contributor Author

@maclover7 sure, setup/* reverted, left a comment myself about the new regex.

maclover7

This comment was marked as off-topic.

@maclover7 maclover7 merged commit bb7ac13 into nodejs:master Jun 12, 2018
@maclover7
Copy link
Contributor

Landed in bb7ac13

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.

3 participants