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

before_script needs to be an array #630

Merged
merged 2 commits into from Mar 16, 2022

Conversation

baurmatt
Copy link
Contributor

Purpose

Fix Gitlab CI pipeline

jobs:mamba:before_script config should be an array containing strings and arrays of strings

Approach

Converting the YAML object type to an array

Open Questions and Pre-Merge TODOs

  • Use github checklists. When solved, check the box and explain the answer.

Resources & Links

Links to blog posts, patterns, libraries or addons used to solve this problem

Otherwise CI fails with:

```
jobs:mamba:before_script config should be an array containing strings and arrays of strings
```
@coveralls
Copy link

coveralls commented Mar 16, 2022

Coverage Status

Coverage remained the same at 97.835% when pulling 05aead8 on baurmatt:gitlab-ci-before-script into 5869402 on pyscaffold:master.

@abravalheri
Copy link
Collaborator

Hi @baurmatt, thank you very much for the PR.

Can I ask you how you are getting this error? Is this an specific linting tool?

I have tested the pipeline definition with the before_script being a string instead of an array and everything seems to be running fine as shown here: https://gitlab.com/pyscaffold/ci-tester/-/jobs/2193180299.
(The pipeline configuration can be found here: https://gitlab.com/pyscaffold/ci-tester/-/blob/2a65db816b6bbba146e0fe7338ad5cc389701676/.gitlab-ci.yml)

I also cannot find any error with the CI editor/lint: https://docs.gitlab.com/ee/ci/pipeline_editor/index.html

@baurmatt
Copy link
Contributor Author

@abravalheri This was a CI job running on a self hosted Gitlab Enterprise 14.7.4. Interesting that it works on gitlab.com 🤔

@abravalheri
Copy link
Collaborator

Might be a version thing...

If that is the case, maybe the best is to use arrays for all the scripts, before_scripts, after_scripts, etc right? What do you think?

Would you be interesting in changing the other places as well?

@baurmatt
Copy link
Contributor Author

Might be a version thing...

Probably, I have no explanation for it oO

Might be a version thing...

Sounds good!

Would you be interesting in changing the other places as well?

Sure thing! Done :)

@abravalheri
Copy link
Collaborator

Amazing!

Thank you very much for all the help @baurmatt. I will merge this change, run some tests in our ci-tester repository on GitLab (just as a sanity check) and then release a patch version shortly.

@abravalheri abravalheri merged commit 30d194b into pyscaffold:master Mar 16, 2022
abravalheri added a commit to pyscaffold/ci-tester that referenced this pull request Mar 16, 2022
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.

None yet

3 participants