Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package solana as a snap #377

Merged
merged 3 commits into from
Jun 19, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Package solana as a snap
  • Loading branch information
mvines committed Jun 18, 2018
commit f6acf4bc37ccb15039d9b027f6258641802a8c13
1 change: 1 addition & 0 deletions ci/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/package-lock.json
/snapcraft.credentials
7 changes: 5 additions & 2 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ steps:
agents:
- "queue=cuda"
- wait
- command: "ci/publish.sh"
- command: "ci/docker-run.sh snapcraft/xenial-amd64 ci/publish-snap.sh"
timeout_in_minutes: 20
name: "publish release artifacts"
name: "publish snap"
- command: "ci/publish-crate.sh"
timeout_in_minutes: 20
name: "publish crate"
8 changes: 7 additions & 1 deletion ci/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ fi
docker pull "$IMAGE"
shift

ARGS=(--workdir /solana --volume "$PWD:/solana" --rm)
ARGS=(
--workdir /solana
--volume "$PWD:/solana"
--env "HOME=/solana"
--rm
)

ARGS+=(--env "CARGO_HOME=/solana/.cargo")

Expand All @@ -35,6 +40,7 @@ ARGS+=(
--env BUILDKITE_TAG
--env CODECOV_TOKEN
--env CRATES_IO_TOKEN
--env SNAPCRAFT_CREDENTIALS_KEY
)

set -x
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions ci/publish-snap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash -e

cd "$(dirname "$0")/.."

DRYRUN=
if [[ -z $BUILDKITE_BRANCH || $BUILDKITE_BRANCH =~ pull/* ]]; then
DRYRUN="echo"
fi

if [[ -z "$BUILDKITE_TAG" ]]; then
SNAP_CHANNEL=edge
else
SNAP_CHANNEL=beta
fi

if [[ -n $SNAPCRAFT_CREDENTIALS_KEY ]]; then
(
openssl aes-256-cbc -d \
-in ci/snapcraft.credentials.enc \
-out ci/snapcraft.credentials \
-k "$SNAPCRAFT_CREDENTIALS_KEY"

snapcraft login --with ci/snapcraft.credentials
) || {
rm -f ci/snapcraft.credentials;
exit 1
}
fi

set -x
snapcraft
$DRYRUN snapcraft push solana_*.snap --release $SNAP_CHANNEL
34 changes: 34 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: solana
version: git
summary: Blockchain, Rebuilt for Scale
description: |
710,000 tx/s with off-the-shelf hardware and no sharding.
Scales with Moore's Law.
grade: devel
confinement: strict

apps:
fullnode:
command: solana-fullnode
plugs:
- network
- network-bind
- home
fullnode-config:
command: solana-fullnode-config
plugs:
- network
- network-bind
genesis:
command: solana-genesis
genesis-demo:
command: solana-genesis-demo
mint:
command: solana-mint
mint-demo:
command: solana-mint-demo

parts:
solana:
plugin: rust
rust-channel: stable