Skip to content

Commit 3a076c0

Browse files
Test/CV2-6381: Check ci is failing (#105)
## Description: - [x] Improved Submodule Checkout to avoid conflict when switching branches - [x] Added git pull command to ensure the submodules are always synchronized with the latest changes from their remote repositories on CI step and on `first build` script - [x] Updated Test File: Commented out the presto images and updated the test file to reflect this change. Reference: CV2-6381
1 parent bddcebd commit 3a076c0

File tree

5 files changed

+64
-65
lines changed

5 files changed

+64
-65
lines changed

.github/workflows/ci-test.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,21 @@ jobs:
3232

3333
- name: Set up Docker Buildx
3434
uses: docker/setup-buildx-action@v3
35-
35+
3636
- name: Before script
3737
env:
3838
GITHUB_BRANCH: ${{ github.head_ref || github.ref_name }}
3939
GITHUB_JOB_NAME: ${{ github.job }}
4040
run: |
4141
sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
42+
git submodule foreach --recursive bash -c 'git checkout .'
43+
git submodule sync
4244
git submodule update --init --recursive
4345
sed -i '/git submodule/d' bin/first-build.sh
4446
sed -i 's/--abort-on-container-exit/-d/' bin/first-build.sh
4547
TAB=$'\t'
4648
export FALLBACK_BRANCH=$([ "$GITHUB_BRANCH" == "master" ] && echo "main" && echo "master" || echo "develop")
47-
git submodule foreach 'bash -c "git checkout master ; git checkout develop ; git checkout $FALLBACK_BRANCH ; git checkout $GITHUB_BRANCH ; exit 0"'
49+
git submodule foreach bash -c '(git checkout "${GITHUB_BRANCH}" || git checkout main || git checkout develop || git checkout master || git checkout "${FALLBACK_BRANCH}") && git pull'
4850
git submodule foreach git rev-parse --abbrev-ref HEAD
4951
5052
- name: Run Script

bin/first-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Go to the develop branch of each repository
4-
git submodule foreach bash -c 'git checkout develop || git checkout master'
4+
git submodule foreach bash -c '(git checkout develop || git checkout master || git checkout main) && git pull'
55

66
# Copy the example files
77
find . -name '*.example' -not -path '*apollo*' | while read f; do cp "$f" "${f%%.example}"; done

docker-compose.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -217,53 +217,53 @@ services:
217217
depends_on:
218218
elasticmq:
219219
condition: service_healthy
220-
presto-image:
221-
build: presto
222-
platform: linux/amd64
223-
volumes:
224-
- "./presto:/app"
225-
env_file:
226-
- presto/.env_file
227-
environment:
228-
ROLE: worker
229-
MODEL_NAME: image.Model
230-
networks:
231-
- dev
232-
depends_on:
233-
elasticmq:
234-
condition: service_healthy
235-
presto-audio:
236-
build: presto
237-
platform: linux/amd64
238-
volumes:
239-
- "./presto:/app"
240-
env_file:
241-
- presto/.env_file
242-
environment:
243-
ROLE: worker
244-
MODEL_NAME: audio.Model
245-
networks:
246-
- dev
247-
depends_on:
248-
elasticmq:
249-
condition: service_healthy
250-
presto-video:
251-
build: presto
252-
platform: linux/amd64
253-
volumes:
254-
- "./presto:/app"
255-
env_file:
256-
- presto/.env_file
257-
environment:
258-
ROLE: worker
259-
MODEL_NAME: video.Model
260-
networks:
261-
- dev
262-
depends_on:
263-
elasticmq:
264-
condition: service_healthy
265-
minio:
266-
condition: service_healthy
220+
# presto-image:
221+
# build: presto
222+
# platform: linux/amd64
223+
# volumes:
224+
# - "./presto:/app"
225+
# env_file:
226+
# - presto/.env_file
227+
# environment:
228+
# ROLE: worker
229+
# MODEL_NAME: image.Model
230+
# networks:
231+
# - dev
232+
# depends_on:
233+
# elasticmq:
234+
# condition: service_healthy
235+
# presto-audio:
236+
# build: presto
237+
# platform: linux/amd64
238+
# volumes:
239+
# - "./presto:/app"
240+
# env_file:
241+
# - presto/.env_file
242+
# environment:
243+
# ROLE: worker
244+
# MODEL_NAME: audio.Model
245+
# networks:
246+
# - dev
247+
# depends_on:
248+
# elasticmq:
249+
# condition: service_healthy
250+
# presto-video:
251+
# build: presto
252+
# platform: linux/amd64
253+
# volumes:
254+
# - "./presto:/app"
255+
# env_file:
256+
# - presto/.env_file
257+
# environment:
258+
# ROLE: worker
259+
# MODEL_NAME: video.Model
260+
# networks:
261+
# - dev
262+
# depends_on:
263+
# elasticmq:
264+
# condition: service_healthy
265+
# minio:
266+
# condition: service_healthy
267267
# presto-mean-tokens:
268268
# build: presto
269269
# platform: linux/amd64
@@ -307,9 +307,9 @@ services:
307307
- redis
308308
- elasticsearch
309309
- presto-server
310-
- presto-image
311-
- presto-audio
312-
- presto-video
310+
# - presto-image
311+
# - presto-audio
312+
# - presto-video
313313
env_file:
314314
- alegre/.env_file
315315
networks:

docker-test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ services:
5757
BOILERPLATE_ENV: test
5858
PRESTO_PORT: 8000
5959
REDIS_DATABASE: 3
60-
presto-audio:
61-
environment:
62-
BOILERPLATE_ENV: test
63-
presto-image:
64-
environment:
65-
BOILERPLATE_ENV: test
66-
presto-video:
67-
environment:
68-
BOILERPLATE_ENV: test
60+
# presto-audio:
61+
# environment:
62+
# BOILERPLATE_ENV: test
63+
# presto-image:
64+
# environment:
65+
# BOILERPLATE_ENV: test
66+
# presto-video:
67+
# environment:
68+
# BOILERPLATE_ENV: test
6969
# presto-mean-tokens:
7070
# environment:
7171
# BOILERPLATE_ENV: test

test/image_names.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ check-narcissus
88
check-pender
99
check-pender-background
1010
check-postgres
11-
check-presto-audio
12-
check-presto-image
1311
check-presto-server
14-
check-presto-video
1512
check-queue_worker
1613
check-web
1714
docker.elastic.co/kibana/kibana:7.9.2

0 commit comments

Comments
 (0)