Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

snap: official image / test #10168

Merged
merged 15 commits into from
Feb 12, 2019
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ publish-docker:
- scripts/gitlab/publish-docker.sh parity

publish-snap:
stage: publish
stage: optional #publish
only: *releaseable_branches
image: parity/snapcraft:gitlab-ci
image: snapcore/snapcraft
variables:
BUILD_ARCH: amd64
cache: {}
Expand Down
14 changes: 13 additions & 1 deletion scripts/gitlab/publish-snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,19 @@ SNAP_PACKAGE="parity_"$VERSION"_"$BUILD_ARCH".snap"
echo "__________Create snap package__________"
echo "Release channel :" $GRADE " Branch/tag: " $CI_COMMIT_REF_NAME
echo $VERSION:$GRADE:$BUILD_ARCH
cat scripts/snap/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET' > snapcraft.yaml
# cat scripts/snap/snapcraft.template.yaml | envsubst '$VERSION:$GRADE:$BUILD_ARCH:$CARGO_TARGET' > snapcraft.yaml
# a bit more necromancy (substitutions):
pwd
cd /builds/$CI_PROJECT_PATH/scripts/snap/
sed -e 's/$VERSION/'"$VERSION"'/g' \
-e 's/$GRADE/'"$GRADE"'/g' \
-e 's/$BUILD_ARCH/'"$BUILD_ARCH"'/g' \
-e 's/$CARGO_TARGET/'"$CARGO_TARGET"'/g' \
snapcraft.template.yaml > /builds/$CI_PROJECT_PATH/snapcraft.yaml
cd /builds/$CI_PROJECT_PATH
pwd
apt update
apt install -y --no-install-recommends rhash
cat snapcraft.yaml
snapcraft --target-arch=$BUILD_ARCH
ls *.snap
Expand Down
6 changes: 1 addition & 5 deletions scripts/snap/snapcraft.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,4 @@ parts:
cp -v ethkey $SNAPCRAFT_PART_INSTALL/usr/bin/ethkey
cp -v ethstore $SNAPCRAFT_PART_INSTALL/usr/bin/ethstore
cp -v whisper $SNAPCRAFT_PART_INSTALL/usr/bin/whisper
stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb]
df:
plugin: nil
stage-packages: [coreutils]
stage: [bin/df]
stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb5.3]