diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index f69e9f1c..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,111 +0,0 @@ -.go-cache: - variables: - GOPATH: $CI_PROJECT_DIR/.go - before_script: - - mkdir -p .go - cache: - - key: "golang" - paths: - - .go/pkg/mod/ - after_script: - - find $XCACHE -type f - -default: - tags: - - k3-nks-tiny - -image: $NKS_DOCKER_K3_REGISTRY_LOCAL/k3ci/default:latest - -include: - - project: 'k3/k3ci' - ref: "master" - file: "/gitlab/templates/nks/container-resources-template.yml" - - project: 'k3/k3ci' - ref: "master" - file: "/gitlab/templates/ntt/test-template-tiny.yml" - - project: 'k3/k3ci' - ref: "master" - file: "/gitlab/templates/ntt/test-template-medium.yml" - - project: 'k3/k3ci' - ref: "master" - file: "/gitlab/templates/ntt/deploy-template-tiny.yml" - -variables: - XCACHE: "/xcache" - -stages: - - build - - test - - deploy - -golang:1.20: - stage: test - image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golang:1.20 - extends: - - .ntt:test-template-medium - script: - - go test ./... - -golang:latest: - stage: test - image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golang:latest - extends: - - .go-cache - - .ntt:test-template-medium - script: - - go install gotest.tools/gotestsum@latest - - $GOPATH/bin/gotestsum --junitfile report-junit.xml --format testname -- -race ./... - artifacts: - reports: - junit: report-junit.xml - -coverage: - stage: test - image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golang:latest - extends: - - .go-cache - - .ntt:test-template-tiny - needs: [] - script: - - go install github.com/boumenot/gocover-cobertura@latest - - go test -coverprofile=coverage.out -covermode count ./... - - $GOPATH/bin/gocover-cobertura report-coverage.xml - coverage: '/coverage: \d+.\d+% of statements/' - artifacts: - reports: - coverage_report: - coverage_format: cobertura - path: report-coverage.xml - -lint: - stage: test - image: $NKS_DOCKER_IO_REGISTRY_MIRROR/golangci/golangci-lint:v1.59.1 - extends: - - .ntt:test-template-tiny - needs: [] - script: - - golangci-lint -v run --color=always --issues-exit-code=0 --out-format=code-climate:report-lint.json,colored-line-number:stdout - artifacts: - reports: - codequality: report-lint.json - paths: - - report-lint.json - -trigger-k3: - stage: test - variables: - NTT_COMMIT_SHA: ${CI_COMMIT_SHA} - needs: [] - trigger: - project: k3/k3 - strategy: depend - -update-k3: - stage: deploy - extends: - - .ntt:deploy-template-tiny - only: - refs: - - master - script: - - .gitlab/update-k3 diff --git a/.gitlab/update-k3 b/.gitlab/update-k3 deleted file mode 100755 index 9886767f..00000000 --- a/.gitlab/update-k3 +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -e - -K3_PROJECT_ID=5154 -K3_SOURCE_BRANCH="update-ntt-$CI_COMMIT_SHORT_SHA" -K3_TARGET_BRANCH="master" -HEADER="${CI_PROJECT_DIR}/header.txt" - -TEMP="$(mktemp -d)" -trap "rm -rf -- $TEMP" EXIT - -source <(curl https://gitlabe1.ext.net.nokia.com/k3/k3ci/-/raw/master/k3ci-configure-ssh) - -function escapeJSON() { - python -c 'import json; import sys; print(json.dumps(sys.stdin.read().strip()))' <<<"${@}" -} - - -cat >${HEADER} <mr.json -X POST "${CI_API_V4_URL}/projects/$K3_PROJECT_ID/merge_requests" --header @$HEADER --data @- <