mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 10:47:37 +00:00
pipelin
This commit is contained in:
@@ -32,7 +32,7 @@ services:
|
||||
|
||||
zitadel:
|
||||
container_name: zitadel
|
||||
image: "${ZITADEL_TAG:-ghcr.io/zitadel/zitadel:v4.0.0-rc.2}"
|
||||
image: "${ZITADEL_TAG:-zitadel:local}"
|
||||
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --config /zitadel.yaml --steps /zitadel.yaml'
|
||||
volumes:
|
||||
- ../../apps/login/acceptance/pat:/pat:delegated
|
||||
@@ -56,7 +56,10 @@ services:
|
||||
|
||||
login-acceptance:
|
||||
container_name: login
|
||||
image: "${LOGIN_TAG:-ghcr.io/zitadel/zitadel-login:v4.0.0-rc.2}"
|
||||
image: "${LOGIN_TAG:-zitadel-login:local}"
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: build/login/Dockerfile
|
||||
network_mode: service:zitadel
|
||||
environment:
|
||||
NEXT_PUBLIC_BASE_PATH: /ui/v2/login
|
||||
|
@@ -19,7 +19,7 @@ services:
|
||||
image: "${LOGIN_TAG:-zitadel-login:local}"
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: build/login/Dockerfile
|
||||
dockerfile: build/login/Dockerfile
|
||||
env_file: ../../apps/login/.env.test
|
||||
network_mode: service:mock-zitadel
|
||||
|
||||
|
64
.github/workflows/login-acceptance-test.yml
vendored
Normal file
64
.github/workflows/login-acceptance-test.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Acceptance Test Login
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
login_build_image:
|
||||
required: true
|
||||
type: string
|
||||
zitadel_build_image:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
login-acceptance-test:
|
||||
name: login-acceptance-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Dev Container CLI
|
||||
run: npm install -g @devcontainers/cli@0.80.0
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Pull Login Build Image
|
||||
run: docker compose --file .devcontainer/login-acceptance/docker-compose.yaml pull
|
||||
env:
|
||||
LOGIN_TAG: ${{ inputs.login_build_image }}
|
||||
ZITADEL_TAG: ${{ inputs.zitadel_build_image }}
|
||||
- name: Run Integration Tests against the Login and a Mocked Zitadel API
|
||||
run: npm run devcontainer:acceptance:login
|
||||
env:
|
||||
LOGIN_TAG: ${{ inputs.login_build_image }}
|
||||
ZITADEL_TAG: ${{ inputs.zitadel_build_image }}
|
||||
DOCKER_BUILDKIT: 1
|
||||
- name: Fix Failures
|
||||
if: failure()
|
||||
run: |
|
||||
echo "Reproduce this check locally:"
|
||||
echo "LOGIN_TAG=${{ inputs.login_build_image }} ZITADEL_TAG=${{ inputs.login_build_image }} npm run devcontainer:acceptance:login"
|
||||
echo "To fix the failures, open the dev container called \"Login Acceptance\"."
|
||||
echo "You will have the same environment as the pipeline check as well as some guidance on how to fix the errors."
|
||||
- name: Show Compose Status
|
||||
if: failure()
|
||||
run: docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-acceptance/docker-compose.yaml ps
|
||||
- name: Print Config
|
||||
if: failure()
|
||||
run: COMPOSE_BAKE=1 docker compose --file .devcontainer/login-acceptance/docker-compose.yaml config login-acceptance
|
||||
env:
|
||||
LOGIN_TAG: ${{ inputs.login_build_image }}
|
||||
ZITADEL_TAG: ${{ inputs.zitadel_build_image }}
|
||||
- name: Show Container Logs
|
||||
if: failure()
|
||||
run: docker compose --file .devcontainer/login-acceptance/docker-compose.yaml logs --timestamps --no-color --tail 100 login-acceptance
|
||||
- name: Inspect All Failed Containers
|
||||
if: failure()
|
||||
run: |
|
||||
docker ps -a --filter "status=exited" --filter "status=created" --format "table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Image}}"
|
||||
for container in $(docker ps -a --filter "status=exited" --filter "status=created" -q); do
|
||||
echo "Inspecting container $container"
|
||||
docker inspect $container || true
|
||||
done
|
10
.github/workflows/login-integration-test.yml
vendored
10
.github/workflows/login-integration-test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Integration test core
|
||||
name: Integration Test Login
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
@@ -35,19 +35,19 @@ jobs:
|
||||
run: |
|
||||
echo "Reproduce this check locally:"
|
||||
echo "LOGIN_TAG=${{ inputs.login_build_image }} npm run devcontainer:integration:login"
|
||||
echo "To fix the failures, open the dev container called \"Login Integration Tests\"."
|
||||
echo "To fix the failures, open the dev container called \"Login Integration\"."
|
||||
echo "You will have the same environment as the pipeline check as well as some guidance on how to fix the errors."
|
||||
- name: Show Compose Status
|
||||
if: failure()
|
||||
run: docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml ps
|
||||
run: docker compose --file .devcontainer/login-integration/docker-compose.yaml ps
|
||||
- name: Print Config
|
||||
if: failure()
|
||||
run: COMPOSE_BAKE=1 docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml config login-integration
|
||||
run: COMPOSE_BAKE=1 docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration/docker-compose.yaml config login-integration
|
||||
env:
|
||||
LOGIN_TAG: ${{ inputs.login_build_image }}
|
||||
- name: Show Container Logs
|
||||
if: failure()
|
||||
run: docker compose --file .devcontainer/base/docker-compose.yaml --file .devcontainer/login-integration-ci/docker-compose.yaml logs --timestamps --no-color --tail 100 login-integration
|
||||
run: docker compose --file .devcontainer/login-integration/docker-compose.yaml logs --timestamps --no-color --tail 100 login-integration
|
||||
- name: Inspect All Failed Containers
|
||||
if: failure()
|
||||
run: |
|
||||
|
@@ -8,6 +8,7 @@
|
||||
"devcontainer:lint-unit": "FAIL_COMMANDS_ON_ERRORS=true devcontainer up --prebuild --config .devcontainer/turbo-lint-unit/devcontainer.json --workspace-folder .",
|
||||
"devcontainer:integration:login": "FAIL_COMMANDS_ON_ERRORS=true devcontainer up --prebuild --config .devcontainer/login-integration/devcontainer.json --workspace-folder .",
|
||||
"devcontainer:acceptance:login": "FAIL_COMMANDS_ON_ERRORS=true devcontainer up --prebuild --config .devcontainer/login-acceptance/devcontainer.json --workspace-folder .",
|
||||
"devcontainer:acceptance:login:build": "make docker_image && docker compose --file .devcontainer/login-acceptance/docker-compose.yaml build --pull",
|
||||
"clean": "turbo run clean",
|
||||
"clean:all": "pnpm run clean && rm -rf .turbo node_modules"
|
||||
},
|
||||
|
Reference in New Issue
Block a user