From 7579adb4ed4ab46963513dd26d2c441a0ab991b1 Mon Sep 17 00:00:00 2001 From: KD Date: Sat, 1 Mar 2025 20:46:21 +0000 Subject: [PATCH] Updated workflow --- .gitlab-ci.yml | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 195d65e..441e195 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,26 @@ -# You can override the included template(s) by including variable overrides -# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings -# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization -# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings -# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings -# Note that environment variables can be set in several places -# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence +image: golang:1.23 + stages: -- test -sast: + - test + - build + +format: stage: test -include: -- template: Security/SAST.gitlab-ci.yml + script: + # - go fmt $(go list ./... | grep -v /vendor/) + # - go vet $(go list ./... | grep -v /vendor/) + # - go test -race $(go list ./... | grep -v /vendor/) + gofmt -l -d *.go + +compile: + stage: build + before_script: + - git config --global url.https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}.insteadOf https://${CI_SERVER_HOST} + - export GOPRIVATE=${CI_SERVER_HOST} + script: + - mkdir -p mybinaries + - go build -o mybinaries ./... + artifacts: + paths: + - mybinaries +