gitlab-ci
GitLab CI Pipeline Stage Timeout
You can set a global timeout in “Project settings -> CI/CD Pipelines -> Timeout” or “Project settings -> Builds -> Timeout” in older versions. As of version 12.3, you can set a timeout per stage in your CI .yml file using timeout: timeout allows you to configure a timeout for a specific job. For example: … Read more
Gitlab CI/CD job’s log exceeded limit
To change the build log size of your jobs in Gitlab CI/CD, you can edit your config.toml file and add a new limit in kilobytes: [[runners]] output_limit = 10000 According to the documentation output_limit : Maximum build log size in kilobytes. Default is 4096 (4MB). For this to take effect, you need to restart the … Read more
How to use Gitlab CI to build a Java Maven project?
Register a Docker runner and use one of the official Maven Docker images, e.g., maven:3-jdk-11 in your .gitlab-ci.yml file: image: maven:3-jdk-11 build: script: “mvn install -B” Note the -B flag, which is recommended for non-interactive use. As far as I understand, it does not matter whether the runner is shared or specific.
How can I test gitlab-ci.yml?
For the record: You can also copy paste your gitlab-ci.yml into the linter-form provided by gitlab: Depending on which IDE you are using you might be able to find plugins that check for validity. For example in VS Code you can use a plugin called gitlab-vscode-extension which can validate your .gitlab-ci.yml file. In case you … Read more
How to enable maven artifact caching for GitLab CI runner?
Gitlab CI allows you to define certain paths, which contain data that should be cached between builds, on a per job or build basis (see here for more details). In combination with khmarbaise’s recommendation, this can be used to cache dependencies between multiple builds. An example that caches all job dependencies in your build: cache: … Read more
Role of docker-in-docker (dind) service in gitlab ci
what is the difference between the docker:dind and the docker:latest images? docker:latest contains everything necessary to connect to a docker daemon, i.e., to run docker build, docker run and such. It also contains the docker daemon but it’s not started as its entrypoint. docker:dind builds on docker:latest and starts a docker daemon as its entrypoint. … Read more