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

Github actions CD steps for plenum #1519

Merged
merged 3 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
45 changes: 44 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: indy-plenum-build
on: [ push, pull_request ]
on: [ push, pull_request, workflow_dispatch ]

jobs:

Expand Down Expand Up @@ -171,3 +171,46 @@ jobs:

- name: flake8
run: python3 -m flake8

build_plenum_release:
name: Indy Plenum Release
needs: [workflow-setup, indy_plenum, indy_plenum_tests, lint]
runs-on: ubuntu-20.04
container:
image: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/plenum-build
ianco marked this conversation as resolved.
Show resolved Hide resolved
strategy:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v1

- name: Install os dependencies
run: ./build-scripts/ubuntu-1604/install-os-dependencies.sh

- name: Install os tools
run: ./build-scripts/ubuntu-1604/install-os-tools.sh

- name: Build Indy Plenum deployment package
run: ./build-scripts/ubuntu-1604/build-indy-plenum.sh /__w/indy-plenum/indy-plenum 1.14.0 /tmp

- name: Build 3rd party deployment packages
run: ./build-scripts/ubuntu-1604/build-3rd-parties.sh

publish_plenum_rc:
name: Publish release candidate
runs-on: ubuntu-20.04
needs: ['build_plenum_release']
if: github.event_name == 'push' && (github.repository == 'hyperledger/indy-plenum' && github.ref == 'refs/heads/release*')
steps:
- name: pub
run: |
echo "publish rc"
publish_plenum_release:
name: Publish release
runs-on: ubuntu-20.04
needs: ['build_plenum_release']
if: github.event_name == 'push' && (github.repository == 'hyperledger/indy-plenum' && github.ref == 'refs/heads/master')
steps:
- name: pub
run: |
echo "publish release"
5 changes: 5 additions & 0 deletions build-scripts/ubuntu-1604/build-3rd-parties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ function build_from_pypi {

# TODO duplicates list from Jenkinsfile.cd

SCRIPT_PATH="${BASH_SOURCE[0]}"
pushd `dirname ${SCRIPT_PATH}` >/dev/null

# Build rocksdb at first
build_rocksdb_deb 5.8.8

Expand All @@ -105,3 +108,5 @@ build_from_pypi python-rocksdb 0.6.9
build_from_pypi pympler 0.8
build_from_pypi packaging 19.0
build_from_pypi python-ursa 0.1.1

popd >/dev/null
1 change: 1 addition & 0 deletions build-scripts/ubuntu-1604/build-indy-plenum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ PACKAGE_NAME=indy-plenum

# copy the sources to a temporary folder
TMP_DIR=$(mktemp -d)
shopt -s dotglob
cp -r ${INPUT_PATH}/. ${TMP_DIR}

# prepare the sources
Expand Down
23 changes: 23 additions & 0 deletions build-scripts/ubuntu-1604/install-os-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -xe

apt-get update -y && apt-get install -y \
apt-transport-https \
ca-certificates

apt-get update -y && apt-get install -y \
git \
wget \
unzip \
python3.5 \
python3-pip \
python3-venv \
ruby \
ruby-dev \
rubygems \
gcc \
make \
libbz2-dev \
zlib1g-dev \
liblz4-dev \
libsnappy-dev \
&& rm -rf /var/lib/apt/lists/*
4 changes: 4 additions & 0 deletions build-scripts/ubuntu-1604/install-os-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -xe

# install fpm
gem install --no-ri --no-rdoc rake fpm
7 changes: 7 additions & 0 deletions build-scripts/ubuntu-1604/upgrade-git.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -xe

apt-get install -y software-properties-common \
&& apt-get update \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y git