Commit 65ce8016 authored by Alessio Caiazza's avatar Alessio Caiazza

Merge branch 'add-default-workflow-and-rules' into 'master'

Set default, workflow, and use rules in CI config

See merge request gitlab-org/gitlab-workhorse!489
parents 23da85f7 515272d0
image: golang:1.12
workflow:
rules:
# For merge requests, create a pipeline.
- if: '$CI_MERGE_REQUEST_IID'
# For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.).
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
# For tags, create a pipeline.
- if: '$CI_COMMIT_TAG'
# For stable branches, create a pipeline.
- if: '$CI_COMMIT_BRANCH =~ /^[\d-]+-stable$/'
default:
image: golang:1.12
tags:
- gitlab-org
# Disable DIND for SAST because we need to execute a before_script in the gosec-sast job
variables:
......@@ -8,7 +22,7 @@ verify:
script:
- make verify
.test_template: &test_definition
.test:
services:
- name: registry.gitlab.com/gitlab-org/build/cng/gitaly:latest
# Disable the hooks so we don't have to stub the GitLab API
......@@ -22,20 +36,20 @@ verify:
- make test
test using go 1.12:
extends: .test
image: golang:1.12
<<: *test_definition
test using go 1.13:
extends: .test
image: golang:1.13
<<: *test_definition
test using go 1.14:
extends: .test
image: golang:1.14
<<: *test_definition
test:release:
only:
- tags
rules:
- if: '$CI_COMMIT_TAG'
script:
- git describe --exact-match
......@@ -47,7 +61,7 @@ gosec-sast:
before_script:
- apk add make
- make install
code_navigation:
image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6-golang-1.14-git-2.24
allow_failure: true
......@@ -59,4 +73,4 @@ code_navigation:
- mv dump.lsif.tmp lsif
artifacts:
paths:
- lsif/
\ No newline at end of file
- lsif/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment