*: remove snap from travis
This commit is contained in:
parent
3fdd3f7cec
commit
3ae6043748
17
.travis.yml
17
.travis.yml
|
@ -119,20 +119,3 @@ matrix:
|
|||
- ./build_docker.sh
|
||||
after_script:
|
||||
- docker images
|
||||
|
||||
# Snapcraft build configuration
|
||||
- if: repo = AdguardTeam/AdGuardHome
|
||||
- name: snapcraft
|
||||
# if: type != pull_request AND (branch = master OR tag IS present) AND repo = AdguardTeam/AdGuardHome
|
||||
if: branch = snapcraft
|
||||
go:
|
||||
- 1.14.x
|
||||
os:
|
||||
- linux
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
- ./build_snap.sh
|
||||
after_failure:
|
||||
# replace snap name
|
||||
- cat adguardhometest_*.txt
|
|
@ -16,6 +16,12 @@ else
|
|||
CHANNEL="release"
|
||||
fi
|
||||
|
||||
# If bash is interactive, set `-it` parameter for docker run
|
||||
INTERACTIVE=""
|
||||
if [ -t 0 ] ; then
|
||||
INTERACTIVE="-it"
|
||||
fi
|
||||
|
||||
# Launchpad oauth tokens data is necessary to run snapcraft remote-build
|
||||
#
|
||||
# Here's an instruction on how to generate launchpad OAuth tokens:
|
||||
|
@ -42,7 +48,8 @@ sed -i.bak 's/dev_version/'"${VERSION}"'/g' ./snapcraft.yaml
|
|||
|
||||
build_snap() {
|
||||
# Run the build
|
||||
docker run -it -v $(pwd):/build \
|
||||
docker run ${INTERACTIVE} --rm \
|
||||
-v $(pwd):/build \
|
||||
-v $(pwd)/launchpad_credentials:/root/.local/share/snapcraft/provider/launchpad/credentials:ro \
|
||||
${BUILDER_IMAGE} \
|
||||
snapcraft remote-build --build-on=${ARCH} --launchpad-accept-public-upload
|
||||
|
@ -57,7 +64,8 @@ publish_snap() {
|
|||
fi
|
||||
|
||||
# Login and publish the snap
|
||||
docker run -it -v $(pwd):/build \
|
||||
docker run ${INTERACTIVE} --rm \
|
||||
-v $(pwd):/build \
|
||||
${BUILDER_IMAGE} \
|
||||
sh -c "snapcraft login --with=/build/snapcraft_login && snapcraft push --release=${CHANNEL} /build/${snapFile}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue