- Issue created by @jonathan1055
- 🇬🇧United Kingdom jonathan1055
Testing in GTD by trying to erase the
variables:
here in the 'd10-theme' downstream trigger did not work. So I used GTD MR8 directly to test this. It worked fine and we get the warning jobhttps://git.drupalcode.org/issue/gitlab_templates_downstream-3503337/-/p...
I used three different 'warning' symbols, and the yellow one looks the best I think. Now we need to settle on the job name. It does not necessarily have to include the word 'pre' as that stage name is shown in the pipeline.
- 🇪🇸Spain fjgarlin
Thanks!
Agree on ⚠️.
I gave a few suggestions for the name in the MR but happy to go with any. - 🇬🇧United Kingdom jonathan1055
Thanks for your comments in the MR. I changed the jobname to "Pipeline set-up failed" and here's the test
https://git.drupalcode.org/project/gitlab_templates_downstream/-/pipelin... - 🇪🇸Spain fjgarlin
I think it looks much cleaner. Since this is a (mostly) internal job, it's all good to go.
RTBC. -
fjgarlin →
committed 706f76e9 on main authored by
jonathan1055 →
Issue #3526765 by jonathan1055, fjgarlin: Rename 'environment check' job...
-
fjgarlin →
committed 706f76e9 on main authored by
jonathan1055 →
- 🇪🇸Spain fjgarlin
Do we want to copy the whole job to D7? Happy to do it here or as a follow-up.
- 🇬🇧United Kingdom jonathan1055
Yes let's do it here. Need to do something else right now, but will follow up tomorrow or later.
- Merge request !364#3526765 Add .pre stage set-up checking job to D7 → (Merged) created by jonathan1055
- 🇬🇧United Kingdom jonathan1055
We did not have this job at all in the D7 template (sounds like you had already discovered that).
I have used GTD MR17 to erase all
variables:
and here is a test using default ref as-is. We get a .pre deprecation warning job, but obviously it cannot show anything helpful.Here is a test using MR364. We get the new "pipeline set-up failed" job. But the additional deprecation job is confusing. The log has nothing, because the image cannot be loaded, due to the variables being blank. So I am going to make that better by using the hard-coded alpine image, like we do with the new checking job.
- 🇬🇧United Kingdom jonathan1055
Testing for
&& $SKIP_COMPOSER != null
did not prevent the deprecation job running, see this test which has an oddsh: : unknown operand
at the end of the unwanted deprecation log.So I have used the same method that we have in the D10+ template, where we use the
*opt-in-current-rule
. This aligns the templates, and also achieves what we want, namely no confusing deprecation job, just the 'pipeline set-up failed' job.
https://git.drupalcode.org/project/gitlab_templates_downstream/-/pipelin...This is ready for review and feedback.
- 🇪🇸Spain fjgarlin
Cool. Using the
alpine
image is a good choice here.Maybe we can avoid having these duplicate
.pre
jobs, as in this case, if "Pipeline set-up failed", we know that any other subsequent job is going to fail.I think we can add to the other
.pre
jobs (in D7 and D10+) the condition:- if: $_CONFIG_DOCKERHUB_ROOT != null
, so they only run if the variables are set up. We could even make that rule reusable and add it to the.composer-base
job as well. - 🇬🇧United Kingdom jonathan1055
I avoided the deprecation job from running by adding the rule that check for current. But I think your solution of checking
$_CONFIG_DOCKERHUB_ROOT != null
might be simpler to understand, so I'll try that.We could even make that rule reusable and add it to the .composer-base job as well.
If we stopped the Composer jobs from being added, then we'd also have to add that rule to every other job which "needs:" a composer job. If we did not do that, the pipeline would not be built because the 'needed' job would not exist. But if you think it is worth editting every single job just so that we only show the "pipeline set-up failed" job in this scenario, then we can do that. It would make the problem very clear for anyone, as they would only get that one job.
- 🇪🇸Spain fjgarlin
No need to spread everywhere then. I think the improvements we've made / are making will be good enough, and at the very least, clearer than before.
[edit] I didn't initially think of the "needs" and "dependencies" involved.
- 🇬🇧United Kingdom jonathan1055
I've made the change to use nage to
$_CONFIG_DOCKERHUB_ROOT
and I used== null
withwhen: never
. The conditional!= null
did not appear to work as expected above (comment #13) but we know that positive testing for== null
does work.Tested here https://git.drupalcode.org/project/gitlab_templates_downstream/-/pipelin...
Ready for review.
- 🇪🇸Spain fjgarlin
fjgarlin → changed the visibility of the branch main to hidden.
-
fjgarlin →
committed 548639c5 on main authored by
jonathan1055 →
Issue #3526765 by jonathan1055, fjgarlin: Rename 'environment check' job...
-
fjgarlin →
committed 548639c5 on main authored by
jonathan1055 →