Commit ed1fb545 authored by Kamil Trzciński's avatar Kamil Trzciński

Upload artefacts to S3

parent 0e50b6e5
......@@ -18,19 +18,55 @@ before_deploy:
- make toolchain
- make build
- make package
- make packagecloud
- '[[ -z "$TRAVIS_TAG" ]] || make packagecloud'
deploy:
provider: releases
- provider: releases
api_key:
secure: WBb1z0GV1uD8pB/UMDVqiqIFHcgxl2fngF9Qg8Obe0IJIuBN8ak4H1ulYKYcRgguJjefMG/OnPT2xHCsSme+OanxBcGDiYijG1vVmBqnMV8wTK5ulqkgSz7QVH4oCmdqd8WnHKqqqXmLUARRAUkvKFDCf2mq6qyAy+wKw7jPluI=
file:
- out/gitlab-ci-multi-runner-linux-arm
- out/gitlab-ci-multi-runner-linux-386
- out/gitlab-ci-multi-runner-linux-amd64
- out/gitlab-ci-multi-runner-darwin-386
- out/gitlab-ci-multi-runner-darwin-amd64
- out/gitlab-ci-multi-runner-windows-386.exe
- out/gitlab-ci-multi-runner-windows-amd64.exe
- out/binaries/gitlab-ci-multi-runner-linux-arm
- out/binaries/gitlab-ci-multi-runner-linux-386
- out/binaries/gitlab-ci-multi-runner-linux-amd64
- out/binaries/gitlab-ci-multi-runner-darwin-386
- out/binaries/gitlab-ci-multi-runner-darwin-amd64
- out/binaries/gitlab-ci-multi-runner-windows-386.exe
- out/binaries/gitlab-ci-multi-runner-windows-amd64.exe
on:
repo: ayufan/gitlab-ci-multi-runner
tags: true
- provider: s3
access_key_id: $S3_ACCESS_KEY
secret_access_key: $S3_SECRET_ACCESS_KEY
bucket: repo.ayufan.eu
region: eu-west-1
skip_cleanup: true
acl: public_read
local_dir: out/
upload_dir: gitlab-ci-multi-runner/master
on:
repo: ayufan/gitlab-ci-multi-runner
branch: master
- provider: s3
access_key_id: $S3_ACCESS_KEY
secret_access_key: $S3_SECRET_ACCESS_KEY
bucket: repo.ayufan.eu
region: eu-west-1
skip_cleanup: true
acl: public_read
local_dir: out/
upload_dir: gitlab-ci-multi-runner/$TRAVIS_TAG
on:
repo: ayufan/gitlab-ci-multi-runner
tags: true
- provider: s3
access_key_id: $S3_ACCESS_KEY
secret_access_key: $S3_SECRET_ACCESS_KEY
bucket: repo.ayufan.eu
region: eu-west-1
skip_cleanup: true
acl: public_read
local_dir: out/
upload_dir: gitlab-ci-multi-runner/latest
on:
repo: ayufan/gitlab-ci-multi-runner
tags: true
......@@ -33,7 +33,7 @@ toolchain:
build: version
# Building gitlab-ci-multi-runner for $(BUILD_PLATFORMS)
gox $(BUILD_PLATFORMS) -output="out/{{.Dir}}-{{.OS}}-{{.Arch}}"
gox $(BUILD_PLATFORMS) -output="out/binaries/{{.Dir}}-{{.OS}}-{{.Arch}}"
lint:
# Checking project code style...
......@@ -59,7 +59,11 @@ version: FORCE
# Generating VERSION...
echo "package commands\n\nconst VERSION = \"$(VERSION) ($(REVISION))\"\nconst REVISION = \"$(REVISION)\"" > commands/version.go
package: package-deps package-deb package-rpm
package: package-deps package-deb package-rpm package-script
package-script:
cp install.sh out/
[[ -n "$TRAVIS_TAG" ]] || sed "s|/latest/|/master/|g" install.sh > out/install.sh
package-deb:
# Building Debian compatible packages...
......@@ -89,7 +93,7 @@ package-deb-fpm:
--license "MIT" \
--vendor "ayufan.eu" \
-a $(ARCH) \
out/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
out/binaries/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
package-rpm-fpm:
@mkdir -p out/rpm/
......@@ -105,7 +109,7 @@ package-rpm-fpm:
--license "MIT" \
--vendor "ayufan.eu" \
-a $(ARCH) \
out/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
out/binaries/gitlab-ci-multi-runner-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
packagecloud: packagecloud-deps packagecloud-deb packagecloud-rpm
......
#!/bin/bash
echo "Not yet supported"
exit 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment