Skip to content

Instantly share code, notes, and snippets.

@raharper
Created February 19, 2026 00:13
Show Gist options
  • Select an option

  • Save raharper/dda09dcc9f016692a1240bcab0e724b2 to your computer and use it in GitHub Desktop.

Select an option

Save raharper/dda09dcc9f016692a1240bcab0e724b2 to your computer and use it in GitHub Desktop.
local stacker build and runtest helper scripts
#!/bin/bash
source stacker-env.sh
gopath=$PWD/.build/gopath
export "GOPATH=$gopath"
export "GOCACHE=$gopath/gocache"
export "PATH=$gopath/bin:$PATH"
export "SLOW_TEST=true"
export "STACKER_DOCKER_BASE=oci:$PWD/.build/oci-clone:"
export "PWD=$PWD"
VERSION=build3 # or whatever you want
make docker-clone STACKER_DOCKER_BASE="docker://ghcr.io/project-stacker/" CLONE_D="$PWD/.build/oci-clone"
make go-download
sudo rm -rf .build/oci
make stacker-dynamic VERSION_FULL=$VERSION
make stacker VERSION_FULL=$VERSION
#!/bin/bash
source stacker-env.sh
sudo -E \
PATH=$PATH \
STACKER_BUILD_ALPINE_IMAGE=oci:/home/ubuntu/stacker/.build/oci-clone:alpine:3.19 \
STACKER_BUILD_BUSYBOX_IMAGE=oci:/home/ubuntu/stacker/.build/oci-clone:busybox:latest \
STACKER_BUILD_CENTOS_IMAGE=oci:/home/ubuntu/stacker/.build/oci-clone:centos:latest \
STACKER_BUILD_UBUNTU_IMAGE=oci:/home/ubuntu/stacker/.build/oci-clone:ubuntu:latest \
./test/main.py \
--privilege-level=priv \
$@
gopath=$PWD/.build/gopath
hackbin=$PWD/hack/tools/bin
export "GOPATH=$gopath"
export "GOCACHE=$gopath/gocache"
export "PATH=$hackbin:$gopath/bin:$PATH"
export "SLOW_TEST=true"
export "STACKER_DOCKER_BASE=oci:$PWD/.build/oci-clone:"
export "PWD=$PWD"
export "REGISTRY_SERVICE=ghcr.io/project-stacker/registry:2"
export "REGISTRY_URL=localhost:5000"
export "ZOT_HOST=localhost"
export "ZOT_PORT=8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment