deb-simple/.gitlab-ci.yml

91 lines
2.0 KiB
YAML
Raw Normal View History

2017-06-12 03:08:13 +00:00
image: git.meow.tf:4567/tyler/golang-glide:1.8
2017-06-12 01:04:45 +00:00
2017-09-11 04:03:31 +00:00
before_script:
2017-09-11 04:00:18 +00:00
- 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
2017-09-11 04:02:27 +00:00
stages:
2017-09-12 01:14:47 +00:00
- init
2017-09-11 04:02:27 +00:00
- build
- package
2017-09-12 01:14:47 +00:00
cache:
key: "PIPELINE-$CI_PIPELINE_ID"
paths:
- src/meow.tf/deb-simple/vendor
glide-install:
stage: init
2017-06-12 01:04:45 +00:00
script:
2017-06-12 03:09:30 +00:00
- export GOPATH=`pwd`
2017-06-12 01:04:45 +00:00
- cd $CI_PROJECT_DIR/src/meow.tf/deb-simple
- glide install
- cd $CI_PROJECT_DIR
2017-09-11 04:00:18 +00:00
- mkdir -p build/i386 build/amd64 build/armv7
2017-09-12 01:14:47 +00:00
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
2017-09-11 02:58:50 +00:00
- go build -o build/amd64/deb-simple
- GOOS=linux GOARCH=386 go build -o build/i386/deb-simple
2017-09-11 04:00:18 +00:00
- GOOS=linux GOARCH=arm GOARM=7 go build -o build/armv7/deb-simple
artifacts:
paths:
- build
2017-09-12 01:14:47 +00:00
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
2017-09-11 04:02:27 +00:00
package-i386:
2017-09-11 04:00:18 +00:00
stage: package
2017-09-11 04:05:19 +00:00
image: tystuyfzand/fpm
2017-09-11 04:00:18 +00:00
script:
- cd $CI_PROJECT_DIR
- ARCH=i386 packaging/build-package.sh
2017-09-11 04:02:27 +00:00
- echo "Uploading to repository server"
2017-09-11 04:26:06 +00:00
- curl -X POST "$UPLOAD_URL" -F "file=@build/i386/deb-simple_$VERSION.deb"
2017-09-11 04:02:27 +00:00
artifacts:
paths:
- build
package-amd64:
stage: package
2017-09-11 04:05:19 +00:00
image: tystuyfzand/fpm
2017-09-11 04:02:27 +00:00
script:
- cd $CI_PROJECT_DIR
2017-09-11 04:00:18 +00:00
- ARCH=amd64 packaging/build-package.sh
2017-09-11 04:02:27 +00:00
- echo "Uploading to repository server"
2017-09-11 04:26:06 +00:00
- curl -X POST "$UPLOAD_URL" -F "file=@build/amd64/deb-simple_$VERSION.deb"
2017-09-11 04:02:27 +00:00
artifacts:
paths:
- build
package-armv7:
stage: package
2017-09-11 04:05:19 +00:00
image: tystuyfzand/fpm
2017-09-11 04:02:27 +00:00
script:
- cd $CI_PROJECT_DIR
2017-09-11 04:00:18 +00:00
- ARCH=armv7 packaging/build-package.sh
- echo "Uploading to repository server"
2017-09-11 04:26:06 +00:00
- curl -X POST "$UPLOAD_URL" -F "file=@build/armv7/deb-simple_$VERSION.deb"
2017-06-12 03:06:31 +00:00
artifacts:
paths:
2017-09-11 02:58:50 +00:00
- build