mirror of https://github.com/stashapp/stash.git
119 lines
5.5 KiB
Plaintext
119 lines
5.5 KiB
Plaintext
if: tag != latest_develop # dont build for the latest_develop tagged version
|
|
|
|
dist: xenial
|
|
git:
|
|
depth: false
|
|
language: go
|
|
go:
|
|
- 1.13.x
|
|
services:
|
|
- docker
|
|
env:
|
|
global:
|
|
- GO111MODULE=on
|
|
before_install:
|
|
- set -e
|
|
# Configure environment so changes are picked up when the Docker daemon is restarted after upgrading
|
|
- echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
|
|
- export DOCKER_CLI_EXPERIMENTAL=enabled
|
|
# Upgrade to Docker CE 19.03 for BuildKit support
|
|
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
- sudo apt-get update
|
|
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
|
|
# install binfmt docker container, this container uses qemu to run arm programs transparently allowng docker to build arm 6,7,8 containers.
|
|
- docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
|
|
# Show info to simplify debugging and create a builder that can build the platforms we need
|
|
- docker info
|
|
- docker buildx create --name builder --use
|
|
- docker buildx inspect --bootstrap
|
|
- docker buildx ls
|
|
|
|
install:
|
|
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
|
|
- nvm install 12
|
|
- travis_retry make pre-ui
|
|
- make generate
|
|
- CI=false make ui-validate ui-only
|
|
#- go get -v github.com/mgechev/revive
|
|
script:
|
|
# left lint off to avoid getting extra dependency
|
|
#- make lint
|
|
- make fmt-check vet it
|
|
after_success:
|
|
- docker pull stashapp/compiler:4
|
|
- sh ./scripts/cross-compile.sh
|
|
- git describe --tags --exclude latest_develop | tee CHECKSUMS_SHA1
|
|
- sha1sum dist/stash-* | sed 's/dist\///g' | tee -a CHECKSUMS_SHA1
|
|
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then sh ./scripts/upload-pull-request.sh; fi'
|
|
before_deploy:
|
|
# push the latest tag when on the develop branch
|
|
- if [ "$TRAVIS_BRANCH" = "develop" ]; then git tag -f latest_develop; git push -f --tags; fi
|
|
- export RELEASE_DATE=$(date +'%Y-%m-%d %H:%M:%S %Z')
|
|
- export STASH_VERSION=$(git describe --tags --exclude latest_develop)
|
|
# set TRAVIS_TAG explcitly to the version so that it doesn't pick up latest_develop
|
|
- if [ "$TRAVIS_BRANCH" = "master" ]; then export TRAVIS_TAG=${STASH_VERSION}; fi
|
|
deploy:
|
|
# latest develop release
|
|
- provider: releases
|
|
# use the v2 release provider for proper release note setting
|
|
edge: true
|
|
api_key:
|
|
secure: tGJ2q62CfPdayid2qEtW2aGRhMgCl3lBXYYQqp3eH0vFgIIf6cs7IDX7YC/x3XKMEQ/iMLZmtCXZvSTqNrD6Sk7MSnt30GIs+4uxIZDnnd8mV5X3K4n4gjD+NAORc4DrQBvUGrYMKJsR5gtkH0nu6diWb1o1If7OiJEuCPRhrmQYcza7NUdABnA9Z2wn2RNUV9Ga33WUCqLMEU5GtNBlfQPiP/khCQrqn/ocR6wUjYut3J6YagzqH4wsfJi3glHyWtowcNIw1LZi5zFxHD/bRBT4Tln7yypkjWNq9eQILA6i6kRUGf7ggyTx26/k8n4tnu+QD0vVh4EcjlThpU/LGyUXzKrrxjRwaDZnM0oYxg5AfHcBuAiAdo0eWnV3lEWRfTJMIVb9MPf4qDmzR4RREfB5OXOxwq3ODeCcJE8sTIMD/wBPZrlqS/QrRpND2gn2X4snkVukN9t9F4CMTFMtVSzFV7TDJW5E5Lq6VEExulteQhs6kcK9NRPNAaLgRQAw7X9kVWfDtiGUP+fE2i8F9Bo8bm7sOT5O5VPMPykx3EgeNg1IqIgMTCsMlhMJT4xBJoQUgmd2wWyf3Ryw+P+sFgdb5Sd7+lFgJBjMUUoOxMxAOiEgdFvCXcr+/Udyz2RdtetU1/6VzXzLPcKOw0wubZeBkISqu7o9gpfdMP9Eq00=
|
|
file:
|
|
- dist/stash-osx
|
|
- dist/stash-win.exe
|
|
- dist/stash-linux
|
|
- dist/stash-linux-arm64v8
|
|
- dist/stash-linux-arm32v7
|
|
- dist/stash-pi
|
|
- CHECKSUMS_SHA1
|
|
skip_cleanup: true
|
|
overwrite: true
|
|
name: "${STASH_VERSION}: Latest development build"
|
|
release_notes: "**${RELEASE_DATE}**\n This is always the latest committed version on the develop branch. Use as your own risk!"
|
|
prerelease: true
|
|
on:
|
|
repo: stashapp/stash
|
|
branch: develop
|
|
# docker image build for develop release
|
|
- provider: script
|
|
skip_cleanup: true
|
|
script: bash ./docker/ci/x86_64/docker_push.sh development
|
|
on:
|
|
repo: stashapp/stash
|
|
branch: develop
|
|
# official master release - only build when tagged
|
|
- provider: releases
|
|
api_key:
|
|
secure: tGJ2q62CfPdayid2qEtW2aGRhMgCl3lBXYYQqp3eH0vFgIIf6cs7IDX7YC/x3XKMEQ/iMLZmtCXZvSTqNrD6Sk7MSnt30GIs+4uxIZDnnd8mV5X3K4n4gjD+NAORc4DrQBvUGrYMKJsR5gtkH0nu6diWb1o1If7OiJEuCPRhrmQYcza7NUdABnA9Z2wn2RNUV9Ga33WUCqLMEU5GtNBlfQPiP/khCQrqn/ocR6wUjYut3J6YagzqH4wsfJi3glHyWtowcNIw1LZi5zFxHD/bRBT4Tln7yypkjWNq9eQILA6i6kRUGf7ggyTx26/k8n4tnu+QD0vVh4EcjlThpU/LGyUXzKrrxjRwaDZnM0oYxg5AfHcBuAiAdo0eWnV3lEWRfTJMIVb9MPf4qDmzR4RREfB5OXOxwq3ODeCcJE8sTIMD/wBPZrlqS/QrRpND2gn2X4snkVukN9t9F4CMTFMtVSzFV7TDJW5E5Lq6VEExulteQhs6kcK9NRPNAaLgRQAw7X9kVWfDtiGUP+fE2i8F9Bo8bm7sOT5O5VPMPykx3EgeNg1IqIgMTCsMlhMJT4xBJoQUgmd2wWyf3Ryw+P+sFgdb5Sd7+lFgJBjMUUoOxMxAOiEgdFvCXcr+/Udyz2RdtetU1/6VzXzLPcKOw0wubZeBkISqu7o9gpfdMP9Eq00=
|
|
file:
|
|
- dist/stash-osx
|
|
- dist/stash-win.exe
|
|
- dist/stash-linux
|
|
- dist/stash-linux-arm64v8
|
|
- dist/stash-linux-arm32v7
|
|
- dist/stash-pi
|
|
- CHECKSUMS_SHA1
|
|
# make the release a draft so the maintainers can confirm before releasing
|
|
draft: true
|
|
skip_cleanup: true
|
|
overwrite: true
|
|
# don't write the body. To be done manually for now. In future we might
|
|
# want to generate the changelog or get it from a file
|
|
name: ${STASH_VERSION}
|
|
on:
|
|
repo: stashapp/stash
|
|
tags: true
|
|
# make sure we don't release using the latest_develop tag
|
|
condition: $TRAVIS_TAG != latest_develop
|
|
# docker image build for master release
|
|
- provider: script
|
|
skip_cleanup: true
|
|
script: bash ./docker/ci/x86_64/docker_push.sh latest
|
|
on:
|
|
repo: stashapp/stash
|
|
tags: true
|
|
# make sure we don't release using the latest_develop tag
|
|
condition: $TRAVIS_TAG != latest_develop
|