This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ci: re-enable snap publishing #10142
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0ce0221
ci: enable snap publishing~
5chdn 73a0869
ci: add publish snap script
5chdn 2ea98b7
ci: add snapcraft skeleton
5chdn 89c947a
ci: group export statements
5chdn 1455418
ci: enable snaps on pr branch
5chdn e6c9ee2
ci: enable snaps on pr branch
5chdn d4e44b0
ci: set default BUILD_ARCH
5chdn 0eac04e
ci: enable snaps on pr branch
5chdn 08137f8
ci: enable snaps on pr branch
5chdn 101d19e
ci: add libdb to snap
5chdn 736a9fa
ci: reinitiate gitlabci
5chdn 5c40721
ci: reinitiate publish-snap script
5chdn 287297d
ci: fix yaml syntax
5chdn 7dcf922
cargo/gitlab env vars
TriplEight efa2da1
debug, revert me
TriplEight d94181c
version?
TriplEight 86340aa
debug vars
TriplEight dbea690
vars
TriplEight c1fbd60
vars fix
TriplEight 68f735a
vars fix
TriplEight ea0c4de
revert
TriplEight a7ca051
Update scripts/gitlab/publish-snap.sh
TriplEight 14264fe
ci: read track from cargo toml
5chdn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,8 +54,6 @@ test-audit: | |
build-linux: | ||
stage: build | ||
only: *releaseable_branches | ||
variables: | ||
CARGO_TARGET: x86_64-unknown-linux-gnu | ||
script: | ||
- scripts/gitlab/build-unix.sh | ||
<<: *collect_artifacts | ||
|
@@ -97,6 +95,23 @@ publish-docker: | |
script: | ||
- scripts/gitlab/publish-docker.sh parity | ||
|
||
publish-snap: | ||
stage: publish | ||
only: *releaseable_branches | ||
image: parity/snapcraft:gitlab-ci | ||
variables: | ||
BUILD_ARCH: amd64 | ||
cache: {} | ||
before_script: *determine_version | ||
dependencies: | ||
- build-linux | ||
tags: | ||
- rust-stable | ||
script: | ||
- scripts/gitlab/publish-snap.sh | ||
allow_failure: true | ||
<<: *collect_artifacts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would prefer to allow it to fail for the start. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done (112) |
||
|
||
publish-awss3: | ||
stage: publish | ||
only: *releaseable_branches | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
set -e # fail on any error | ||
set -u # treat unset variables as error | ||
|
||
TRACK=`awk -F '=' '/^track/ {print $2}' ./util/version/Cargo.toml` | ||
|
||
case ${TRACK} in | ||
nightly) export GRADE="devel" CHANNEL="edge";; | ||
beta) export GRADE="stable" CHANNEL="beta";; | ||
stable) export GRADE="stable" CHANNEL="stable";; | ||
*) echo "No release" exit 0;; | ||
esac | ||
|
||
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 snapcraft.yaml | ||
snapcraft --target-arch=$BUILD_ARCH | ||
ls *.snap | ||
|
||
echo "__________Calculating checksums__________" | ||
rhash --sha256 $SNAP_PACKAGE -o $SNAP_PACKAGE".sha256" | ||
cat $SNAP_PACKAGE".sha256" | ||
|
||
echo "__________Releasing snap package__________" | ||
echo "Release channel :" $CHANNEL " Branch/tag: " $CI_COMMIT_REF_NAME | ||
|
||
echo $SNAPCRAFT_LOGIN_PARITY_BASE64 | base64 --decode > snapcraft.login | ||
snapcraft login --with snapcraft.login | ||
snapcraft push --release $CHANNEL $SNAP_PACKAGE | ||
snapcraft status parity | ||
snapcraft logout |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Desktop Entry] | ||
Type=Application | ||
Encoding=UTF-8 | ||
Name=Parity Ethereum | ||
Comment=The fastest and most advanced Ethereum client. | ||
Exec=parity | ||
Icon=/usr/share/pixmaps/icon.png | ||
Terminal=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: parity | ||
version: $VERSION | ||
architectures: [$BUILD_ARCH] | ||
grade: $GRADE | ||
confinement: strict | ||
|
||
summary: Fast, light, robust Ethereum implementation | ||
description: | | ||
Parity's goal is to be the fastest, lightest, and most secure Ethereum | ||
client. We are developing Parity using the sophisticated and cutting-edge | ||
Rust programming language. Parity is licensed under the GPLv3, and can be | ||
used for all your Ethereum needs. | ||
|
||
apps: | ||
parity: | ||
command: parity | ||
plugs: [home, network, network-bind, mount-observe, x11, unity7, desktop, desktop-legacy, wayland] | ||
desktop: ./usr/share/applications/parity.desktop | ||
parity-evm: | ||
command: parity-evm | ||
plugs: [home, network, network-bind] | ||
ethkey: | ||
command: ethkey | ||
plugs: [home] | ||
ethstore: | ||
command: ethstore | ||
plugs: [home] | ||
whisper: | ||
command: whisper | ||
plugs: [home, network-bind] | ||
|
||
icon: ./scripts/snap/icon.png | ||
|
||
parts: | ||
desktop-icon: | ||
source: ./scripts/snap | ||
plugin: nil | ||
override-build: | | ||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/applications | ||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps | ||
cp -v ./parity.desktop $SNAPCRAFT_PART_INSTALL/usr/share/applications/ | ||
cp -v ./icon.png $SNAPCRAFT_PART_INSTALL/usr/share/pixmaps/ | ||
parity: | ||
source: ./artifacts/$CARGO_TARGET | ||
plugin: nil | ||
override-build: | | ||
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/bin | ||
cp -v parity $SNAPCRAFT_PART_INSTALL/usr/bin/parity | ||
cp -v parity-evm $SNAPCRAFT_PART_INSTALL/usr/bin/parity-evm | ||
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] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only be amd64, right?
Any thoughts on snaps for other architectures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which ones did you have in mind? We basically dropped everything else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In here we are building all the possible ones, just because it's easy in that case:
https://github.com/elopio/parity-snap/blob/2b7006abad59f2ff6af211bf021bf8dd072ffece/.travis.yml#L14
Intuitively, I think arm is important. But the snap store doesn't show me metrics about that to confirm it. They might have some number accessible through the backend, I'll ask.