mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 02:17:09 +10:00
snap: don't run snapcraft under sudo
Snapcraft 4.0 complains about running LXD builds under sudo. So instead add the CI user to the "lxd" group and use sg to switch to that membership. Resolves: #12712
This commit is contained in:
@@ -193,6 +193,7 @@ jobs:
|
||||
- LANG: C.UTF-8
|
||||
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
|
||||
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
|
||||
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
|
||||
addons:
|
||||
snaps:
|
||||
- name: snapcraft
|
||||
@@ -221,6 +222,7 @@ jobs:
|
||||
- LANG: C.UTF-8
|
||||
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
|
||||
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
|
||||
- SNAPCRAFT_BUILD_ENVIRONMENT: lxd
|
||||
fast_finish: true
|
||||
|
||||
before_install: ci/before_install.sh
|
||||
|
||||
@@ -4,6 +4,7 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
sudo apt update
|
||||
sudo usermod -aG lxd $USER
|
||||
sudo /snap/bin/lxd.migrate -yes
|
||||
sudo /snap/bin/lxd waitready
|
||||
sudo /snap/bin/lxd init --auto
|
||||
|
||||
@@ -4,5 +4,5 @@ set -e
|
||||
set -o pipefail
|
||||
|
||||
mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache"
|
||||
sudo snapcraft --use-lxd
|
||||
sg lxd -c snapcraft
|
||||
|
||||
|
||||
Reference in New Issue
Block a user