Skip to content

Commit

Permalink
runner: Remove the ability to use the deprecated --once flag
Browse files Browse the repository at this point in the history
Ref #1196
  • Loading branch information
mumoshu committed Apr 25, 2022
1 parent 1c726ae commit 0f7cd2b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1298,13 +1298,6 @@ spec:
# Disables automatic runner updates
- name: DISABLE_RUNNER_UPDATE
value: "true"
# Configure runner with --ephemeral instead of --once flag
# WARNING | THIS ENV VAR IS DEPRECATED AND WILL BE REMOVED
# IN A FUTURE VERSION OF ARC. IN 0.22.0 ARC SETS --ephemeral VIA
# THE CONTROLLER SETTING THIS ENV VAR ON POD CREATION.
# THIS ENV VAR WILL BE REMOVED, SEE ISSUE #1196 FOR DETAILS
- name: RUNNER_FEATURE_FLAG_EPHEMERAL
value: "true"
```

### Using IRSA (IAM Roles for Service Accounts) in EKS
Expand Down
11 changes: 1 addition & 10 deletions runner/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cd ${RUNNER_HOME}
# past that point, it's all relative pathes from /runner

config_args=()
if [ "${RUNNER_FEATURE_FLAG_EPHEMERAL:-}" == "true" -a "${RUNNER_EPHEMERAL}" == "true" ]; then
if [ "${RUNNER_EPHEMERAL}" == "true" ]; then
config_args+=(--ephemeral)
log.debug 'Passing --ephemeral to config.sh to enable the ephemeral runner.'
fi
Expand Down Expand Up @@ -140,15 +140,6 @@ if [ -z "${UNITTEST:-}" ]; then
mv ./externalstmp/* ./externals/
fi

args=()
if [ "${RUNNER_FEATURE_FLAG_EPHEMERAL:-}" != "true" -a "${RUNNER_EPHEMERAL}" == "true" ]; then
args+=(--once)
log.warning 'Passing --once is deprecated and will be removed as an option' \
'from the image and actions-runner-controller at the release of 0.24.0.' \
'Upgrade to GHES => 3.3 to continue using actions-runner-controller. If' \
'you are using github.com ignore this warning.'
fi

# Unset entrypoint environment variables so they don't leak into the runner environment
unset RUNNER_NAME RUNNER_REPO RUNNER_TOKEN STARTUP_DELAY_IN_SECONDS DISABLE_WAIT_FOR_DOCKER

Expand Down
2 changes: 0 additions & 2 deletions test/entrypoint/should_work_use_once_switch/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export UNITTEST=true
export RUNNER_NAME="example_runner_name"
export RUNNER_REPO="myorg/myrepo"
export RUNNER_TOKEN="xxxxxxxxxxxxx"
export RUNNER_FEATURE_FLAG_EPHEMERAL="false"
export RUNNER_EPHEMERAL="true"

# run.sh and config.sh get used by the runner's real entrypoint.sh and are part of actions/runner.
Expand All @@ -40,7 +39,6 @@ cleanup() {
unset RUNNER_REPO
unset RUNNER_TOKEN
unset RUNNER_EPHEMERAL
unset RUNNER_FEATURE_FLAG_EPHEMERAL
}

# Always run cleanup when test ends regardless of how it ends
Expand Down

0 comments on commit 0f7cd2b

Please sign in to comment.