Relative Content

Tag Archive for gitgitlabgitlab-cigitlab-ci-runner

Gitlab Runner submodule update fails when using GIT_STRATEGY: fetch if submodule moved between commits

First of all, the pipeline’s GIT_STRATEGY: fetch is a requirement since the “clone” strategy is too costly. However, it doesn’t seem to work when sequentially triggering pipelines on commits which have different git project structure. If a submodule moved, the runner simply won’t be able to correctly update the submodules, probably because it is using git in a way that wasn’t anticipating this scenario. Here’s the case:

How to Add Interactive Prompts in GitLab CI/CD Pipelines?

I am using GitLab CI/CD for deployments. When the GitLab pipeline runs on the main branch, it deploys code/resources into the pre-prod environment. Now, I want to add prompts in pre-prod pipelines. That is, when the pipeline triggers on the main branch and starts the first stage, I need to add a prompt asking a series of questions to the trigger. The pipeline should wait until it receives the answer from the user, and based on the answers, the further steps of the scripts should be executed. Is it possible to achieve this functionality in GitLab? Is there any alternative other than manually passing variables before running the ‘Run Pipeline’ options?