Install Smoke: cache docker smoke builds
This commit is contained in:
57
.github/workflows/install-smoke.yml
vendored
57
.github/workflows/install-smoke.yml
vendored
@@ -37,27 +37,76 @@ jobs:
|
|||||||
- name: Set up Docker Builder
|
- name: Set up Docker Builder
|
||||||
uses: useblacksmith/setup-docker-builder@v1
|
uses: useblacksmith/setup-docker-builder@v1
|
||||||
|
|
||||||
|
- name: Build root Dockerfile smoke image
|
||||||
|
uses: useblacksmith/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
tags: openclaw-dockerfile-smoke:local
|
||||||
|
load: true
|
||||||
|
push: false
|
||||||
|
provenance: false
|
||||||
|
cache-from: type=gha,scope=install-smoke-root-dockerfile
|
||||||
|
cache-to: type=gha,mode=max,scope=install-smoke-root-dockerfile
|
||||||
|
|
||||||
- name: Run root Dockerfile CLI smoke
|
- name: Run root Dockerfile CLI smoke
|
||||||
run: |
|
run: |
|
||||||
docker build -t openclaw-dockerfile-smoke:local -f Dockerfile .
|
|
||||||
docker run --rm --entrypoint sh openclaw-dockerfile-smoke:local -lc 'which openclaw && openclaw --version'
|
docker run --rm --entrypoint sh openclaw-dockerfile-smoke:local -lc 'which openclaw && openclaw --version'
|
||||||
|
|
||||||
# This smoke only validates that the build-arg path preinstalls selected
|
# This smoke only validates that the build-arg path preinstalls selected
|
||||||
# extension deps without breaking image build or basic CLI startup. It
|
# extension deps without breaking image build or basic CLI startup. It
|
||||||
# does not exercise runtime loading/registration of diagnostics-otel.
|
# does not exercise runtime loading/registration of diagnostics-otel.
|
||||||
|
- name: Build extension Dockerfile smoke image
|
||||||
|
uses: useblacksmith/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
build-args: |
|
||||||
|
OPENCLAW_EXTENSIONS=diagnostics-otel
|
||||||
|
tags: openclaw-ext-smoke:local
|
||||||
|
load: true
|
||||||
|
push: false
|
||||||
|
provenance: false
|
||||||
|
cache-from: type=gha,scope=install-smoke-root-dockerfile-ext
|
||||||
|
cache-to: type=gha,mode=max,scope=install-smoke-root-dockerfile-ext
|
||||||
|
|
||||||
- name: Smoke test Dockerfile with extension build arg
|
- name: Smoke test Dockerfile with extension build arg
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
|
||||||
--build-arg OPENCLAW_EXTENSIONS="diagnostics-otel" \
|
|
||||||
-t openclaw-ext-smoke:local -f Dockerfile .
|
|
||||||
docker run --rm --entrypoint sh openclaw-ext-smoke:local -lc 'which openclaw && openclaw --version'
|
docker run --rm --entrypoint sh openclaw-ext-smoke:local -lc 'which openclaw && openclaw --version'
|
||||||
|
|
||||||
|
- name: Build installer smoke image
|
||||||
|
uses: useblacksmith/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: ./scripts/docker
|
||||||
|
file: ./scripts/docker/install-sh-smoke/Dockerfile
|
||||||
|
tags: openclaw-install-smoke:local
|
||||||
|
load: true
|
||||||
|
push: false
|
||||||
|
provenance: false
|
||||||
|
cache-from: type=gha,scope=install-smoke-installer-root
|
||||||
|
cache-to: type=gha,mode=max,scope=install-smoke-installer-root
|
||||||
|
|
||||||
|
- name: Build installer non-root image
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: useblacksmith/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: ./scripts/docker
|
||||||
|
file: ./scripts/docker/install-sh-nonroot/Dockerfile
|
||||||
|
tags: openclaw-install-nonroot:local
|
||||||
|
load: true
|
||||||
|
push: false
|
||||||
|
provenance: false
|
||||||
|
cache-from: type=gha,scope=install-smoke-installer-nonroot
|
||||||
|
cache-to: type=gha,mode=max,scope=install-smoke-installer-nonroot
|
||||||
|
|
||||||
- name: Run installer docker tests
|
- name: Run installer docker tests
|
||||||
env:
|
env:
|
||||||
CLAWDBOT_INSTALL_URL: https://openclaw.ai/install.sh
|
CLAWDBOT_INSTALL_URL: https://openclaw.ai/install.sh
|
||||||
CLAWDBOT_INSTALL_CLI_URL: https://openclaw.ai/install-cli.sh
|
CLAWDBOT_INSTALL_CLI_URL: https://openclaw.ai/install-cli.sh
|
||||||
CLAWDBOT_NO_ONBOARD: "1"
|
CLAWDBOT_NO_ONBOARD: "1"
|
||||||
CLAWDBOT_INSTALL_SMOKE_SKIP_CLI: "1"
|
CLAWDBOT_INSTALL_SMOKE_SKIP_CLI: "1"
|
||||||
|
CLAWDBOT_INSTALL_SMOKE_SKIP_IMAGE_BUILD: "1"
|
||||||
|
CLAWDBOT_INSTALL_NONROOT_SKIP_IMAGE_BUILD: ${{ github.event_name == 'pull_request' && '0' || '1' }}
|
||||||
CLAWDBOT_INSTALL_SMOKE_SKIP_NONROOT: ${{ github.event_name == 'pull_request' && '1' || '0' }}
|
CLAWDBOT_INSTALL_SMOKE_SKIP_NONROOT: ${{ github.event_name == 'pull_request' && '1' || '0' }}
|
||||||
CLAWDBOT_INSTALL_SMOKE_SKIP_PREVIOUS: "1"
|
CLAWDBOT_INSTALL_SMOKE_SKIP_PREVIOUS: "1"
|
||||||
run: bash scripts/test-install-sh-docker.sh
|
run: bash scripts/test-install-sh-docker.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user