
GitLab CI syntax to write FOR loop statement? - Stack Overflow
Sep 18, 2018 · This may do what the OP wants to do, but let me still add a warning here: This executes the whole for loop as one CI script, so Gitlab will only see the return code of the entire loop. In bash, a for loop has the return code of the last statement of the last iteration, so the CI target will only fail if that last statements fails and hide ...
GitLab CI: Export variable in before_script build job
Jul 8, 2019 · GitLab Runner internal variable expansion mechanism. Not supported: variables defined inside of custom scripts (for example, export MY_VARIABLE="test"). So, you have 3 (three) options: project/group variables.gitlab-ci.yml variables; config.toml variables
How to make a simple GitLab Ci/CD gitlab-ci.yml file to build an ...
Aug 15, 2022 · First, by following the gitlab-ci documentation, you should not mix stages, with .pre and .post. please take a look at Gitlab CI stages, in this matter. Next, for the matter of artifacts, you do not need to specifically set path to artifacts, as they are kept between subsequent stages.
How to use Gitlab CI to build a Java Maven project?
Oct 30, 2015 · According to the Gitlab documentation you only need to create a .gitlab-ci.yml file, the Gitlab implementation of Travis-CI. Now from the looks of it you can accomplish a lot with the .gitlab-ci.yml, but a lot of the documentation is referencing Ruby and other languages. Nothing is said about how to build Java Maven projects.
yaml - How to setup a dynamic gitlab-ci file - Stack Overflow
Jul 2, 2019 · Thanks to Ivan I found the perfect solution, what i've done is create 1 gitlab-ci that includes all others and within each specific file I used the only keyword like Ivan suggested. Now my files look like this: The gitlab-ci that is present on project level ( in each project ): include: - project: 'tools/gitlab-ci' file: '/selector.yml'
Clone another GitLab repository in GitLab CI script
Nov 20, 2018 · As New CI job permissions model states that there are 2 options: use gitlab-ci-token:${CI_JOB_TOKEN} or write it to ~/.netrc (doesn't work for me). But we have multiple dependent repositories defined in package.json so our solution is to overwrite git config
Conditional variables in gitlab-ci.yml - Stack Overflow
Aug 13, 2019 · Unfortunatelly YAML-anchors or GitLab-CI's extends don't seem to allow to combine things in script array of commands as of today. I use built-in variable CI_COMMIT_REF_NAME in combination with global or job-only before_script to solve similar tasks without repeating myself.
GitLab CI/CD - Change Working Directory - Stack Overflow
Apr 24, 2018 · I am trying to implement a CI/CD pipeline for Terraform, however I need to change the pwd before running any further commands. It appears the Terraform container only accepts Terraform commands, ...
gitlab ci - How to run the ci on windows, linux and macos ... - Stack ...
Sep 1, 2021 · Since GitLab 14.1 it's possible to use the parallel: matrix: keyword in combination with tags, e.g. build: script: - npm install --progress=false - npm run electron:build parallel: matrix: - PLATFORM: [linux, macos, windows] tags: - ${PLATFORM}
How do I pass credentials to pull a submodule in a Gitlab CI script ...
The gitlab CI runs the cookiecutter and generate the project that I want to test. However, ...