This is an automated email from the ASF dual-hosted git repository. sciabarracom pushed a commit to branch build-local in repository https://gitbox.apache.org/repos/asf/openserverless-build.git
commit 3326ff6eb31d4f202db530494be52a2ca5736b8a Author: Michele Sciabarra <[email protected]> AuthorDate: Fri Jun 26 19:04:16 2026 +0000 Make build-all local and containerized --- Taskfile.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index a178015..be4e4bb 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -170,7 +170,7 @@ tasks: echo "***" {{.ACT}} for {{.IMG}} in {{.DIR}} case "{{.ACT}}" in (build) - docker build {{.DIR}} -t {{.IMG}} --build-arg BASE={{.BASE}} --push + docker build {{.DIR}} -t {{.IMG}} --build-arg BASE={{.BASE}} ;; (buildx) docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE={{.BASE}} -t {{.IMG}} {{.DIR}} @@ -189,7 +189,7 @@ tasks: echo "***" {{.ACT}} for {{.IMG}} in {{.DIR}} case "{{.ACT}}" in (build) - docker build {{.DIR}} -t {{.IMG}} --build-arg BASE={{.BASE}} --build-arg OPENWHISK_JAR={{.OPENWHISK_JAR}} --push + docker build {{.DIR}} -t {{.IMG}} --build-arg BASE={{.BASE}} --build-arg OPENWHISK_JAR={{.OPENWHISK_JAR}} ;; (buildx) docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE={{.BASE}} --build-arg OPENWHISK_JAR={{.OPENWHISK_JAR}} -t {{.IMG}} {{.DIR}} @@ -251,9 +251,27 @@ tasks: IMG: "{{.DOCKER_REGISTRY}}/${MY_STANDALONE_IMAGE:-{{.STANDALONE_IMAGE}}}:{{.TAG}}" ACT: '{{.ACT}}' BASE: "{{.DOCKER_REGISTRY}}/{{.COMMON_IMAGE}}:{{.TAG}}" - OPENWHISK_JAR: "build/libs/openwhisk-standalone-1.0.1-SNAPSHOT.jar" + OPENWHISK_JAR: "build/libs/openwhisk-standalone-1.0.0-SNAPSHOT.jar" build-all: + cmds: + - | + if test "${OPENWHISK_BUILDCONTAINER:-}" = "1"; then + task build-all:local + else + if ! docker image inspect "{{.BUILD_CONTAINER_IMAGE}}" >/dev/null 2>&1; then + docker build -t "{{.BUILD_CONTAINER_IMAGE}}" .devcontainer + fi + docker run --rm --entrypoint bash \ + -e OPENWHISK_BUILDCONTAINER=1 \ + -v "{{.WORKSPACE_ROOT}}:/workspace" \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -w /workspace/build \ + "{{.BUILD_CONTAINER_IMAGE}}" \ + -lc 'git config --global --add safe.directory /workspace && git config --global --add safe.directory /workspace/build && git config --global --add safe.directory /workspace/build/openwhisk && task build-all:local' + fi + + build-all:local: cmds: - task: build:scala vars:
