Single upload to repo server, single package job

This commit is contained in:
Tyler 2017-09-13 23:41:50 -04:00
parent 2ec6b2b8be
commit 50c4244bdc
3 changed files with 6 additions and 22 deletions

View File

@ -2,7 +2,7 @@ image: git.meow.tf:4567/tyler/golang-glide:1.8
before_script: 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'` - 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 - chmod +x packaging/build-package.sh packaging/package_upload.sh
- export GOPATH=`pwd` - export GOPATH=`pwd`
stages: stages:
@ -64,32 +64,15 @@ build-armv7:
paths: paths:
- src/meow.tf/deb-simple/vendor - src/meow.tf/deb-simple/vendor
package-i386: package:
stage: package stage: package
image: tystuyfzand/fpm image: tystuyfzand/fpm
script: script:
- cd $CI_PROJECT_DIR - cd $CI_PROJECT_DIR
- ARCH=i386 packaging/build-package.sh - ARCH=i386 packaging/build-package.sh
artifacts:
paths:
- build/i386
package-amd64:
stage: package
image: tystuyfzand/fpm
script:
- cd $CI_PROJECT_DIR
- ARCH=amd64 packaging/build-package.sh - ARCH=amd64 packaging/build-package.sh
artifacts:
paths:
- build/amd64
package-armv7:
stage: package
image: tystuyfzand/fpm
script:
- cd $CI_PROJECT_DIR
- ARCH=armv7 packaging/build-package.sh - ARCH=armv7 packaging/build-package.sh
- packaging/package-upload.sh
artifacts: artifacts:
paths: paths:
- build/armv7 - build

View File

@ -0,0 +1 @@
curl -X POST "$UPLOAD_URL" -F "file_i386=@build/i386/deb-simple_$VERSION.deb" -F "file_amd64=@build/i386/deb-simple_$VERSION.deb" -F "file_armv7=@build/armv7/deb-simple_$VERSION.deb"

View File

@ -15,7 +15,7 @@ import (
"github.com/go-ini/ini" "github.com/go-ini/ini"
) )
var VERSION string = "1.3.0" var VERSION string = "1.3.1"
func packageName(name string) string { func packageName(name string) string {
if index := strings.Index(name, "_"); index != -1 { if index := strings.Index(name, "_"); index != -1 {