From 7bb2ad568f41ffb1ad681eb1f06b823e5d2ae9ac Mon Sep 17 00:00:00 2001 From: Fabio Colella Date: Thu, 19 Nov 2020 21:31:17 +0200 Subject: [PATCH 1/3] Enable automatic snap build and release Now the snap can be built and released by CI like the gem --- .travis.yml | 107 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 73 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd2f6bab..46ac255c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,76 @@ -language: ruby -cache: bundler +matrix: + include: + - language: ruby + cache: bundler -os: - - linux + os: + - linux -rvm: - - jruby - - "2.4" - - "2.5" - - "2.6" - - "2.7" + rvm: + - jruby + - "2.4" + - "2.5" + - "2.6" + - "2.7" -jobs: - include: - - rvm: "2.3" - before_script: - - gem install faraday -v 1.0.1 - - os: osx - rvm: "2.5" - - os: osx - rvm: "2.6" - - stage: deploy - if: repo = travis-ci/travis.rb and branch = master and type = push - os: linux - rvm: "2.6" - deploy: - provider: rubygems - api_key: - secure: KcBpkFaes74KGMm8X/rRA8e13+t3PmkefsAvOAR+iF4g1GyuLSPkP92Fb9vFfsXBph+qmFh5rNa2lIRf/3RXW6COxY7CMMaARxUfJOKE0rmIwF0qfKI+RZDh6abg92iYngunMZVN8WVft6Lv9ZTOYCWxr1Zs1Ll/Rl4PfvHNd1g= - gem: travis - edge: true - -script: - - bundle exec rake - - gem build travis.gemspec - - gem install travis-*.gem + jobs: + include: + - rvm: "2.3" + before_script: + - gem install faraday -v 1.0.1 + - os: osx + rvm: "2.5" + - os: osx + rvm: "2.6" + - stage: deploy + if: repo = travis-ci/travis.rb and branch = master and type = push + os: linux + rvm: "2.6" + deploy: + provider: rubygems + api_key: + secure: KcBpkFaes74KGMm8X/rRA8e13+t3PmkefsAvOAR+iF4g1GyuLSPkP92Fb9vFfsXBph+qmFh5rNa2lIRf/3RXW6COxY7CMMaARxUfJOKE0rmIwF0qfKI+RZDh6abg92iYngunMZVN8WVft6Lv9ZTOYCWxr1Zs1Ll/Rl4PfvHNd1g= + gem: travis + edge: true + + script: + - bundle exec rake + - gem build travis.gemspec + - gem install travis-*.gem + + - language: shell + dist: xenial + os: linux + + env: + global: + - LC_ALL: C.UTF-8 + - LANG: C.UTF-8 + - SNAPCRAFT_ENABLE_SILENT_REPORT: y + - SNAPCRAFT_BUILD_INFO: 1 + - SNAPCRAFT_BUILD_ENVIRONMENT: 'lxd' + + addons: + snaps: + - name: snapcraft + channel: stable + confinement: classic + - name: lxd + channel: stable + + script: + - sudo usermod --append --groups lxd $USER + - sudo /snap/bin/lxd.migrate -yes + - sudo /snap/bin/lxd waitready + - sudo /snap/bin/lxd init --auto + - sg lxd -c snapcraft + + after_failure: + - sudo journalctl -u snapd + + deploy: + provider: snap + snap: travis_*.snap + channel: stable + cleanup: false + skip_cleanup: true From 8b5c1441bb0ae4fe19f21e80ca3dfaf3570166cc Mon Sep 17 00:00:00 2001 From: Fabio Colella Date: Thu, 19 Nov 2020 21:35:51 +0200 Subject: [PATCH 2/3] Update .travis.yml --- .travis.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46ac255c..183d2fb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,10 +67,13 @@ matrix: after_failure: - sudo journalctl -u snapd - - deploy: - provider: snap - snap: travis_*.snap - channel: stable - cleanup: false - skip_cleanup: true + + - stage: deploy + if: repo = travis-ci/travis.rb and branch = master and type = push + os: linux + deploy: + provider: snap + snap: travis_*.snap + channel: stable + cleanup: false + skip_cleanup: true From 358054790d1af31d53dffaa04b9e03d4d3a813d2 Mon Sep 17 00:00:00 2001 From: Fabio Colella Date: Thu, 19 Nov 2020 22:17:19 +0200 Subject: [PATCH 3/3] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 183d2fb0..e524cfeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,6 @@ matrix: deploy: provider: snap snap: travis_*.snap - channel: stable + channel: ${SNAP_DEPLOY_TRACK:-latest}/stable cleanup: false skip_cleanup: true