From a4dc85543bba19d3f1e6adda91b2302b2860f36e Mon Sep 17 00:00:00 2001 From: TriplEight Date: Tue, 12 Feb 2019 15:37:54 +0100 Subject: [PATCH] snap: official image / test (#10168) * official image / test * fix / test * bit more necromancy * fix paths * add source bin/df /test * add source bin/df /test2 * something w paths /test * something w paths /test * add source-type /test * show paths /test * copy plugin /test * plugin -> nil * install rhash * no questions while installing rhash * publish snap only for release --- .gitlab-ci.yml | 4 ++-- scripts/gitlab/publish-snap.sh | 14 +++++++++++++- scripts/snap/snapcraft.template.yaml | 6 +----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d0b934a2..2b1162d65 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -103,9 +103,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: {} diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index f001bbff0..386abdf37 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -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 diff --git a/scripts/snap/snapcraft.template.yaml b/scripts/snap/snapcraft.template.yaml index eb67ba128..d170241db 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -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]