Is it possible in gitlab-ci to run a job on different runners depending on the availability/busy of the runner? That is, I have a main runner that should do the main work, but in case it is busy or not available, I want shared runners to be used I tried something like this, but the… Read More How can I configure GitLab-CI to use shared runners when my main runner is not available?
I created GitLab job to create git tag and push to the repository as following: add tag: extends: .install_dependencies stage: deploy image: name: nexus-docker.ship.gov.sg/python:latest entrypoint: ["/bin/bash"] script: – echo "This job deploys something from the $CI_COMMIT_BRANCH branch." – git tag -a v"$VERSION" -m version"$VERSION" – git push origin v"$VERSION" rules: – if: $CI_COMMIT_BRANCH == $CI_COMMIT_BRANCH… Read More Tagging in gitlab CI running multiple times
Hey fellow developers, I use gitlab-ci, with my own gitlab-runner running as a docker image on the server (Ubuntu 22.04, Docker 20.10, Docker image: gitlab/gitlab-runner:latest). I want to use some sudo commands inside the container. How can I do that ? Thanks for any help. >Solution : You can install sudo from you docker file:… Read More gitlab-ci docker | using sudo inside container
I have the following stages: – stage1 – stage2 variables: MY_ENV_VAR: env_$CI_JOB_ID stage1_build: stage: stage1 script: – echo $MY_ENV_VAR stage2_build: stage: stage2 script: – echo $MY_ENV_VAR I get different values for $MY_ENV_VAR in the two stages (which means $CI_JOB_ID changes on every stage). What I want is set $MY_ENV_VAR once with one value of $CI_JOB_ID… Read More Use $CI_JOB_ID as a constant across multiple stages of Gitlab pipeline