try parallel matrix job

This commit is contained in:
Garrison Davis 2023-04-07 08:43:15 -06:00
parent 983500f53c
commit 604544b473

View file

@ -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: