Test multi stage build
This commit is contained in:
parent
e817c1b0c4
commit
7b36c2fd33
|
@ -5,19 +5,49 @@ before_script:
|
||||||
- chmod +x packaging/build-package.sh
|
- chmod +x packaging/build-package.sh
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- init
|
||||||
- build
|
- build
|
||||||
- package
|
- package
|
||||||
|
|
||||||
build:
|
cache:
|
||||||
stage: build
|
key: "PIPELINE-$CI_PIPELINE_ID"
|
||||||
|
paths:
|
||||||
|
- src/meow.tf/deb-simple/vendor
|
||||||
|
|
||||||
|
glide-install:
|
||||||
|
stage: init
|
||||||
script:
|
script:
|
||||||
- export GOPATH=`pwd`
|
- export GOPATH=`pwd`
|
||||||
- cd $CI_PROJECT_DIR/src/meow.tf/deb-simple
|
- cd $CI_PROJECT_DIR/src/meow.tf/deb-simple
|
||||||
- glide install
|
- glide install
|
||||||
- cd $CI_PROJECT_DIR
|
- cd $CI_PROJECT_DIR
|
||||||
- mkdir -p build/i386 build/amd64 build/armv7
|
- mkdir -p build/i386 build/amd64 build/armv7
|
||||||
|
|
||||||
|
build-i386:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- mkdir -p build/i386
|
||||||
- go build -o build/amd64/deb-simple
|
- go build -o build/amd64/deb-simple
|
||||||
- GOOS=linux GOARCH=386 go build -o build/i386/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
|
- GOOS=linux GOARCH=arm GOARM=7 go build -o build/armv7/deb-simple
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
|
Loading…
Reference in New Issue