Merge pull request #157 from davidnewhall/dn2_bintray

Replace packagecloud with jfrog bintray.
This commit is contained in:
David Newhall II 2019-12-12 00:28:33 -08:00 committed by GitHub
commit 685690825f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 25 deletions

View File

@ -27,7 +27,6 @@ install:
# download super-linter: golangci-lint
- curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
- rvm install 2.0.0
- rvm 2.0.0 do gem install --no-document package_cloud
- rvm 2.0.0 do gem install --no-document fpm
before_script:
- gpg --import gpg.public.key
@ -78,7 +77,7 @@ deploy:
on:
tags: true
- provider: script
script: rvm 2.0.0 do scripts/package-deploy.sh
script: scripts/package-deploy.sh
skip_cleanup: true
on:
all_branches: true

View File

@ -114,14 +114,15 @@ sites side-by-side. So easy! This screenshot barely does it justice.
The following fine folks are providing their services, completely free! These service
integrations are used for things like storage, building, compiling, distribution and
documentation support. This project succeeds because of them. Thank you!
<p style="text-align: center;">
<a title="Packagecloud" alt="Packagecloud" href="https://Packagecloud.io"><img src="https://docs.golift.io/integrations/packagecloud.png"/></a>
<a title="GitHub" alt="GitHub" href="https://GitHub.com"><img src="https://docs.golift.io/integrations/octocat.png"/></a>
<a title="Docker Cloud" alt="Docker" href="https://cloud.docker.com"><img src="https://docs.golift.io/integrations/docker.png"/></a>
<a title="Travis-CI" alt="Travis-CI" href="https://Travis-CI.com"><img src="https://docs.golift.io/integrations/travis-ci.png"/></a>
<a title="Homebrew" alt="Homebrew" href="https://brew.sh"><img src="https://docs.golift.io/integrations/homebrew.png"/></a>
<a title="Go Lift" alt="Go Lift" href="https://golift.io"><img src="https://docs.golift.io/integrations/golift.png"/></a>
<a title="Grafana" alt="Grafana" href="https://grafana.com"><img src="https://docs.golift.io/integrations/grafana.png"/></a>
<a title="Jfrog Bintray" alt="Jfrog Bintray" href="https://bintray.com"><img src="https://docs.golift.io/integrations/bintray.png"/></a>
<a title="GitHub" alt="GitHub" href="https://GitHub.com"><img src="https://docs.golift.io/integrations/octocat.png"/></a>
<a title="Docker Cloud" alt="Docker" href="https://cloud.docker.com"><img src="https://docs.golift.io/integrations/docker.png"/></a>
<a title="Travis-CI" alt="Travis-CI" href="https://Travis-CI.com"><img src="https://docs.golift.io/integrations/travis-ci.png"/></a>
<a title="Homebrew" alt="Homebrew" href="https://brew.sh"><img src="https://docs.golift.io/integrations/homebrew.png"/></a>
<a title="Go Lift" alt="Go Lift" href="https://golift.io"><img src="https://docs.golift.io/integrations/golift.png"/></a>
<a title="Grafana" alt="Grafana" href="https://grafana.com"><img src="https://docs.golift.io/integrations/grafana.png"/></a>
</p>
## Copyright & License

View File

@ -1,21 +1,33 @@
#!/bin/bash
# Deploy our built packages to packagecloud.
# Deploy our built packages to jfrog bintray.
REPO=unstable
[ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] || REPO=stable
echo "deploying packages from branch: $TRAVIS_BRANCH, tag: $TRAVIS_TAG to repo: $REPO"
COMPONENT=unstable
if [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] && [ "$TRAVIS_BRANCH" != "" ]; then
COMPONENT=main
fi
echo "deploying packages from branch: $TRAVIS_BRANCH, tag: $TRAVIS_TAG to repo: $COMPONENT"
source .metadata.sh
# deb
cmd="package_cloud push golift/${REPO}/ubuntu/bionic"
$cmd release/unifi-poller_${VERSION}-${ITERATION}_arm64.deb
$cmd release/unifi-poller_${VERSION}-${ITERATION}_amd64.deb
$cmd release/unifi-poller_${VERSION}-${ITERATION}_armhf.deb
$cmd release/unifi-poller_${VERSION}-${ITERATION}_i386.deb
# rpm
cmd="package_cloud push golift/${REPO}/el/6"
$cmd release/unifi-poller-${VERSION}-${ITERATION}.arm64.rpm
$cmd release/unifi-poller-${VERSION}-${ITERATION}.x86_64.rpm
$cmd release/unifi-poller-${VERSION}-${ITERATION}.armhf.rpm
$cmd release/unifi-poller-${VERSION}-${ITERATION}.i386.rpm
for os in el centos; do
for arch in arm64 armhf x86_64 i386; do
file="unifi-poller-${VERSION}-${ITERATION}.${arch}.rpm"
opts="publish=1;override=1"
url="https://api.bintray.com/content/golift/${os}/unifi-poller/${VERSION}-${ITERATION}/${COMPONENT}/${arch}/${file}"
echo curl -T "release/${file}" "${url};${opts}"
curl -T "release/${file}" -u "${JFROG_USER_API_KEY}" "${url};${opts}"
echo
done
done
for os in ubuntu debian; do
for arch in arm64 armhf amd64 i386; do
file="unifi-poller_${VERSION}-${ITERATION}_${arch}.deb"
opts="deb_distribution=xenial,bionic,focal,jesse,stretch,buster,bullseye;deb_component=${COMPONENT};deb_architecture=${arch};publish=1;override=1"
url="https://api.bintray.com/content/golift/${os}/unifi-poller/${VERSION}-${ITERATION}/${file}"
echo curl -T "release/${file}" "${url};${opts}"
curl -T "release/${file}" -u "${JFROG_USER_API_KEY}" "${url};${opts}"
echo
done
done