Migration from circleci.io to build.snapcraft.io

This commit is contained in:
Alessio Treglia 2019-02-03 16:34:05 -08:00
parent 857a65dc61
commit 15225e9333
2 changed files with 7 additions and 67 deletions

View File

@ -264,52 +264,6 @@ jobs:
make localnet-start
./scripts/localnet-blocks-test.sh 40 5 10 localhost
snap-edge:
working_directory: /home/circleci/.snap_workspace/src/github.com/cosmos/cosmos-sdk
machine: true
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
GOPATH: /tmp/workspace
GOBIN: /tmp/workspace/bin
parallelism: 1
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run:
name: Install prerequitistes
command: |
sudo sh -c "echo '#!/bin/sh' > /usr/sbin/update-initramfs"
sudo sh -c "echo 'exit 0' >> /usr/sbin/update-initramfs"
sudo apt update -y &>/dev/null
sudo apt install -y build-essential snapd
sudo snap install snapcraft --edge --classic
- run:
name: prepping snap build
command: |
/snap/bin/snapcraft version
make snapcraft.yaml
- run:
name: build edge snap
command: /snap/bin/snapcraft
- run:
name: Create credentials file
command: |
echo '[login.ubuntu.com]' > credentials
echo "macaroon = $SNAPCRAFT_CREDENTIALS_MACAROON" >> credentials
echo "unbound_discharge = $SNAPCRAFT_CREDENTIALS_UNBOUND_DISCHARGE" >> credentials
echo "email = $SNAPCRAFT_CREDENTIALS_EMAIL" >> credentials
- run:
name: Authenticate snapcraft
command: /snap/bin/snapcraft login --with credentials
- run:
name: Push/release snap
command: /snap/bin/snapcraft push *.snap --release edge
- run:
name: Clean up credentials file
command: rm -vf credentials
deploy_docs:
<<: *docs_deploy
steps:
@ -430,14 +384,6 @@ workflows:
- localnet:
requires:
- setup_dependencies
- snap-edge:
requires:
- setup_dependencies
filters:
branches:
only:
- master
- develop
- upload_coverage:
requires:
- test_cover

View File

@ -1,12 +1,11 @@
name: gaia # you probably want to 'snapcraft register <name>'
# base: core18 # the base snap is the execution environment for this snap
version: '@VERSION@' # just for humans, typically '1.2+git' or '1.3.2'
name: gaia
version: git
summary: Gaia Daemon # 79 char long summary
description: |
This snap provides the Gaia daemon gaiad and the command line
tool gaiacli.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
confinement: strict
apps:
gaiad:
@ -24,17 +23,12 @@ parts:
rootdir=$(pwd)
gitroot=$(git rev-parse --show-toplevel)
cd ${gitroot} && git archive \
-o ${rootdir}/gaia-@VERSION@.tar.gz \
--format tar.gz -9 --prefix gaia-@VERSION@/ HEAD
-o ${rootdir}/gaia-git.tar.gz \
--format tar.gz -9 --prefix gaia-git/ HEAD
cd ${rootdir}
tar xf gaia-@VERSION@.tar.gz ; rm -f gaia-@VERSION@.tar.gz
tar xf gaia-git.tar.gz ; rm -f gaia-git.tar.gz
mkdir -p go/src/github.com/cosmos bin
mv gaia-@VERSION@/ go/src/github.com/cosmos/cosmos-sdk/
# Use the following instructions to build a package from a release.
# wget https://github.com/cosmos/cosmos-sdk/archive/v@VERSION@.tar.gz
# tar xvf v@VERSION@.tar.gz
# rm v@VERSION@.tar.gz
mv gaia-git/ go/src/github.com/cosmos/cosmos-sdk/
build-snaps: [go]
override-build: |