Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Deploy indra-2.3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Henderson committed Dec 24, 2019
2 parents ce8855b + 1c7193d commit 6945c9b
Show file tree
Hide file tree
Showing 39 changed files with 2,173 additions and 781 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.makeflags
.node-gyp
.npm
counterfactual
modules/**/.cache
modules/**/.config
modules/**/.git
Expand Down
151 changes: 151 additions & 0 deletions .github/workflows/cd-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: CD Master

on:
push:
branches:
- master

jobs:
build:
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: .npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- run: make pull
- run: make release
- run: make build-report
- run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run: make push-commit

test-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make node
- run: make test-node

test-cf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make cf-core
- run: make test-cf

test-ssh:
env:
RINKEBY_DOMAINNAME: rinkeby.indra.connext.network
MAINNET_DOMAINNAME: indra.connext.network
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: test connection to rinkeby
uses: ./ops/ssh-action/
with:
HOST: ubuntu@${{ env.RINKEBY_DOMAINNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: "echo Successfully connected to $RINKEBY_DOMAINNAME: `hostname`;"
- name: test connection to mainnet
uses: ./ops/ssh-action/
with:
HOST: ubuntu@${{ env.MAINNET_DOMAINNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: "echo Successfully connected to $MAINNET_DOMAINNAME: `hostname`;"

test-bot:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-bot

test-bot-farm:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-bot-farm

test-daicard:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-daicard

push:
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
needs: [test-node, test-cf, test-bot, test-bot-farm, test-daicard]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run: make pull
- run: make push-release

deploy-rinkeby:
env:
INDRA_ADMIN_TOKEN: ${{ secrets.INDRA_ADMIN_TOKEN }}
RINKEBY_DOMAINNAME: rinkeby.indra.connext.network
RINKEBY_ETH_PROVIDER: ${{ secrets.RINKEBY_ETH_PROVIDER }}
needs: [push, test-ssh]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: deploy to rinkeby
uses: ./ops/ssh-action/
with:
HOST: ubuntu@${{ env.RINKEBY_DOMAINNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: "
git checkout --force master;
git reset --hard $GITHUB_SHA;
export INDRA_MODE=release;
export INDRA_ETH_PROVIDER=$RINKEBY_ETH_PROVIDER;
export INDRA_DOMAINNAME=$RINKEBY_DOMAINNAME;
export INDRA_ADMIN_TOKEN=$INDRA_ADMIN_TOKEN;
make restart-prod;
docker container prune -f;
docker image ls -q | xargs docker image rm || true;
"

deploy-mainnet:
env:
INDRA_ADMIN_TOKEN: ${{ secrets.INDRA_ADMIN_TOKEN }}
MAINNET_DOMAINNAME: indra.connext.network
MAINNET_ETH_PROVIDER: ${{ secrets.MAINNET_ETH_PROVIDER }}
needs: [push, test-ssh]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: deploy to prod (mainnet)
uses: ./ops/ssh-action/
with:
HOST: ubuntu@${{ env.MAINNET_DOMAINNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: "
git checkout --force master;
git reset --hard $GITHUB_SHA;
export INDRA_MODE=release;
export INDRA_ETH_PROVIDER=$MAINNET_ETH_PROVIDER;
export INDRA_DOMAINNAME=$MAINNET_DOMAINNAME;
export INDRA_ADMIN_TOKEN=$INDRA_ADMIN_TOKEN;
make restart-prod;
docker container prune -f;
docker image ls -q | xargs docker image rm || true;
"
104 changes: 104 additions & 0 deletions .github/workflows/cd-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: CD Staging

on:
push:
branches:
- staging

jobs:
build:
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: .npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- run: make pull
- run: make staging
- run: make build-report
- run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run: make push-commit

test-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make node
- run: make test-node

test-cf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make cf-core
- run: make test-cf

test-ssh:
env:
STAGING_DOMAINNAME: staging.indra.connext.network
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: test connection to staging
uses: ./ops/ssh-action/
with:
HOST: ubuntu@${{ env.STAGING_DOMAINNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: "echo Successfully connected to $STAGING_DOMAINNAME: `hostname`;"

test-bot:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-bot

test-bot-farm:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-bot-farm

test-daicard:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-daicard

deploy-staging:
env:
RINKEBY_ETH_PROVIDER: ${{ secrets.RINKEBY_ETH_PROVIDER }}
STAGING_DOMAINNAME: staging.indra.connext.network
needs: [test-node, test-cf, test-bot, test-bot-farm, test-daicard, test-ssh]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: deploy to staging
uses: ./ops/ssh-action/
with:
HOST: ubuntu@${{ env.STAGING_DOMAINNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
CMD: "
git checkout --force staging;
git reset --hard $GITHUB_SHA;
export INDRA_MODE=staging;
export INDRA_ETH_PROVIDER=$RINKEBY_ETH_PROVIDER;
export INDRA_DOMAINNAME=$STAGING_DOMAINNAME;
make restart-prod;
docker container prune -f;
docker image ls -q | xargs docker image rm || true;
"
68 changes: 68 additions & 0 deletions .github/workflows/cd-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CD Tests

on:
push:
branches-ignore:
- master
- staging

jobs:
build:
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: .npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- run: make pull
- run: make staging
- run: make build-report
- run: docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- run: make push-commit

test-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make node
- run: make test-node

test-cf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: make cf-core
- run: make test-cf

test-bot:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-bot

test-bot-farm:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-bot-farm

test-daicard:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v1
- run: make pull
- run: make start-test
- run: make test-daicard
Loading

0 comments on commit 6945c9b

Please sign in to comment.