diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f762e6a..e4cda35 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,9 +1,14 @@ 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 +stages: + - build + - package + build: script: - export GOPATH=`pwd` @@ -18,18 +23,35 @@ build: paths: - build -package: +package-i386: stage: package script: - cd $CI_PROJECT_DIR - - mkdir -p build/i386 build/amd64 build/armv7 || true - ARCH=i386 packaging/build-package.sh - - ARCH=amd64 packaging/build-package.sh - - ARCH=armv7 packaging/build-package.sh - echo "Uploading to repository server" - - curl -X POST "$UPLOAD_URL" -F "file=@build/i386/deb-simple_$VERSION.deb" - - curl -X POST "$UPLOAD_URL" -F "file=@build/amd64/deb-simple_$VERSION.deb" - - curl -X POST "$UPLOAD_URL" -F "file=@build/armv7/deb-simple_$VERSION.deb" + - curl -X POST "$UPLOAD_URL" -F "file=@build/$ARCH/deb-simple_$VERSION.deb" + artifacts: + paths: + - build + +package-amd64: + stage: package + script: + - cd $CI_PROJECT_DIR + - ARCH=amd64 packaging/build-package.sh + - echo "Uploading to repository server" + - curl -X POST "$UPLOAD_URL" -F "file=@build/$ARCH/deb-simple_$VERSION.deb" + artifacts: + paths: + - build + +package-armv7: + stage: package + script: + - cd $CI_PROJECT_DIR + - ARCH=armv7 packaging/build-package.sh + - echo "Uploading to repository server" + - curl -X POST "$UPLOAD_URL" -F "file=@build/$ARCH/deb-simple_$VERSION.deb" artifacts: paths: - build