Skip to content

Commit 048a0e7

Browse files
committed
REMOVE ME: comment out other testnet services and trigger on current branch
1 parent 8bcf544 commit 048a0e7

File tree

1 file changed

+122
-121
lines changed

1 file changed

+122
-121
lines changed

.github/workflows/testnet_deploy_services.yml

Lines changed: 122 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -4,129 +4,130 @@ on:
44
push:
55
branches:
66
- main
7+
- gorka/build-deploy-resource-provider
78

89
jobs:
9-
solver-build-deploy:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v4
14-
with:
15-
context: app
16-
17-
- name: Configure AWS Credentials
18-
uses: aws-actions/configure-aws-credentials@v1
19-
with:
20-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
21-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22-
aws-region: us-east-1
23-
24-
- name: Login to Amazon ECR
25-
id: login-ecr
26-
uses: aws-actions/amazon-ecr-login@v1
27-
with:
28-
mask-password: 'true'
29-
30-
- name: Solver build, tag, and push image to Amazon ECR
31-
id: build-image
32-
env:
33-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
34-
ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }}
35-
run: |
36-
docker build \
37-
-t $ECR_REPOSITORY_SOLVER \
38-
-f ./docker/solver/Dockerfile \
39-
--build-arg="expose_via=cloudflare" \
40-
--build-arg="network=testnet" \
41-
.
42-
docker tag $ECR_REPOSITORY_SOLVER:latest $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
43-
docker push $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
44-
45-
- name: Solver deploy to EC2 instance
46-
uses: appleboy/ssh-action@master
47-
env:
48-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
49-
ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }}
50-
TESTNET_DOPPLER_TOKEN_SOLVER: ${{ secrets.TESTNET_DOPPLER_TOKEN_SOLVER }}
51-
with:
52-
host: ${{ secrets.TESTNET_EC2_HOST_SOLVER }}
53-
username: ${{ secrets.TESTNET_EC2_USERNAME_SOLVER }}
54-
key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_SOLVER }}
55-
envs: ECR_REGISTRY, ECR_REPOSITORY_SOLVER, TESTNET_DOPPLER_TOKEN_SOLVER
56-
script_stop: true
57-
script: |
58-
docker stop solver || true
59-
docker rm solver || true
60-
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
61-
docker system prune -af
62-
docker pull $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
63-
docker run \
64-
-d \
65-
--restart always \
66-
--name solver \
67-
-e DOPPLER_TOKEN=$TESTNET_DOPPLER_TOKEN_SOLVER \
68-
$ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
69-
70-
job-creator-build-deploy:
71-
needs: [solver-build-deploy]
72-
runs-on: ubuntu-latest
73-
steps:
74-
- name: Checkout
75-
uses: actions/checkout@v4
76-
with:
77-
context: app
78-
79-
- name: Configure AWS Credentials
80-
uses: aws-actions/configure-aws-credentials@v1
81-
with:
82-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
83-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
84-
aws-region: us-east-1
85-
86-
- name: Login to Amazon ECR
87-
id: login-ecr
88-
uses: aws-actions/amazon-ecr-login@v1
89-
with:
90-
mask-password: 'true'
91-
92-
- name: Job creator build, tag, and push image to Amazon ECR
93-
id: build-image
94-
env:
95-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
96-
ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }}
97-
run: |
98-
docker build \
99-
-t $ECR_REPOSITORY_JOB_CREATOR \
100-
-f ./docker/job-creator/Dockerfile \
101-
--build-arg="network=testnet" \
102-
.
103-
docker tag $ECR_REPOSITORY_JOB_CREATOR:latest $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
104-
docker push $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
105-
106-
- name: Job creator deploy to EC2 instance
107-
uses: appleboy/ssh-action@master
108-
env:
109-
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
110-
ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }}
111-
TESTNET_DOPPLER_TOKEN_JOB_CREATOR: ${{ secrets.TESTNET_DOPPLER_TOKEN_JOB_CREATOR }}
112-
with:
113-
host: ${{ secrets.TESTNET_EC2_HOST_JOB_CREATOR }}
114-
username: ${{ secrets.TESTNET_EC2_USERNAME_JOB_CREATOR }}
115-
key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_JOB_CREATOR }}
116-
envs: ECR_REGISTRY, ECR_REPOSITORY_JOB_CREATOR, TESTNET_DOPPLER_TOKEN_JOB_CREATOR
117-
script_stop: true
118-
script: |
119-
docker stop job-creator || true
120-
docker rm job-creator || true
121-
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
122-
docker system prune -af
123-
docker pull $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
124-
docker run \
125-
-d \
126-
--restart always \
127-
--name job-creator \
128-
-e DOPPLER_TOKEN=$TESTNET_DOPPLER_TOKEN_JOB_CREATOR \
129-
$ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
10+
# solver-build-deploy:
11+
# runs-on: ubuntu-latest
12+
# steps:
13+
# - name: Checkout
14+
# uses: actions/checkout@v4
15+
# with:
16+
# context: app
17+
18+
# - name: Configure AWS Credentials
19+
# uses: aws-actions/configure-aws-credentials@v1
20+
# with:
21+
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
22+
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23+
# aws-region: us-east-1
24+
25+
# - name: Login to Amazon ECR
26+
# id: login-ecr
27+
# uses: aws-actions/amazon-ecr-login@v1
28+
# with:
29+
# mask-password: 'true'
30+
31+
# - name: Solver build, tag, and push image to Amazon ECR
32+
# id: build-image
33+
# env:
34+
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
35+
# ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }}
36+
# run: |
37+
# docker build \
38+
# -t $ECR_REPOSITORY_SOLVER \
39+
# -f ./docker/solver/Dockerfile \
40+
# --build-arg="expose_via=cloudflare" \
41+
# --build-arg="network=testnet" \
42+
# .
43+
# docker tag $ECR_REPOSITORY_SOLVER:latest $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
44+
# docker push $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
45+
46+
# - name: Solver deploy to EC2 instance
47+
# uses: appleboy/ssh-action@master
48+
# env:
49+
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
50+
# ECR_REPOSITORY_SOLVER: ${{ secrets.ECR_REPOSITORY_SOLVER }}
51+
# TESTNET_DOPPLER_TOKEN_SOLVER: ${{ secrets.TESTNET_DOPPLER_TOKEN_SOLVER }}
52+
# with:
53+
# host: ${{ secrets.TESTNET_EC2_HOST_SOLVER }}
54+
# username: ${{ secrets.TESTNET_EC2_USERNAME_SOLVER }}
55+
# key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_SOLVER }}
56+
# envs: ECR_REGISTRY, ECR_REPOSITORY_SOLVER, TESTNET_DOPPLER_TOKEN_SOLVER
57+
# script_stop: true
58+
# script: |
59+
# docker stop solver || true
60+
# docker rm solver || true
61+
# aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
62+
# docker system prune -af
63+
# docker pull $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
64+
# docker run \
65+
# -d \
66+
# --restart always \
67+
# --name solver \
68+
# -e DOPPLER_TOKEN=$TESTNET_DOPPLER_TOKEN_SOLVER \
69+
# $ECR_REGISTRY/$ECR_REPOSITORY_SOLVER:latest
70+
71+
# job-creator-build-deploy:
72+
# needs: [solver-build-deploy]
73+
# runs-on: ubuntu-latest
74+
# steps:
75+
# - name: Checkout
76+
# uses: actions/checkout@v4
77+
# with:
78+
# context: app
79+
80+
# - name: Configure AWS Credentials
81+
# uses: aws-actions/configure-aws-credentials@v1
82+
# with:
83+
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
84+
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
85+
# aws-region: us-east-1
86+
87+
# - name: Login to Amazon ECR
88+
# id: login-ecr
89+
# uses: aws-actions/amazon-ecr-login@v1
90+
# with:
91+
# mask-password: 'true'
92+
93+
# - name: Job creator build, tag, and push image to Amazon ECR
94+
# id: build-image
95+
# env:
96+
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
97+
# ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }}
98+
# run: |
99+
# docker build \
100+
# -t $ECR_REPOSITORY_JOB_CREATOR \
101+
# -f ./docker/job-creator/Dockerfile \
102+
# --build-arg="network=testnet" \
103+
# .
104+
# docker tag $ECR_REPOSITORY_JOB_CREATOR:latest $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
105+
# docker push $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
106+
107+
# - name: Job creator deploy to EC2 instance
108+
# uses: appleboy/ssh-action@master
109+
# env:
110+
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
111+
# ECR_REPOSITORY_JOB_CREATOR: ${{ secrets.ECR_REPOSITORY_JOB_CREATOR }}
112+
# TESTNET_DOPPLER_TOKEN_JOB_CREATOR: ${{ secrets.TESTNET_DOPPLER_TOKEN_JOB_CREATOR }}
113+
# with:
114+
# host: ${{ secrets.TESTNET_EC2_HOST_JOB_CREATOR }}
115+
# username: ${{ secrets.TESTNET_EC2_USERNAME_JOB_CREATOR }}
116+
# key: ${{ secrets.TESTNET_EC2_PRIVATE_KEY_JOB_CREATOR }}
117+
# envs: ECR_REGISTRY, ECR_REPOSITORY_JOB_CREATOR, TESTNET_DOPPLER_TOKEN_JOB_CREATOR
118+
# script_stop: true
119+
# script: |
120+
# docker stop job-creator || true
121+
# docker rm job-creator || true
122+
# aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $ECR_REGISTRY
123+
# docker system prune -af
124+
# docker pull $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
125+
# docker run \
126+
# -d \
127+
# --restart always \
128+
# --name job-creator \
129+
# -e DOPPLER_TOKEN=$TESTNET_DOPPLER_TOKEN_JOB_CREATOR \
130+
# $ECR_REGISTRY/$ECR_REPOSITORY_JOB_CREATOR:latest
130131

131132
resource-provider-build-deploy:
132133
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)