Skip to content

Commit 0623b22

Browse files
committed
Fix Docker build context in CI to ensure e2ebase image is available for dependent builds. Remove unnecessary venv setup.
1 parent c207208 commit 0623b22

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/e2e.yaml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,9 @@ jobs:
2727
cache: npm
2828
cache-dependency-path: test/e2e/package-lock.json
2929

30-
- name: Create Python venv and install dependencies
30+
- name: Install Python dependencies
3131
working-directory: test/e2e
32-
run: |
33-
python -m venv .venv
34-
source .venv/bin/activate
35-
pip install -r requirements.txt
36-
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
37-
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
32+
run: pip install -r requirements.txt
3833

3934
- name: Install npm dependencies
4035
working-directory: test/e2e
@@ -47,16 +42,31 @@ jobs:
4742

4843
- name: Build Docker images
4944
run: |
50-
source test/e2e/.venv/bin/activate
45+
# Start a local registry
46+
docker run -d -p 5000:5000 --restart=always --name registry registry:2
47+
48+
# Change to test/e2e to build e2ebase
5149
cd test/e2e
52-
just build-images
50+
docker build -f Dockerfile.base --tag e2ebase --platform linux/amd64 .
51+
52+
# Tag with local registry and push
53+
docker tag e2ebase localhost:5000/e2ebase
54+
docker push localhost:5000/e2ebase
55+
56+
# Update Dockerfiles to use the local registry
57+
sed -i 's/FROM --platform=$BUILDPLATFORM e2ebase/FROM --platform=$BUILDPLATFORM localhost:5000\/e2ebase/' Dockerfile.connect
58+
sed -i 's/FROM --platform=$BUILDPLATFORM e2ebase/FROM --platform=$BUILDPLATFORM localhost:5000\/e2ebase/' Dockerfile.vscode
59+
60+
# Go back to repo root for docker compose build
61+
cd ../..
62+
docker compose -f test/e2e/docker-compose.yml build connect-publisher-e2e
63+
docker compose -f test/e2e/docker-compose.yml build code-server
5364
env:
5465
CONNECT_LICENSE: ${{ secrets.CONNECT_LICENSE }}
5566

5667
- name: Run Cypress tests
5768
working-directory: test/e2e
5869
run: |
59-
source .venv/bin/activate
6070
just start "connect-publisher-e2e"
6171
just start "code-server"
6272
npx cypress run
@@ -83,6 +93,4 @@ jobs:
8393
- name: Stop containers
8494
if: always()
8595
working-directory: test/e2e
86-
run: |
87-
source .venv/bin/activate
88-
just stop
96+
run: just stop

0 commit comments

Comments
 (0)