From 7b36c2fd335de0b4c107f51bea8ec9b3bc4c6ff2 Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 11 Sep 2017 21:14:47 -0400 Subject: [PATCH] Test multi stage build --- .gitlab-ci.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03db7cf..8138c6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,19 +5,49 @@ before_script: - chmod +x packaging/build-package.sh stages: + - init - build - package -build: - stage: build +cache: + key: "PIPELINE-$CI_PIPELINE_ID" + paths: + - src/meow.tf/deb-simple/vendor + +glide-install: + stage: init script: - export GOPATH=`pwd` - cd $CI_PROJECT_DIR/src/meow.tf/deb-simple - glide install - cd $CI_PROJECT_DIR - mkdir -p build/i386 build/amd64 build/armv7 + +build-i386: + stage: build + script: + - mkdir -p build/i386 - go build -o build/amd64/deb-simple - GOOS=linux GOARCH=386 go build -o build/i386/deb-simple + artifacts: + paths: + - build + +build-amd64: + stage: build + script: + - mkdir -p build/amd64 + - go build -o build/amd64/deb-simple + - GOOS=linux GOARCH=386 go build -o build/i386/deb-simple + - GOOS=linux GOARCH=arm GOARM=7 go build -o build/armv7/deb-simple + artifacts: + paths: + - build + +build-armv7: + stage: build + script: + - mkdir -p build/armv7 - GOOS=linux GOARCH=arm GOARM=7 go build -o build/armv7/deb-simple artifacts: paths: