From ee715d2574d38c90c66dd702eb056cca4c3307a2 Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 10 Jan 2019 22:09:52 +0100 Subject: [PATCH 01/15] official image / test --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d5f483da12..de588e16c91 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,9 +96,9 @@ publish-docker: - scripts/gitlab/publish-docker.sh parity publish-snap: - stage: publish - only: *releaseable_branches - image: parity/snapcraft:gitlab-ci + stage: optional#publish + # only: *releaseable_branches + image: snapcore/snapcraft variables: BUILD_ARCH: amd64 cache: {} From 9cb9748369717e4f76003ea9031cd71adffc107a Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 10 Jan 2019 22:13:47 +0100 Subject: [PATCH 02/15] fix / test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de588e16c91..63ae1da70e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -96,7 +96,7 @@ publish-docker: - scripts/gitlab/publish-docker.sh parity publish-snap: - stage: optional#publish + stage: optional #publish # only: *releaseable_branches image: snapcore/snapcraft variables: From 4ea38827ef9790c5bb6d598c377f60311e767e63 Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 00:17:13 +0100 Subject: [PATCH 03/15] bit more necromancy --- scripts/gitlab/publish-snap.sh | 10 +++++++++- scripts/snap/snapcraft.template.yaml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index f001bbff0d8..6dab8d47b78 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -21,7 +21,15 @@ 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): +cd /parity_ethereum/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 > /parity_ethereum/snapcraft.yaml +cd /parity_ethereum/ 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 eb67ba12820..5dbec566a05 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -50,7 +50,7 @@ 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] + stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb5.3] df: plugin: nil stage-packages: [coreutils] From dcaf7baccf8f3dd58dac59a473de546aadf3d35c Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 00:26:08 +0100 Subject: [PATCH 04/15] fix paths --- scripts/gitlab/publish-snap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index 6dab8d47b78..dcf363b0094 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -23,13 +23,13 @@ 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 # a bit more necromancy (substitutions): -cd /parity_ethereum/scripts/snap/ +cd /builds/parity/parity-ethereum/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 > /parity_ethereum/snapcraft.yaml -cd /parity_ethereum/ + snapcraft.template.yaml > /builds/parity/parity-ethereum/snapcraft.yaml +cd /builds/parity/parity-ethereum/ cat snapcraft.yaml snapcraft --target-arch=$BUILD_ARCH ls *.snap From 1d0ee6332fedca96a135ca4bbf61441ee2e56304 Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 00:51:14 +0100 Subject: [PATCH 05/15] add source bin/df /test --- scripts/gitlab/publish-snap.sh | 6 +++--- scripts/snap/snapcraft.template.yaml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index dcf363b0094..ab6901e5e2b 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -23,13 +23,13 @@ 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 # a bit more necromancy (substitutions): -cd /builds/parity/parity-ethereum/scripts/snap/ +cd $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/parity/parity-ethereum/snapcraft.yaml -cd /builds/parity/parity-ethereum/ + snapcraft.template.yaml > $CI_PROJECT_PATH/snapcraft.yaml +cd $CI_PROJECT_PATH 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 5dbec566a05..7a37f2df651 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -52,6 +52,7 @@ parts: cp -v whisper $SNAPCRAFT_PART_INSTALL/usr/bin/whisper stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb5.3] df: + source: /bin/df plugin: nil stage-packages: [coreutils] stage: [bin/df] From 751db975f6b5ce462189fc6e74c64d85a65f88c6 Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 00:58:45 +0100 Subject: [PATCH 06/15] add source bin/df /test2 --- scripts/snap/snapcraft.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/snap/snapcraft.template.yaml b/scripts/snap/snapcraft.template.yaml index 7a37f2df651..79285aa8d75 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -52,7 +52,7 @@ parts: cp -v whisper $SNAPCRAFT_PART_INSTALL/usr/bin/whisper stage-packages: [libc6, libudev1, libstdc++6, cmake, libdb5.3] df: - source: /bin/df + source: /bin/ plugin: nil stage-packages: [coreutils] stage: [bin/df] From 3663c1718ce23ab738be4ecc3b59f2a2aa7f9a3d Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 01:16:07 +0100 Subject: [PATCH 07/15] something w paths /test --- scripts/gitlab/publish-snap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index ab6901e5e2b..5161c10ae0f 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -30,6 +30,7 @@ sed -e 's/$VERSION/'"$VERSION"'/g' \ -e 's/$CARGO_TARGET/'"$CARGO_TARGET"'/g' \ snapcraft.template.yaml > $CI_PROJECT_PATH/snapcraft.yaml cd $CI_PROJECT_PATH +pwd cat snapcraft.yaml snapcraft --target-arch=$BUILD_ARCH ls *.snap From 737f04718778a546ef5398b93691582297eeb8f9 Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 01:24:40 +0100 Subject: [PATCH 08/15] something w paths /test --- scripts/gitlab/publish-snap.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index 5161c10ae0f..e43b1255c7d 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -23,14 +23,15 @@ 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 # a bit more necromancy (substitutions): -cd $CI_PROJECT_PATH/scripts/snap/ +pwd && ls +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 > $CI_PROJECT_PATH/snapcraft.yaml -cd $CI_PROJECT_PATH -pwd + snapcraft.template.yaml > /builds/$CI_PROJECT_PATH/snapcraft.yaml +cd /builds/$CI_PROJECT_PATH +pwd && ls cat snapcraft.yaml snapcraft --target-arch=$BUILD_ARCH ls *.snap From 27bf98dec489ef9745466d33df9ed6284df2c7a5 Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 10:44:09 +0100 Subject: [PATCH 09/15] add source-type /test --- scripts/snap/snapcraft.template.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/snap/snapcraft.template.yaml b/scripts/snap/snapcraft.template.yaml index 79285aa8d75..b9c950c5014 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -41,6 +41,7 @@ parts: cp -v ./parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/ cp -v ./icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/ parity: + source-type: bzr source: ./artifacts/$CARGO_TARGET plugin: nil override-build: | From 58a66c90d3051847bc6423a348ceabda99ca3d2a Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 11:52:42 +0100 Subject: [PATCH 10/15] show paths /test --- scripts/gitlab/publish-snap.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index e43b1255c7d..68836b66623 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -23,7 +23,7 @@ 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 # a bit more necromancy (substitutions): -pwd && ls +pwd cd /builds/$CI_PROJECT_PATH/scripts/snap/ sed -e 's/$VERSION/'"$VERSION"'/g' \ -e 's/$GRADE/'"$GRADE"'/g' \ @@ -31,7 +31,8 @@ sed -e 's/$VERSION/'"$VERSION"'/g' \ -e 's/$CARGO_TARGET/'"$CARGO_TARGET"'/g' \ snapcraft.template.yaml > /builds/$CI_PROJECT_PATH/snapcraft.yaml cd /builds/$CI_PROJECT_PATH -pwd && ls +pwd +apt install tree && tree /builds/$CI_PROJECT_PATH cat snapcraft.yaml snapcraft --target-arch=$BUILD_ARCH ls *.snap From 7ee7874a73d31f47daf6062a4dc59a1c91ffe566 Mon Sep 17 00:00:00 2001 From: Denis P Date: Fri, 11 Jan 2019 12:08:28 +0100 Subject: [PATCH 11/15] copy plugin /test --- scripts/snap/snapcraft.template.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/snap/snapcraft.template.yaml b/scripts/snap/snapcraft.template.yaml index b9c950c5014..3e62d29356f 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -43,7 +43,7 @@ parts: parity: source-type: bzr source: ./artifacts/$CARGO_TARGET - plugin: nil + plugin: copy override-build: | mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin cp -v parity $SNAPCRAFT_PART_INSTALL/usr/bin/parity @@ -52,8 +52,8 @@ parts: 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, libdb5.3] - df: - source: /bin/ - plugin: nil - stage-packages: [coreutils] - stage: [bin/df] + # df: + # source: /bin/ + # plugin: nil + # stage-packages: [coreutils] + # stage: [bin/df] From ac649038b53ec005eb72b6d1e7c123f819f80be5 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Tue, 5 Feb 2019 20:14:24 +0300 Subject: [PATCH 12/15] plugin -> nil --- scripts/snap/snapcraft.template.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/snap/snapcraft.template.yaml b/scripts/snap/snapcraft.template.yaml index 3e62d29356f..d170241dbec 100644 --- a/scripts/snap/snapcraft.template.yaml +++ b/scripts/snap/snapcraft.template.yaml @@ -41,9 +41,8 @@ parts: cp -v ./parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/ cp -v ./icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/ parity: - source-type: bzr source: ./artifacts/$CARGO_TARGET - plugin: copy + plugin: nil override-build: | mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin cp -v parity $SNAPCRAFT_PART_INSTALL/usr/bin/parity @@ -52,8 +51,3 @@ parts: 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, libdb5.3] - # df: - # source: /bin/ - # plugin: nil - # stage-packages: [coreutils] - # stage: [bin/df] From 4124b22476cb39fb03a2d1fe62056e26da48f06b Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Tue, 5 Feb 2019 20:18:18 +0300 Subject: [PATCH 13/15] install rhash --- scripts/gitlab/publish-snap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index 68836b66623..b30f7fbe1f2 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -32,7 +32,7 @@ sed -e 's/$VERSION/'"$VERSION"'/g' \ snapcraft.template.yaml > /builds/$CI_PROJECT_PATH/snapcraft.yaml cd /builds/$CI_PROJECT_PATH pwd -apt install tree && tree /builds/$CI_PROJECT_PATH +apt install rhash cat snapcraft.yaml snapcraft --target-arch=$BUILD_ARCH ls *.snap From 5de2836fe9fb2a01cb33ead9df901a33a70090ca Mon Sep 17 00:00:00 2001 From: TriplEight Date: Fri, 8 Feb 2019 18:34:34 +0100 Subject: [PATCH 14/15] no questions while installing rhash --- scripts/gitlab/publish-snap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/gitlab/publish-snap.sh b/scripts/gitlab/publish-snap.sh index b30f7fbe1f2..386abdf3706 100755 --- a/scripts/gitlab/publish-snap.sh +++ b/scripts/gitlab/publish-snap.sh @@ -32,7 +32,8 @@ sed -e 's/$VERSION/'"$VERSION"'/g' \ snapcraft.template.yaml > /builds/$CI_PROJECT_PATH/snapcraft.yaml cd /builds/$CI_PROJECT_PATH pwd -apt install rhash +apt update +apt install -y --no-install-recommends rhash cat snapcraft.yaml snapcraft --target-arch=$BUILD_ARCH ls *.snap From 300cd7d4d72f09a2923c44258e7c28342b250c3c Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Tue, 12 Feb 2019 09:25:54 +0300 Subject: [PATCH 15/15] publish snap only for release --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 63ae1da70e5..0b31919dd97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -97,7 +97,7 @@ publish-docker: publish-snap: stage: optional #publish - # only: *releaseable_branches + only: *releaseable_branches image: snapcore/snapcraft variables: BUILD_ARCH: amd64