mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 19:50:30 +00:00
* added containerMode=kubernetes env variables to the runner * removed unused logging * restored configs and charts * restored makefile cert version and acceptance/run * added workVolumeClaimTemplate in pod definition, including logic * added claim template name based on the runner * Apply suggestions from code review update errors * added concurrent cleanup before runner pod is deleted * update manifests * added retry after 30s if pod cleanup contains err * added admission webhook check, made workVolumeClaimTemplate mandatory for k8s * style changes and added comments * added izZero timestamp check for deleting runner-linked pods * changed order of local variable to avoid copy if p is deleted * removed docker from container mode k8s * restored charts, config, makefile * restored forked files back and not the ARC ones * created PersistentVolume on containerMode k8s * create pv only if storage class name is local-storage * removed actions if storage class name is local-storage * added service account validation if container mode kubernetes * changed the coding style to match rest of the ARC * added validation to the runnerdeployment webhook * specified fields more precisely, added webhook validation to the replicaset as well * remake manifests * wraped delete runner-linked-pods in kube mode * fixed empty line * fixed import * makefile changes for hooks * added cleanup secrets * create manifests * docs * update access modes * update dockerfile * nit changes * fixed dockerfile * rewrite allowing reuse for runners and runnersets * deepcopy forgot to stage * changed privileged * make manifests * partly moved to finalizer, still need to apply finalizer first * finalizer added if env variable used in container mode exists * bump runner version * error message moved from Error to Info on cleanup pods/secrets * removed useless dereferencing, added transformation tests of workVolumeClaimTemplate * Apply suggestions from code review * Update controllers/utils_test.go Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * Update controllers/utils_test.go Co-authored-by: Thomas Boop <52323235+thboop@users.noreply.github.com> * add hook version to cli, update to 0.1.2 * Apply suggestions from code review * Update controllers/utils_test.go * Update runner/Makefile * Fix missing secret permission and the error handling * Fix a runnerpod reconciler finalizer to not trigger unnecessary retry Co-authored-by: Nikola Jokic <nikola-jokic@github.com> Co-authored-by: Nikola Jokic <97525037+nikola-jokic@users.noreply.github.com> Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
67 lines
2.3 KiB
Makefile
67 lines
2.3 KiB
Makefile
DOCKER_USER ?= summerwind
|
|
NAME ?= ${DOCKER_USER}/actions-runner
|
|
DIND_RUNNER_NAME ?= ${DOCKER_USER}/actions-runner-dind
|
|
TAG ?= latest
|
|
TARGETPLATFORM ?= $(shell arch)
|
|
|
|
RUNNER_VERSION ?= 2.294.0
|
|
RUNNER_CONTAINER_HOOKS_VERSION ?= 0.1.2
|
|
DOCKER_VERSION ?= 20.10.12
|
|
|
|
# default list of platforms for which multiarch image is built
|
|
ifeq (${PLATFORMS}, )
|
|
export PLATFORMS="linux/amd64,linux/arm64"
|
|
endif
|
|
|
|
# if IMG_RESULT is unspecified, by default the image will be pushed to registry
|
|
ifeq (${IMG_RESULT}, load)
|
|
export PUSH_ARG="--load"
|
|
# if load is specified, image will be built only for the build machine architecture.
|
|
export PLATFORMS="local"
|
|
else ifeq (${IMG_RESULT}, cache)
|
|
# if cache is specified, image will only be available in the build cache, it won't be pushed or loaded
|
|
# therefore no PUSH_ARG will be specified
|
|
else
|
|
export PUSH_ARG="--push"
|
|
endif
|
|
|
|
docker-build-ubuntu:
|
|
docker build \
|
|
--build-arg TARGETPLATFORM=${TARGETPLATFORM} \
|
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
|
--build-arg RUNNER_CONTAINER_HOOKS_VERSION=${RUNNER_CONTAINER_HOOKS_VERSION} \
|
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
|
-f actions-runner.dockerfile \
|
|
-t ${NAME}:${TAG} .
|
|
docker build \
|
|
--build-arg TARGETPLATFORM=${TARGETPLATFORM} \
|
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
|
-f actions-runner-dind.dockerfile \
|
|
-t ${DIND_RUNNER_NAME}:${TAG} .
|
|
|
|
docker-push-ubuntu:
|
|
docker push ${NAME}:${TAG}
|
|
docker push ${DIND_RUNNER_NAME}:${TAG}
|
|
|
|
docker-buildx-ubuntu:
|
|
export DOCKER_CLI_EXPERIMENTAL=enabled ;\
|
|
export DOCKER_BUILDKIT=1
|
|
@if ! docker buildx ls | grep -q container-builder; then\
|
|
docker buildx create --platform ${PLATFORMS} --name container-builder --use;\
|
|
fi
|
|
docker buildx build --platform ${PLATFORMS} \
|
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
|
--build-arg RUNNER_CONTAINER_HOOKS_VERSION=${RUNNER_CONTAINER_HOOKS_VERSION} \
|
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
|
-f actions-runner.dockerfile \
|
|
-t "${NAME}:${TAG}" \
|
|
. ${PUSH_ARG}
|
|
docker buildx build --platform ${PLATFORMS} \
|
|
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
|
|
--build-arg RUNNER_CONTAINER_HOOKS_VERSION=${RUNNER_CONTAINER_HOOKS_VERSION} \
|
|
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
|
|
-f actions-runner-dind.dockerfile \
|
|
-t "${DIND_RUNNER_NAME}:${TAG}" \
|
|
. ${PUSH_ARG}
|