From 7a861cc305e6a4bba845469b705830fbae05ea63 Mon Sep 17 00:00:00 2001 From: Cactusinhand Date: Tue, 31 Aug 2021 03:44:05 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 162 ------------------------------------------------- 1 file changed, 162 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53e7f83a2ce..b4979b2464f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,6 @@ stages: - build - test - - publish - - qa default: image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7-golang-1.15-git-2.31 @@ -11,20 +9,13 @@ default: variables: DOCKER_DRIVER: overlay2 - SAST_DISABLE_DIND: "true" - SAST_DEFAULT_ANALYZERS: "gosec" GIT_VERSION: "v2.33.0" GO_VERSION: "1.16" RUBY_VERSION: "2.7" - POSTGRES_VERSION: "12.6-alpine" include: - template: Workflows/MergeRequest-Pipelines.gitlab-ci.yml - - template: Security/License-Scanning.gitlab-ci.yml - - template: Security/SAST.gitlab-ci.yml - template: Security/Dependency-Scanning.gitlab-ci.yml - - template: Security/Coverage-Fuzzing.gitlab-ci.yml - - template: Security/Secret-Detection.gitlab-ci.yml danger-review: image: ruby:2.7 @@ -83,34 +74,6 @@ danger-review: when: on_failure expire_in: 1 week -.postgres_template: &postgres_definition - image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-${RUBY_VERSION}-golang-${GO_VERSION}-git-2.31 - services: - - postgres:${POSTGRES_VERSION} - variables: &postgres_variables - PGHOST: postgres - PGPORT: "5432" - PGUSER: postgres - POSTGRES_HOST_AUTH_METHOD: trust - before_script: - - go version - - git version - - while ! psql -h $PGHOST -U $PGUSER -c 'SELECT 1' > /dev/null; do echo "awaiting Postgres service to be ready..." && sleep 1 ; done && echo "Postgres service is ready!" - -.pgbouncer_template: &pgbouncer_definition - <<: *postgres_definition - image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-${RUBY_VERSION}-golang-${GO_VERSION}-git-2.31-pgbouncer-1.14 - variables: - <<: *postgres_variables - PGHOST_PGBOUNCER: 0.0.0.0 - PGPORT_PGBOUNCER: "6432" - before_script: - - go version - - git version - - pgbouncer --version - - adduser --no-create-home --disabled-password --disabled-login --quiet --force-badname --gecos '' pgbouncer-runner - - su pgbouncer-runner -c 'pgbouncer internal/praefect/datastore/glsql/testdata/pgbouncer.ini' & - - for i in {1..10}; do psql -U $PGUSER -c 'select now()' && break; done || { echo 'pgbouncer awaiting failed' ; exit 1; } verify: <<: *cache_definition @@ -167,7 +130,6 @@ binaries: test: <<: *test_definition - <<: *postgres_definition image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-${RUBY_VERSION}-golang-${GO_VERSION}-git-2.31 script: - _build/deps/git/install/bin/git version @@ -191,7 +153,6 @@ test: nightly:git: <<: *test_definition - <<: *postgres_definition image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-${RUBY_VERSION}-golang-${GO_VERSION}-git-2.31 script: - go version @@ -204,38 +165,7 @@ nightly:git: rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' -cover: - <<: *cache_definition - <<: *postgres_definition - stage: test - script: - - make cover - artifacts: - reports: - cobertura: _build/cover/cobertura.xml - -gosec-sast: - before_script: - - apk add pkgconfig libgit2-dev gcc libc-dev - rules: - - if: $SAST_DISABLED - when: never - - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_MERGE_REQUEST_IID - - if: $CI_COMMIT_TAG -license_scanning: - before_script: - - sudo apt-get update - - sudo apt-get install -y libicu-dev libgit2-dev cmake - rules: - - if: $LICENSE_SCANNING_DISABLED - when: never - - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_MERGE_REQUEST_IID - - if: $CI_COMMIT_TAG - variables: - LICENSE_FINDER_CLI_OPTS: '--aggregate-paths=. ruby' gemnasium-dependency_scanning: rules: @@ -245,95 +175,3 @@ gemnasium-dependency_scanning: - if: $CI_MERGE_REQUEST_IID - if: $CI_COMMIT_TAG -secret_detection: - inherit: - default: false - rules: - - if: $SECRET_DETECTION_DISABLED - when: never - - if: $CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_MERGE_REQUEST_IID - - if: $CI_COMMIT_TAG - -praefect_sql_connect: - <<: *test_definition - services: - - postgres:${POSTGRES_VERSION} - variables: - POSTGRES_DB: praefect_test - POSTGRES_USER: praefect - POSTGRES_PASSWORD: sql-password - script: - - make - # Sanity check: direct ping with psql - - PGPASSWORD=$POSTGRES_PASSWORD psql -h postgres -U $POSTGRES_USER -d $POSTGRES_DB -c 'select now()' - - ruby -rerb -e 'ERB.new(ARGF.read).run' _support/config.praefect.toml.ci-sql-test.erb > config.praefect.toml - - ./_build/bin/praefect -config config.praefect.toml sql-ping - - ./_build/bin/praefect -config config.praefect.toml sql-migrate - -pgbouncer_test: - # This job verifies all operations run without issues if PgBouncer is set in between service and PostgreSQL database. - <<: *test_definition - <<: *pgbouncer_definition - script: - - make test-postgres - -backwards_compatibility_test: - # The job verifies the old version of the service could run its database migration on the database where the - # migration of the newest service version was already applied. - <<: *test_definition - <<: *postgres_definition - rules: - - changes: - - "internal/praefect/datastore/migrations/*" - script: - - git fetch origin 'refs/tags/*:refs/tags/*' - - git checkout $(_support/get-previous-minor-release) - - git checkout --no-overlay $CI_COMMIT_SHA -- internal/praefect/datastore/migrations - - make test-postgres - -lint: - stage: test - retry: 2 - script: - - go version - - make lint - -lint-strict: - allow_failure: true - stage: test - retry: 2 - script: - - go version - - make lint-strict - rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - -objectinfo_fuzz_test: - extends: .fuzz_base - stage: test - script: - - apt update && apt install -y clang-7 - - go get github.com/dvyukov/go-fuzz/go-fuzz && go get github.com/dvyukov/go-fuzz/go-fuzz-build - - /root/go/bin/go-fuzz-build -libfuzzer -o objectinfo_fuzzer.a ./internal/git/catfile - - clang-7 -fsanitize=fuzzer objectinfo_fuzzer.a -o objectinfo_fuzzer - - ./gitlab-cov-fuzz run -- ./objectinfo_fuzzer -max_total_time=300 - -code_navigation: - allow_failure: true - script: - - go get github.com/sourcegraph/lsif-go/cmd/lsif-go@v1.3.1 - - ~/go/bin/lsif-go - artifacts: - reports: - lsif: dump.lsif - -trigger-qa: - stage: qa - when: manual - trigger: - project: gitlab-org/build/omnibus-gitlab-mirror - variables: - ALTERNATIVE_SOURCES: "true" - GITALY_SERVER_VERSION: $CI_COMMIT_SHA - ee: "true" -- GitLab