From 8c17ec14f977357d19badc9179b374a9e54f67be Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 12 Nov 2019 00:05:58 +0000 Subject: [PATCH] initial snap support --- .travis.yml | 25 +++++++++++++++++++++++++ snapcraft.yaml | 18 ++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 snapcraft.yaml diff --git a/.travis.yml b/.travis.yml index 48f934516..fc30fcd88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -109,6 +109,31 @@ jobs: on: tags: true repo: iterative/dvc + - name: Snapcraft snap + addons: + snaps: + - name: snapcraft + channel: stable + confinement: classic + - name: lxd + channel: stable + env: + - SNAPCRAFT_IMAGE_INFO: '{"build_url": "$TRAVIS_BUILD_URL"}' + script: + - sudo /snap/bin/lxd.migrate -yes + - sudo /snap/bin/lxd waitready + - sudo /snap/bin/lxd init --auto + - 'if [ -n "$SOURCE_TAG" ]; then sed -i "s/source-branch.*/source-tag: $SOURCE_TAG/" snap/snapcraft.yaml ; fi' + - sudo snapcraft --use-lxd + after_failure: + - sudo journalctl -u snapd + before_deploy: + - export SNAP_DEPLOY_TRACK="$SOURCE_TAG" + deploy: + - provider: snap + snap: dvc_*.snap + channel: ${SOURCE_TAG:-latest}/edge + skip_cleanup: true before_install: - bash ./scripts/ci/before_install.sh diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 000000000..a3ccdc330 --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,18 @@ +name: dvc +summary: Data Version Control +description: | + Git for Data & Models https://dvc.org +adopt-info: dvc +grade: stable +confinement: strict +base: core18 +license: Apache-2.0 +parts: + dvc: + plugin: python + python-version: python3 + source: . + parse-info: [setup.py] +apps: + dvc: + command: bin/dvc