Skip to content

Commit 373271d

Browse files
authored
Merge pull request #343 from cardanoapi/feat/fix-cd
Remove dbsync-api, update CD config, remove agent-python
2 parents fa98833 + 6a5ac1e commit 373271d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+228
-8682
lines changed

.github/workflows/build-deploy.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches:
66
- master
77
- dev
8-
tags:
9-
- "*"
108

119
jobs:
1210
build_on_push:
@@ -18,7 +16,6 @@ jobs:
1816
- api
1917
- agent-node
2018
- frontend
21-
- dbsync-api
2219
steps:
2320
- name: Checkout repo
2421
uses: actions/checkout@v4
@@ -71,40 +68,43 @@ jobs:
7168
needs: build_on_push
7269
strategy:
7370
matrix:
74-
service:
75-
- agent-manager
76-
- api
77-
- frontend
78-
- dbsync-api
71+
network:
72+
- preview
73+
- preprod
7974
max-parallel: 1
80-
81-
runs-on: ubuntu-latest
75+
runs-on: builder
8276
env:
83-
SERVICE_NAME: ${{ matrix.service }}
8477
GITHUB_REPOSITORY: ${{ github.repository }}
8578

8679
steps:
87-
- name: Deploy built Image
88-
id: docker_deploy
89-
uses: appleboy/[email protected]
90-
with:
91-
host: ${{ secrets.BASTION_IPV4 }}
92-
username: ${{ secrets.BASTION_SSH_USER }}
93-
key: ${{ secrets.BASTION_SSH_KEY }}
94-
port: ${{ secrets.BASTION_SSH_PORT }}
95-
script: |
96-
SERVICE_NAME=$(echo ${{ matrix.service }})
97-
GITHUB_REPOSITORY="${{ github.repository }}"
98-
REPO_NAME="${GITHUB_REPOSITORY##*/}"
99-
IMAGE_NAME="${{ vars.DOCKER_REGISTRY_HOST }}/${{ vars.DOCKER_IMAGE_PREFIX }}/${REPO_NAME}-${SERVICE_NAME}"
100-
DEPLOY_TAG="${{ github.sha }}"
101-
102-
if [[ "${{ github.ref }}" == "refs/heads/dev" ]]; then
103-
DOCKER_HOST="${{ vars.DEV_HOST }}"
104-
DOCKER_STACK="${{ vars.DEV_STACK }}"
105-
elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
106-
DOCKER_HOST="${{ vars.PROD_HOST }}"
107-
DOCKER_STACK="${{ vars.PROD_STACK }}"
108-
fi
109-
echo docker --host "$DOCKER_HOST" service update --image $IMAGE_NAME:$DEPLOY_TAG ${DOCKER_STACK}_${SERVICE_NAME}
110-
docker --host "$DOCKER_HOST" service update --image $IMAGE_NAME:$DEPLOY_TAG ${DOCKER_STACK}_${SERVICE_NAME}
80+
- name: Checkout code
81+
uses: actions/checkout@v2
82+
83+
- name: Set up Python
84+
uses: actions/setup-python@v2
85+
with:
86+
python-version: '3.x'
87+
88+
- name: Install docker-stack
89+
run: pip install --upgrade docker-stack
90+
91+
- name: Log in to Docker Hub
92+
run: echo ${{ secrets.DOCKER_REGISTRY_SECRET }} | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} --password-stdin
93+
94+
- name: Deploy stack
95+
run: >
96+
docker-stack deploy --with-registry-auth drep_id_${{ matrix.network}} docker-compose-${{ matrix.network}}.yml
97+
working-directory: deploy
98+
env:
99+
NETWORK_NAME: ${{ matrix.network }}
100+
IMAGE_TAG: ${{ github.sha}} about 7 months ago
101+
AGENT_MNEMONIC: ${{ secrets.AGENT_MNEMONIC}}
102+
BLOCKFROST_API_KEY: ${{ secrets.BLOCKFROST_API_KEY}}
103+
ELASTIC_APM_SERVER_URL: ${{vars.ELASTIC_APM_SERVER_URL}}
104+
ELASTIC_APM_API_KEY: ${{ secrets.ELASTIC_APM_API_KEY}}
105+
MANAGER_WALLET_ADDRESS: ${{vars.MANAGER_WALLET_ADDRESS}}
106+
POSTGRES_USER: ${{vars.POSTGRES_USER}}
107+
POSTGRES_PASSWORD: ${{secrets.POSTGRES_PASSWORD}}
108+
POSTGRES_HOST: ${{vars.POSTGRES_HOST}}
109+
KUBER_API_KEY: ${{ secrets.KUBER_API_KEY}}
110+
MANAGER_WALLET_SIGNING_KEY: ${{ secrets.MANAGER_WALLET_SIGNING_KEY}}

agent-python/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

agent-python/CHANGELOG.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

agent-python/Dockerfile

Lines changed: 0 additions & 55 deletions
This file was deleted.

agent-python/README.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

agent-python/__init__.py

Whitespace-only changes.

agent-python/client/__init__.py

Whitespace-only changes.

agent-python/client/actions.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

agent-python/client/config_handler.py

Lines changed: 0 additions & 47 deletions
This file was deleted.

agent-python/client/connection_handler.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)