-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(gitlab-ci) Initial implementation of CI with GitLab CI
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters