mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 17:57:33 +00:00
local dev
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -112,7 +112,7 @@ jobs:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
needs:
|
||||
[version, core-unit-test, core-integration-test, lint, container, e2e, login-container]
|
||||
[version, core-unit-test, core-integration-test, lint, container, login-container, e2e]
|
||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
secrets:
|
||||
GCR_JSON_KEY_BASE64: ${{ secrets.GCR_JSON_KEY_BASE64 }}
|
||||
|
2
.github/workflows/login-container.yml
vendored
2
.github/workflows/login-container.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
with:
|
||||
oidc: true
|
||||
- name: Build Login Container
|
||||
run: make login-standalone-build
|
||||
run: make login_standalone_build
|
||||
env:
|
||||
# latest if branch is main, otherwise image version which is the pull request number
|
||||
BAKE_CLI: depot bake
|
||||
|
10
.github/workflows/login-quality.yml
vendored
10
.github/workflows/login-quality.yml
vendored
@@ -7,10 +7,6 @@ on:
|
||||
description: 'Ignore run caches'
|
||||
type: boolean
|
||||
required: true
|
||||
outputs:
|
||||
login_build_image:
|
||||
description: 'The image name of the built production standalone login image'
|
||||
value: 'ghcr.io/zitadel/login:${{ github.sha }}'
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
@@ -50,7 +46,11 @@ jobs:
|
||||
${{ runner.os }}-login-run-caches-${{github.ref_name}}-${{ github.sha }}-
|
||||
${{ runner.os }}-login-run-caches-${{github.ref_name}}-
|
||||
${{ runner.os }}-login-run-caches-
|
||||
- run: make login-quality
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: .artifacts
|
||||
name: zitadel-linux-amd64
|
||||
- run: make login_quality
|
||||
env:
|
||||
# latest if branch is main, otherwise image version which is the pull request number
|
||||
LOGIN_BAKE_CLI: depot bake
|
||||
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -188,7 +188,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
version: echo -n "${{ needs.version.outputs.version }}"
|
||||
version: ${{ needs.version.outputs.version }}
|
||||
cwd: login
|
||||
|
||||
typescript-repo:
|
||||
@@ -199,4 +199,4 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Push Subtree
|
||||
run: make login-push
|
||||
run: make login_push
|
||||
|
@@ -16,6 +16,7 @@ The following files and directories, including their subdirectories, are license
|
||||
|
||||
```
|
||||
proto/
|
||||
login/
|
||||
```
|
||||
|
||||
## Community Contributions
|
||||
|
35
Makefile
35
Makefile
@@ -20,7 +20,13 @@ LOGIN_REMOTE_BRANCH ?= main
|
||||
compile: core_build console_build compile_pipeline
|
||||
|
||||
.PHONY: docker_image
|
||||
docker_image: compile
|
||||
docker_image:
|
||||
@if [ ! -f ./zitadel ]; then \
|
||||
echo "Compiling zitadel binary"; \
|
||||
$(MAKE) compile; \
|
||||
else \
|
||||
echo "Reusing precompiled zitadel binary"; \
|
||||
fi
|
||||
DOCKER_BUILDKIT=1 docker build -f build/Dockerfile -t $(ZITADEL_IMAGE) .
|
||||
|
||||
.PHONY: compile_pipeline
|
||||
@@ -170,16 +176,18 @@ core_lint:
|
||||
--out-format=github-actions \
|
||||
--concurrency=$$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
.PHONY: login-pull
|
||||
login-pull: login-ensure-remote
|
||||
.PHONY: login_pull
|
||||
login_pull: login_ensure_remote
|
||||
@echo "Pulling changes from the 'login' subtree on remote $(LOGIN_REMOTE_NAME) branch $(LOGIN_REMOTE_BRANCH)"
|
||||
git fetch $(LOGIN_REMOTE_NAME)
|
||||
git subtree pull --prefix=login $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_BRANCH)
|
||||
|
||||
.PHONY: login-push
|
||||
login-push: login-ensure-remote
|
||||
.PHONY: login_push
|
||||
login_push: login_ensure_remote
|
||||
@echo "Pushing changes to the 'login' subtree on remote $(LOGIN_REMOTE_NAME) branch $(LOGIN_REMOTE_BRANCH)"
|
||||
git subtree push --prefix=login $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_BRANCH)
|
||||
|
||||
login-ensure-remote:
|
||||
login_ensure_remote:
|
||||
@if ! git remote get-url $(LOGIN_REMOTE_NAME) > /dev/null 2>&1; then \
|
||||
echo "Adding remote $(LOGIN_REMOTE_NAME)"; \
|
||||
git remote add $(LOGIN_REMOTE_NAME) $(LOGIN_REMOTE_URL); \
|
||||
@@ -194,9 +202,14 @@ login-ensure-remote:
|
||||
fi
|
||||
|
||||
export LOGIN_DIR := ./login/
|
||||
export LOGIN_BAKE_CLI_ADDITIONAL_ARGS := --set login-*.context=./login/ --file ./docker-bake.hcl
|
||||
export ZITADEL_TAG := "$(ZITADEL_IMAGE)"
|
||||
#include login/Makefile
|
||||
export LOGIN_BAKE_CLI_ADDITIONAL_ARGS := --set login-*.context=./login/ --file ./docker-bake.hcl
|
||||
export ZITADEL_TAG ?= $(ZITADEL_IMAGE)
|
||||
include login/Makefile
|
||||
|
||||
#login-test-acceptance-build: docker_image login-test-acceptance-build-compose login-test-acceptance-build-bake
|
||||
# @:
|
||||
# Intentional override of login_test_acceptance_build
|
||||
login_test_acceptance_build: docker_image
|
||||
@echo "Building login test acceptance environment with the local zitadel image"
|
||||
$(MAKE) login_test_acceptance_build_compose login_test_acceptance_build_bake
|
||||
|
||||
login_dev: docker_image typescript_generate login_test_acceptance_build_compose login_test_acceptance_cleanup login_test_acceptance_setup_dev
|
||||
@echo "Starting login test environment with the local zitadel image"
|
||||
|
3
build/Dockerfile.gitignore
Normal file
3
build/Dockerfile.gitignore
Normal file
@@ -0,0 +1,3 @@
|
||||
*
|
||||
!build/entrypoint.sh
|
||||
!zitadel
|
@@ -1,8 +1,10 @@
|
||||
target "zitadel" {
|
||||
dockerfile = "build/Dockerfile"
|
||||
target "typescript-proto-client" {
|
||||
contexts = {
|
||||
proto-files = "target:proto-files"
|
||||
}
|
||||
}
|
||||
|
||||
target "typescript-proto-client" {
|
||||
target "typescript-proto-client-out" {
|
||||
contexts = {
|
||||
proto-files = "target:proto-files"
|
||||
}
|
||||
@@ -10,10 +12,3 @@ target "typescript-proto-client" {
|
||||
"type=local,dest=login/packages/zitadel-proto"
|
||||
]
|
||||
}
|
||||
|
||||
target "typescript-proto-client-out" {
|
||||
output = [
|
||||
"type=local,dest=login/packages/zitadel-proto"
|
||||
]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user