diff --git a/Makefile b/Makefile index 77250fbf40..f6e32026ed 100644 --- a/Makefile +++ b/Makefile @@ -121,8 +121,12 @@ release: manifests mkdir -p release kustomize build config/default > release/actions-runner-controller.yaml +.PHONY: release/clean +release/clean: + rm -rf release + .PHONY: acceptance -acceptance: release +acceptance: release/clean release ACCEPTANCE_TEST_SECRET_TYPE=token make acceptance/setup acceptance/tests acceptance/teardown ACCEPTANCE_TEST_SECRET_TYPE=app make acceptance/setup acceptance/tests acceptance/teardown ACCEPTANCE_TEST_DEPLOYMENT_TOOL=helm ACCEPTANCE_TEST_SECRET_TYPE=token make acceptance/setup acceptance/tests acceptance/teardown diff --git a/runner/Dockerfile b/runner/Dockerfile index 94318ea148..70cf60fd09 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -56,6 +56,10 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers # Runner download supports amd64 as x64. Externalstmp is needed for making mount points work inside DinD. +# +# libyaml-dev is required for ruby/setup-ruby action. +# It is installed after installdependencies.sh and before removing /var/lib/apt/lists +# to avoid rerunning apt-update on its own. RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ && if [ "$ARCH" = "amd64" ]; then export ARCH=x64 ; fi \ && mkdir -p /runner \ @@ -65,8 +69,14 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ && rm runner.tar.gz \ && ./bin/installdependencies.sh \ && mv ./externals ./externalstmp \ + && apt-get install -y libyaml-dev \ && rm -rf /var/lib/apt/lists/* +RUN echo AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache > /runner.env \ + && mkdir /opt/hostedtoolcache \ + && chgrp runner /opt/hostedtoolcache \ + && chmod g+rwx /opt/hostedtoolcache + COPY entrypoint.sh /runner COPY patched /runner/patched diff --git a/runner/dindrunner.Dockerfile b/runner/dindrunner.Dockerfile index 7b635480b3..2bcec02c7f 100644 --- a/runner/dindrunner.Dockerfile +++ b/runner/dindrunner.Dockerfile @@ -67,6 +67,10 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ docker --version # Runner download supports amd64 as x64 +# +# libyaml-dev is required for ruby/setup-ruby action. +# It is installed after installdependencies.sh and before removing /var/lib/apt/lists +# to avoid rerunning apt-update on its own. RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ && if [ "$ARCH" = "amd64" ]; then export ARCH=x64 ; fi \ && mkdir -p /runner \ @@ -75,8 +79,13 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ && tar xzf ./runner.tar.gz \ && rm runner.tar.gz \ && ./bin/installdependencies.sh \ + && apt-get install -y libyaml-dev \ && rm -rf /var/lib/apt/lists/* +RUN echo AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache > /runner.env \ + && mkdir /opt/hostedtoolcache \ + && chgrp runner /opt/hostedtoolcache \ + && chmod g+rwx /opt/hostedtoolcache COPY modprobe startup.sh /usr/local/bin/ COPY supervisor/ /etc/supervisor/conf.d/