*: 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
|
- ./build_docker.sh
|
||||||
after_script:
|
after_script:
|
||||||
- docker images
|
- 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"
|
CHANNEL="release"
|
||||||
fi
|
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
|
# Launchpad oauth tokens data is necessary to run snapcraft remote-build
|
||||||
#
|
#
|
||||||
# Here's an instruction on how to generate launchpad OAuth tokens:
|
# 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() {
|
build_snap() {
|
||||||
# Run the build
|
# 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 \
|
-v $(pwd)/launchpad_credentials:/root/.local/share/snapcraft/provider/launchpad/credentials:ro \
|
||||||
${BUILDER_IMAGE} \
|
${BUILDER_IMAGE} \
|
||||||
snapcraft remote-build --build-on=${ARCH} --launchpad-accept-public-upload
|
snapcraft remote-build --build-on=${ARCH} --launchpad-accept-public-upload
|
||||||
|
@ -57,7 +64,8 @@ publish_snap() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Login and publish the snap
|
# Login and publish the snap
|
||||||
docker run -it -v $(pwd):/build \
|
docker run ${INTERACTIVE} --rm \
|
||||||
|
-v $(pwd):/build \
|
||||||
${BUILDER_IMAGE} \
|
${BUILDER_IMAGE} \
|
||||||
sh -c "snapcraft login --with=/build/snapcraft_login && snapcraft push --release=${CHANNEL} /build/${snapFile}"
|
sh -c "snapcraft login --with=/build/snapcraft_login && snapcraft push --release=${CHANNEL} /build/${snapFile}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue