79 lines
1.7 KiB
YAML
79 lines
1.7 KiB
YAML
image: git.meow.tf:4567/tyler/golang-glide:1.8
|
|
|
|
before_script:
|
|
- export VERSION=`grep "VERSION" src/meow.tf/deb-simple/server.go | head -n 1 | awk '{print $5}' | sed -e 's/^"//' -e 's/"$//' | tr -d '\n'`
|
|
- chmod +x packaging/build-package.sh packaging/package_upload.sh
|
|
- export GOPATH=`pwd`
|
|
|
|
stages:
|
|
- init
|
|
- build
|
|
- package
|
|
|
|
glide-install:
|
|
stage: init
|
|
script:
|
|
- cd $CI_PROJECT_DIR/src/meow.tf/deb-simple
|
|
- glide install
|
|
- cd $CI_PROJECT_DIR
|
|
- mkdir -p build/i386 build/amd64 build/armv7
|
|
cache:
|
|
key: "pipeline-$CI_PIPELINE_ID"
|
|
paths:
|
|
- src/meow.tf/deb-simple/vendor
|
|
|
|
build-i386:
|
|
stage: build
|
|
script:
|
|
- mkdir -p build/i386
|
|
- GOOS=linux GOARCH=386 go build -o build/i386/deb-simple
|
|
artifacts:
|
|
paths:
|
|
- build/i386
|
|
cache:
|
|
key: "pipeline-$CI_PIPELINE_ID"
|
|
policy: pull
|
|
paths:
|
|
- src/meow.tf/deb-simple/vendor
|
|
|
|
build-amd64:
|
|
stage: build
|
|
script:
|
|
- mkdir -p build/amd64
|
|
- go build -o build/amd64/deb-simple
|
|
artifacts:
|
|
paths:
|
|
- build/amd64
|
|
cache:
|
|
key: "pipeline-$CI_PIPELINE_ID"
|
|
policy: pull
|
|
paths:
|
|
- src/meow.tf/deb-simple/vendor
|
|
|
|
build-armv7:
|
|
stage: build
|
|
script:
|
|
- mkdir -p build/armv7
|
|
- GOOS=linux GOARCH=arm GOARM=7 go build -o build/armv7/deb-simple
|
|
artifacts:
|
|
paths:
|
|
- build/armv7
|
|
cache:
|
|
key: "pipeline-$CI_PIPELINE_ID"
|
|
policy: pull
|
|
paths:
|
|
- src/meow.tf/deb-simple/vendor
|
|
|
|
package:
|
|
stage: package
|
|
image: tystuyfzand/fpm
|
|
script:
|
|
- cd $CI_PROJECT_DIR
|
|
- ARCH=i386 packaging/build-package.sh
|
|
- ARCH=amd64 packaging/build-package.sh
|
|
- ARCH=armv7 packaging/build-package.sh
|
|
- packaging/package-upload.sh
|
|
artifacts:
|
|
paths:
|
|
- build
|