11
11
- " release/**"
12
12
13
13
env :
14
- # AWS ECR Configuration. Use us-west-2 since blacksmith's instances are located there.
15
- # This allows for faster image writes/pulls due to colocation.
16
- AWS_REGION : ${{ secrets.AWS_REGION || 'us-west-2' }}
17
- ECR_REGISTRY : ${{ secrets.ECR_REGISTRY }} # e.g., 123456789012.dkr.ecr.us-east-2.amazonaws.com
18
- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID_ECR }}
19
- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY_ECR }}
14
+ # Private Registry Configuration
15
+ PRIVATE_REGISTRY : experimental-registry.blacksmith.sh:5000
16
+ PRIVATE_REGISTRY_USERNAME : ${{ secrets.PRIVATE_REGISTRY_USERNAME }}
17
+ PRIVATE_REGISTRY_PASSWORD : ${{ secrets.PRIVATE_REGISTRY_PASSWORD }}
20
18
21
19
# Test Environment Variables
22
20
OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
@@ -114,16 +112,12 @@ jobs:
114
112
- name : Checkout code
115
113
uses : actions/checkout@v4
116
114
117
- - name : Configure AWS credentials
118
- uses : aws-actions/configure-aws-credentials@v4
115
+ - name : Login to Private Registry
116
+ uses : docker/login-action@v3
119
117
with :
120
- aws-access-key-id : ${{ env.AWS_ACCESS_KEY_ID }}
121
- aws-secret-access-key : ${{ env.AWS_SECRET_ACCESS_KEY }}
122
- aws-region : ${{ env.AWS_REGION }}
123
-
124
- - name : Login to Amazon ECR
125
- id : login-ecr
126
- uses : aws-actions/amazon-ecr-login@v2
118
+ registry : ${{ env.PRIVATE_REGISTRY }}
119
+ username : ${{ env.PRIVATE_REGISTRY_USERNAME }}
120
+ password : ${{ env.PRIVATE_REGISTRY_PASSWORD }}
127
121
128
122
- name : Set up Docker Buildx
129
123
uses : useblacksmith/setup-docker-builder@v1
@@ -134,7 +128,7 @@ jobs:
134
128
context : ./backend
135
129
file : ./backend/Dockerfile
136
130
platforms : linux/arm64
137
- tags : ${{ env.ECR_REGISTRY }}/integration-test-onyx-backend:test-${{ github.run_id }}
131
+ tags : ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-backend:test-${{ github.run_id }}
138
132
push : true
139
133
140
134
build-model-server-image :
@@ -143,16 +137,12 @@ jobs:
143
137
- name : Checkout code
144
138
uses : actions/checkout@v4
145
139
146
- - name : Configure AWS credentials
147
- uses : aws-actions/configure-aws-credentials@v4
140
+ - name : Login to Private Registry
141
+ uses : docker/login-action@v3
148
142
with :
149
- aws-access-key-id : ${{ env.AWS_ACCESS_KEY_ID }}
150
- aws-secret-access-key : ${{ env.AWS_SECRET_ACCESS_KEY }}
151
- aws-region : ${{ env.AWS_REGION }}
152
-
153
- - name : Login to Amazon ECR
154
- id : login-ecr
155
- uses : aws-actions/amazon-ecr-login@v2
143
+ registry : ${{ env.PRIVATE_REGISTRY }}
144
+ username : ${{ env.PRIVATE_REGISTRY_USERNAME }}
145
+ password : ${{ env.PRIVATE_REGISTRY_PASSWORD }}
156
146
157
147
- name : Set up Docker Buildx
158
148
uses : useblacksmith/setup-docker-builder@v1
@@ -163,7 +153,7 @@ jobs:
163
153
context : ./backend
164
154
file : ./backend/Dockerfile.model_server
165
155
platforms : linux/arm64
166
- tags : ${{ env.ECR_REGISTRY }}/integration-test-onyx-model-server:test-${{ github.run_id }}
156
+ tags : ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-model-server:test-${{ github.run_id }}
167
157
push : true
168
158
outputs : type=registry
169
159
provenance : false
@@ -175,16 +165,12 @@ jobs:
175
165
- name : Checkout code
176
166
uses : actions/checkout@v4
177
167
178
- - name : Configure AWS credentials
179
- uses : aws-actions/configure-aws-credentials@v4
168
+ - name : Login to Private Registry
169
+ uses : docker/login-action@v3
180
170
with :
181
- aws-access-key-id : ${{ env.AWS_ACCESS_KEY_ID }}
182
- aws-secret-access-key : ${{ env.AWS_SECRET_ACCESS_KEY }}
183
- aws-region : ${{ env.AWS_REGION }}
184
-
185
- - name : Login to Amazon ECR
186
- id : login-ecr
187
- uses : aws-actions/amazon-ecr-login@v2
171
+ registry : ${{ env.PRIVATE_REGISTRY }}
172
+ username : ${{ env.PRIVATE_REGISTRY_USERNAME }}
173
+ password : ${{ env.PRIVATE_REGISTRY_PASSWORD }}
188
174
189
175
- name : Download OpenAPI artifacts
190
176
uses : actions/download-artifact@v4
@@ -201,7 +187,7 @@ jobs:
201
187
context : ./backend
202
188
file : ./backend/tests/integration/Dockerfile
203
189
platforms : linux/arm64
204
- tags : ${{ env.ECR_REGISTRY }}/integration-test-onyx-integration:test-${{ github.run_id }}
190
+ tags : ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-integration:test-${{ github.run_id }}
205
191
push : true
206
192
207
193
integration-tests-mit :
@@ -224,16 +210,12 @@ jobs:
224
210
- name : Checkout code
225
211
uses : actions/checkout@v4
226
212
227
- - name : Configure AWS credentials
228
- uses : aws-actions/configure-aws-credentials@v4
213
+ - name : Login to Private Registry
214
+ uses : docker/login-action@v3
229
215
with :
230
- aws-access-key-id : ${{ env.AWS_ACCESS_KEY_ID }}
231
- aws-secret-access-key : ${{ env.AWS_SECRET_ACCESS_KEY }}
232
- aws-region : ${{ env.AWS_REGION }}
233
-
234
- - name : Login to Amazon ECR
235
- id : login-ecr
236
- uses : aws-actions/amazon-ecr-login@v2
216
+ registry : ${{ env.PRIVATE_REGISTRY }}
217
+ username : ${{ env.PRIVATE_REGISTRY_USERNAME }}
218
+ password : ${{ env.PRIVATE_REGISTRY_PASSWORD }}
237
219
238
220
# needed for pulling Vespa, Redis, Postgres, and Minio images
239
221
# otherwise, we hit the "Unauthenticated users" limit
@@ -248,19 +230,19 @@ jobs:
248
230
run : |
249
231
# Pull all images from registry in parallel
250
232
echo "Pulling Docker images in parallel..."
251
- # Other images from ECR
252
- (docker pull ${{ env.ECR_REGISTRY }}/integration-test-onyx-backend:test-${{ github.run_id }}) &
253
- (docker pull ${{ env.ECR_REGISTRY }}/integration-test-onyx-model-server:test-${{ github.run_id }}) &
254
- (docker pull ${{ env.ECR_REGISTRY }}/integration-test-onyx-integration:test-${{ github.run_id }}) &
233
+ # Pull images from private registry
234
+ (docker pull ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-backend:test-${{ github.run_id }}) &
235
+ (docker pull ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-model-server:test-${{ github.run_id }}) &
236
+ (docker pull ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-integration:test-${{ github.run_id }}) &
255
237
256
238
# Wait for all background jobs to complete
257
239
wait
258
240
echo "All Docker images pulled successfully"
259
241
260
- # Re-tag with expected names for docker-compose
261
- docker tag ${{ env.ECR_REGISTRY }}/integration-test-onyx-backend:test-${{ github.run_id }} onyxdotapp/onyx-backend:test
262
- docker tag ${{ env.ECR_REGISTRY }}/integration-test-onyx-model-server:test-${{ github.run_id }} onyxdotapp/onyx-model-server:test
263
- docker tag ${{ env.ECR_REGISTRY }}/integration-test-onyx-integration:test-${{ github.run_id }} onyxdotapp/onyx-integration:test
242
+ # Re-tag to remove registry prefix for docker-compose
243
+ docker tag ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-backend:test-${{ github.run_id }} onyxdotapp/onyx-backend:test
244
+ docker tag ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-model-server:test-${{ github.run_id }} onyxdotapp/onyx-model-server:test
245
+ docker tag ${{ env.PRIVATE_REGISTRY }}/integration-test-onyx-integration:test-${{ github.run_id }} onyxdotapp/onyx-integration:test
264
246
265
247
# NOTE: Use pre-ping/null pool to reduce flakiness due to dropped connections
266
248
# NOTE: don't need web server for integration tests
0 commit comments