puppetlabs / puppetlabs-servicenow_cmdb_integration

Other
1 stars 15 forks source link

11 integrate the GitHub action ci with cat-github-actions #73

Open sooyean-hoo opened 1 month ago

sooyean-hoo commented 1 month ago

TLDR;

The line which draw the conclusion that the acceptance is only for Ubuntu is @ here. https://github.com/sooyean-hoo/puppetlabs-servicenow_cmdb_integration/blob/a4c76f6b718ac9b9ee824324a904ece15b04432d/spec/support/acceptance/install_pe.sh#L8

The file install_pe.sh is used in all variant, hence all tests will failed for now, esp. even O/S Ubuntu 16.04 is not longer supported.

The task originally was to just to update the tests to bring it to date. However now it turned out to be a bigger task: writing test to work with all the missing O/S. about 10 of them. This is way more complicated, as there is also need to add more scenario and cater/reimplement for all old functions and original testing goals in the new O/S.

Now. So now only Oracle Linux 7, RedHat Linux 7 and 8, Ubuntu 18.04, 20.04 and 22.04 are part of the testing Matrix. The exclusions and the reason for it are listed below. As an overview, there are a lot difficult in running the mock-up ServiceNow server. It is still run as a docker, but for Ubuntu, they are hosted in the PE Primary server. For others, they are hosted in the Runner. This is because I only managed to get docker to play nice in Ubuntu. And yes the Runner is also of Ubuntu. There are playful manipulation of port forwardings and /etc/hosts used to standardise the access to both the PE primary serverand themock-up ServiceNow server. https://github.com/sooyean-hoo/puppetlabs-servicenow_cmdb_integration/actions/runs/10669025799

image

gregohardy commented 1 month ago

Hi @sooyean-hoo. Great stuff. Dont forget to squash your commit so we can review it.

sooyean-hoo commented 1 month ago

@gregohardy I squashed it before... to a few commits actually... Anyway with the recent update, I squashed it further to only 1 commit...

Along with the squash, I add a new O/S to the matrix. I cannot explain why I can get OracleLinux 7 and RHEL-8 working, but not OracleLinux 8.......

I was also puzzled why I wrote... https://github.com/sooyean-hoo/puppetlabs-servicenow_cmdb_integration/blob/386d71745ace9395d91a7d09ac5bee95ec393a97/.github/workflows/ci_proposed.yml#L78

# \"OracleLinux-8\", = ?????

Hence I did a review on OracleLinux 8. It turns out that matrix_from_metadata_v2 @ https://github.com/puppetlabs/puppet_litmus/blob/v0.36.1/exe/matrix_from_metadata_v2 (version 0.36.1) will reject OracleLinux 8 as it cannot find a match.

Hence I cannot translate it into a vagrant VM. To which I need to do some 'magic' to include it.

Long Story short, I squashed the commits into 1 and extended the number of O/Ses in the testing matrix from 6 to 7, with the new O/S as Oracle Linux 8 and the original 6 O/Ses as OracleLinux 7, Ubuntu 18.04, 20.04 22.04 and RedHat 7 & 8 .

As the time of this comment, the tests are still running. Hence I am not sure how good or bad the results are. Sometimes it needs a bit of nudge aka re-run the failed one to work. I did test before in another branch. It was successful for the OracleLinux 8. See: https://github.com/sooyean-hoo/puppetlabs-servicenow_cmdb_integration/actions/runs/10679611998/job/29599273899