diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 129 |
1 files changed, 4 insertions, 125 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a6098fbe..08a5a641 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,3 @@ -include: - - template: Security/License-Scanning.gitlab-ci.yml - - template: Security/SAST.gitlab-ci.yml - - template: Security/Dependency-Scanning.gitlab-ci.yml - stages: - prepare - test @@ -19,6 +14,10 @@ workflow: - if: '$CI_COMMIT_BRANCH =~ /^[\d-]+-stable(-ee)?$/' - if: '$CI_COMMIT_BRANCH =~ /^security\//' +include: + - local: .gitlab/ci/prepare.yml + - local: .gitlab/ci/test.yml + default: image: golang:1.13 tags: @@ -32,123 +31,3 @@ default: cache: paths: - .GOPATH/pkg/mod/ - -.tests: - extends: .go-mod-cache - stage: test - tags: - - gitlab-org-docker - needs: ['download deps'] - script: - - echo "Running all tests without daemonizing..." - - make test - - echo "Running just the acceptance tests daemonized (tmpdir)...." - - TEST_DAEMONIZE=tmpdir make acceptance - - echo "Running just the acceptance tests daemonized (inplace)...." - - TEST_DAEMONIZE=inplace make acceptance - artifacts: - paths: - - bin/gitlab-pages - -license_scanning: - stage: prepare - variables: - LICENSE_MANAGEMENT_SETUP_CMD: go mod vendor - rules: - - if: $CI_MERGE_REQUEST_ID - when: on_success - - if: $CI_COMMIT_BRANCH == 'master' - when: on_success - -dependency_scanning: - stage: prepare - rules: - - if: '$CI_MERGE_REQUEST_ID' - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - -# disable eslint-sast since html files are fixtures for testing -eslint-sast: - rules: - - when: never - -secrets-sast: - stage: prepare - rules: - - if: $CI_MERGE_REQUEST_ID - when: on_success - - if: $CI_COMMIT_BRANCH == 'master' - when: on_success - -gosec-sast: - stage: prepare - rules: - - if: $CI_MERGE_REQUEST_ID - when: on_success - - if: $CI_COMMIT_BRANCH == 'master' - when: on_success - -download deps: - extends: .go-mod-cache - stage: prepare - script: - - make deps-download - artifacts: - paths: - - go.mod - - go.sum - -cover: - extends: .go-mod-cache - stage: test - needs: ['download deps'] - script: - - make setup - - make generate-mocks - - make cover - coverage: '/total:.+\(statements\).+\d+\.\d+/' - artifacts: - paths: - - coverage.html - -code_quality: - stage: test - needs: ['download deps'] - extends: .go-mod-cache - image: golangci/golangci-lint:v1.27.0 - variables: - REPORT_FILE: gl-code-quality-report.json - LINT_FLAGS: "--color never --deadline 15m" - OUT_FORMAT: code-climate - script: - - golangci-lint run ./... --out-format ${OUT_FORMAT} ${LINT_FLAGS} | tee ${REPORT_FILE} - timeout: 15 minutes - artifacts: - reports: - codequality: ${REPORT_FILE} - paths: - - ${REPORT_FILE} - -test:1.13: - extends: .tests - image: golang:1.13 - -test:1.14: - extends: .tests - image: golang:1.14 - -race: - extends: .go-mod-cache - stage: test - tags: - - gitlab-org-docker - needs: ['download deps'] - script: - - echo "Running race detector" - - make race - -check deps: - extends: .go-mod-cache - stage: test - needs: ['download deps'] - script: - - make deps-check |