This repository has been archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
2,173 additions
and
781 deletions.
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
.makeflags | ||
.node-gyp | ||
.npm | ||
counterfactual | ||
modules/**/.cache | ||
modules/**/.config | ||
modules/**/.git | ||
|
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,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; | ||
" |
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,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; | ||
" |
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,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 |
Oops, something went wrong.