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

How to run a gitlab-ci.yml job only on a tagged branch?

This behavior will be introduced in version 12. Open issue was recently update: Jason Lenny @jlenny changed title from {-Update .gitlab-ci.yml to support conjunction logic for build conditions-} to Conjunction logic for build conditions MVC · 2 days ago Jason Lenny @jlenny changed milestone to 12.0 · 2 days ago (fingers crossed) A solution is … Read more

Multiline YAML string for GitLab CI (.gitlab-ci.yml)

I came here preemptively expecting this would be an issue but the following “multi-line” command for readability is working for me: Gitlab Runner: Shell Runner version 1.11.0 / Gitlab version: 8.17.2 myjob: stage: deploy script: # Single line command – az component update –add sql # Multi-line command – az sql server create -n ${variable} … Read more