mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 16:37:31 +00:00
build custom cypress image
This commit is contained in:
3
.github/workflows/e2e.yml
vendored
3
.github/workflows/e2e.yml
vendored
@@ -34,6 +34,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
driver: docker
|
driver: docker
|
||||||
install: true
|
install: true
|
||||||
|
- name: Build e2e image
|
||||||
|
run: docker compose build
|
||||||
|
working-directory: e2e
|
||||||
- name: Test ${{ matrix.browser }}
|
- name: Test ${{ matrix.browser }}
|
||||||
run: docker compose run e2e --browser ${{ matrix.browser }}
|
run: docker compose run e2e --browser ${{ matrix.browser }}
|
||||||
working-directory: e2e
|
working-directory: e2e
|
||||||
|
3
.github/workflows/test-code.yml
vendored
3
.github/workflows/test-code.yml
vendored
@@ -37,6 +37,9 @@ jobs:
|
|||||||
# As goreleaser doesn't build a dockerfile in snapshot mode, we have to build it here
|
# As goreleaser doesn't build a dockerfile in snapshot mode, we have to build it here
|
||||||
- name: Build Docker Image
|
- name: Build Docker Image
|
||||||
run: docker build -t zitadel:pr --file build/Dockerfile .artifacts/zitadel
|
run: docker build -t zitadel:pr --file build/Dockerfile .artifacts/zitadel
|
||||||
|
- name: Build e2e image
|
||||||
|
run: docker compose build
|
||||||
|
working-directory: e2e
|
||||||
- name: Run E2E Tests
|
- name: Run E2E Tests
|
||||||
run: docker compose run e2e
|
run: docker compose run e2e
|
||||||
working-directory: e2e
|
working-directory: e2e
|
||||||
|
@@ -158,6 +158,9 @@ goreleaser build --id prod --snapshot --single-target --rm-dist --output .artifa
|
|||||||
# Pack the binary into a docker image
|
# Pack the binary into a docker image
|
||||||
DOCKER_BUILDKIT=1 docker build --file build/Dockerfile .artifacts/zitadel -t zitadel:local
|
DOCKER_BUILDKIT=1 docker build --file build/Dockerfile .artifacts/zitadel -t zitadel:local
|
||||||
|
|
||||||
|
# Build the e2e image
|
||||||
|
docker compose --file ./e2e/docker-compose.yaml build
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
ZITADEL_IMAGE=zitadel:local docker compose --file ./e2e/docker-compose.yaml run e2e
|
ZITADEL_IMAGE=zitadel:local docker compose --file ./e2e/docker-compose.yaml run e2e
|
||||||
```
|
```
|
||||||
@@ -210,7 +213,7 @@ You can now run a local development server with live code reloading at http://lo
|
|||||||
To allow console access via http://localhost:4200, you have to configure the ZITADEL backend.
|
To allow console access via http://localhost:4200, you have to configure the ZITADEL backend.
|
||||||
|
|
||||||
1. Navigate to http://localhost:8080/ui/console/projects.
|
1. Navigate to http://localhost:8080/ui/console/projects.
|
||||||
2. When prompted, login with *zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost* and *Password1!*.
|
2. When prompted, login with *zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost* and *Password1!*
|
||||||
3. Select the *ZITADEL* project.
|
3. Select the *ZITADEL* project.
|
||||||
3. Select the *Console* application.
|
3. Select the *Console* application.
|
||||||
4. Select *Redirect Settings*
|
4. Select *Redirect Settings*
|
||||||
|
10
e2e/Dockerfile
Normal file
10
e2e/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
FROM cypress/included:10.3.0
|
||||||
|
|
||||||
|
WORKDIR dependencies
|
||||||
|
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci --omit=dev
|
||||||
|
|
||||||
|
ENTRYPOINT [ "bash", "-c" ]
|
||||||
|
|
||||||
|
CMD [ "cp -R /dependencies/node_modules/ . && cypress run --help" ]
|
@@ -33,25 +33,15 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- zitadel
|
- zitadel
|
||||||
|
|
||||||
npm-install:
|
|
||||||
image: node:18-alpine3.15
|
|
||||||
working_dir: /e2e
|
|
||||||
user: "$UID"
|
|
||||||
volumes:
|
|
||||||
- .:/e2e
|
|
||||||
command: "npm ci --omit=dev"
|
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
image: cypress/included:10.3.0
|
build:
|
||||||
|
context: .
|
||||||
depends_on:
|
depends_on:
|
||||||
zitadel:
|
zitadel:
|
||||||
condition: 'service_started'
|
condition: 'service_started'
|
||||||
db:
|
db:
|
||||||
condition: 'service_healthy'
|
condition: 'service_healthy'
|
||||||
npm-install:
|
|
||||||
condition: 'service_completed_successfully'
|
|
||||||
working_dir: /e2e
|
working_dir: /e2e
|
||||||
user: "$UID"
|
|
||||||
volumes:
|
volumes:
|
||||||
- .:/e2e
|
- .:/e2e
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
Reference in New Issue
Block a user