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

versatile-data-kit: remove global image from Gitlab CI #2466

Merged
merged 4 commits into from
Jul 28, 2023

Conversation

antoniivanov
Copy link
Collaborator

@antoniivanov antoniivanov commented Jul 25, 2023

In GitLab CI, you can specify certain settings globally, affecting the entire CI/CD pipeline. These are called "global keys. There is a global key that defines a specific Docker image (image:)

Now, the problem arises when we define the same global key in multiple YAML files within the repository. Since global keys are not scoped to specific files, they can clash and cause conflicts. When GitLab processes the CI configuration, it reads all the YAML files and applies the settings in the order they are imported.

If the same global key appears in different files, the last occurrence of that key in the import order will overwrite the previous ones. This behavior can lead to unintended consequences. For example, we might encounter unexpected Docker images being used for certain jobs.

To prevent this from happening I am removing all global image: keys except in root level gitlab ci file to avoid any potential issues.

Specific images needed are set on job-level which is scoped to a job. This is the best practice that we should follow and not rely on defaults.

In GitLab CI, you can specify certain settings globally, affecting the
entire CI/CD pipeline. These are called "global keys. There is a global
key that defines a specific Docker image (image:)

Now, the problem arises when we define the same global key in multiple
YAML files within the repository. Since global keys are not scoped to
specific files, they can clash and cause conflicts. When GitLab
processes your CI configuration, it reads all the YAML files and applies
the settings in the order they are imported.

If the same global key appears in different files, the last occurrence
of that key in the import order will overwrite the previous ones. This
behavior can lead to unintended consequences. For example, we might
encounter unexpected Docker images being used for certain jobs.

To prevent this from happening I am removing all global `image:` keys
except in root level gitlab ci file to avoid any potential issues.

Specific images needed are set on job-level which is scoped to a job.
@antoniivanov antoniivanov merged commit ccea46a into main Jul 28, 2023
10 checks passed
@antoniivanov antoniivanov deleted the person/aivanov/vdk-plugins branch July 28, 2023 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants