From fb4db5b4998ab654ed3183592a5fff355a7d068c Mon Sep 17 00:00:00 2001 From: Robert Marshall Date: Tue, 27 Jun 2023 23:26:17 -0400 Subject: [PATCH] ci(framework:go): Use framework:go base builder - Migrate onto the Framework Build system Signed-off-by: Robert Marshall --- .gitlab-ci.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca8c042b9..7f9b3090e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - GO_VERSION: "1.19" + FRAMEWORK_VERSION: "add-tools-to-framework-current" # run the pipeline only on MRs, tags, and default branch workflow: @@ -9,7 +9,8 @@ workflow: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH default: - image: golang:${GO_VERSION} + image: registry.gitlab.com/gitlab-org/distribution/build-compliance/staging-branches/framework_go_amd64:${FRAMEWORK_VERSION} + #image: registry.gitlab.com/gitlab-org/distribution/build-compliance/release-frameworks/framework_go_amd64:current stages: - documentation @@ -116,7 +117,7 @@ run_tests: extends: .go-cache parallel: matrix: - - GO_VERSION: ["1.19", "1.20", "1.21"] + - FRAMEWORK_VERSION: ["add-tools-to-framework-current", "add-tools-to-framework-next"] script: # `goreleaser` also uses GITLAB_TOKEN and so we need to distinguish between # the GITLAB_TOKEN_TEST with less privilege used for testing and the GITLAB_TOKEN_RELEASE token @@ -160,6 +161,22 @@ release_test: -v /var/run/docker.sock:/var/run/docker.sock \ goreleaser/goreleaser release --snapshot +next_test: + variables: + FRAMEWORK_VERSION: "add-tools-to-framework-next" + extends: .release + rules: + - if: $CI_COMMIT_TAG + when: never + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + script: | + docker run --rm --privileged \ + -v $PWD:/go/src/gitlab.com/gitlab-org/cli \ + -w /go/src/gitlab.com/gitlab-org/cli \ + -v /var/run/docker.sock:/var/run/docker.sock \ + goreleaser/goreleaser release --snapshot + build_windows: stage: test extends: .go-cache -- GitLab