From 604544b473c324c7664b49ebaf0d3fe95ddb9a99 Mon Sep 17 00:00:00 2001 From: Garrison Davis Date: Fri, 7 Apr 2023 08:43:15 -0600 Subject: [PATCH] try parallel matrix job --- .gitlab/.gitlab-ci.yml | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 9db879142..2a0e61453 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -516,16 +516,20 @@ upload to sonarcloud: - job: run go tests dax/test/dax optional: true -package for linux amd64: +package for linux: stage: build image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' - variables: - GOOS: "linux" - GOARCH: "amd64" + parallel: + matrix: + - GOOS: "linux" + GOARCH: + - "amd64" + - "arm64" script: - export VERSION=$(git describe --tags 2>/dev/null || echo unknown) + - echo $VERSION - echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list - apt-get update -y && apt-get install -y -qq nfpm=2.11.3 - nfpm version # smoke @@ -534,8 +538,8 @@ package for linux amd64: - nfpm package --packager deb --target "featurebase.${VERSION}.${GOARCH}.deb" - nfpm package --packager rpm --target "featurebase.${VERSION}.${GOARCH}.rpm" needs: - - build featurebase # featurebase_linux_amd64 is all we want - - build fbsql amd64 # ./build/fbsql_linux_amd64 is all we want + - build featurebase # featurebase_$GOOS_$GOARCH is what we need + - build fbsql amd64 # ./build/fbsql_$GOOS_$GOARCH is what we need artifacts: paths: - "*.deb" @@ -550,8 +554,7 @@ upload_artifacts_to_nexus: - curl -v --user "$NEXUS_YUM_CREDS" --upload-file *.arm64.rpm https://nexus.molecula.com/repository/molecula-yum/release/ - curl -v --user "$NEXUS_YUM_CREDS" --upload-file *.amd64.rpm https://nexus.molecula.com/repository/molecula-yum/release/ dependencies: - - package for linux amd64 - - package for linux arm64 + - package for linux trigger_m-cloud-images: stage: post build @@ -561,27 +564,6 @@ trigger_m-cloud-images: - upload_artifacts_to_nexus trigger: molecula/m-cloud-images -package for linux arm64: - stage: build - image: gitlab/dind - services: - - docker:dind - extends: .go-cache - rules: - - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' - variables: - GOOS: "linux" - GOARCH: "arm64" - script: - - echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list - - apt update && apt install nfpm=2.11.3 - - apt-get update && apt-get install -y -qq build-essential - - make package - artifacts: - paths: - - "*.deb" - - "*.rpm" - build arm container fb: stage: build needs: