Skip to content

Commit

Permalink
(gitlab-ci) Initial implementation of CI with GitLab CI
Browse files Browse the repository at this point in the history
  • Loading branch information
leipert committed Sep 1, 2020
1 parent dcf9c93 commit 667be3f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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'
# Temporarly create Ci for every branch:
- if: '$CI_COMMIT_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.15
tags:
- gitlab-org

# Disable DIND for SAST because we need to execute a before_script in the gosec-sast job
variables:
SAST_DISABLE_DIND: "true"

include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml

gosec-sast:
before_script:
- apk add make
- make install

code_navigation:
image: golang:latest
allow_failure: true
script:
- go get github.com/sourcegraph/lsif-go/cmd/lsif-go
- lsif-go
artifacts:
reports:
lsif: dump.lsif

.test:
variables:
GOPATH: "/builds/go"
GIT_CLONE_PATH: $GOPATH/src/github.com/zaquestion/lab
script:
- go version
- make test

test-1.13:
extends: .test
image: golang:1.13

test-1.14:
extends: .test
image: golang:1.14

test-1.15:
extends: .test
image: golang:1.15
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ changelog:
# Default is empty
exclude:
- '^\(docs\)'
- '^\(gitlab-ci\)'
- '^\(travis\)'
- '^\(coverage\)'
- '^\(tests?'
Expand Down

0 comments on commit 667be3f

Please sign in to comment.