forked from actions/actions-runner-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To ease verifying the controller to work before submitting/merging PRs and releasing a new version of the controller.
- Loading branch information
Showing
6 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ bin | |
*.swp | ||
*.swo | ||
*~ | ||
|
||
.envrc | ||
*.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
runner_name= | ||
|
||
while [ -z "${runner_name}" ]; do | ||
echo Finding the runner... 1>&2 | ||
sleep 1 | ||
runner_name=$(kubectl get runner --output=jsonpath="{.items[*].metadata.name}") | ||
done | ||
|
||
echo Found runner ${runner_name}. | ||
|
||
pod_name= | ||
|
||
while [ -z "${pod_name}" ]; do | ||
echo Finding the runner pod... 1>&2 | ||
sleep 1 | ||
pod_name=$(kubectl get pod --output=jsonpath="{.items[*].metadata.name}" | grep ${runner_name}) | ||
done | ||
|
||
echo Found pod ${pod_name}. | ||
|
||
echo Waiting for pod ${runner_name} to become ready... 1>&2 | ||
|
||
kubectl wait pod/${runner_name} --for condition=ready --timeout 120s | ||
|
||
echo All tests passed. 1>&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
tpe=${ACCEPTANCE_TEST_SECRET_TYPE} | ||
|
||
if [ "${tpe}" == "token" ]; then | ||
kubectl create secret generic controller-manager \ | ||
-n actions-runner-system \ | ||
--from-literal=github_token=${GITHUB_TOKEN:?GITHUB_TOKEN must not be empty} | ||
elif [ "${tpe}" == "app" ]; then | ||
kubectl create secret generic controller-manager \ | ||
-n actions-runner-system \ | ||
--from-literal=github_app_id=${APP_ID:?must not be empty} \ | ||
--from-literal=github_app_installation_id=${INSTALLATION_ID:?must not be empty} \ | ||
--from-file=github_app_private_key=${PRIVATE_KEY_FILE_PATH:?must not be empty} | ||
else | ||
echo "ACCEPTANCE_TEST_SECRET_TYPE must be set to either \"token\" or \"app\"" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
kubectl apply \ | ||
-n actions-runner-system \ | ||
-f release/actions-runner-controller.yaml | ||
|
||
kubectl -n actions-runner-system wait deploy/controller-manager --for condition=available | ||
|
||
# Adhocly wait for some time until actions-runner-controller's admission webhook gets ready | ||
sleep 20 | ||
|
||
kubectl apply \ | ||
-f acceptance/testdata/runnerdeploy.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: RunnerDeployment | ||
metadata: | ||
name: example-runnerdeploy | ||
spec: | ||
replicas: 1 | ||
template: | ||
spec: | ||
repository: mumoshu/actions-runner-controller-ci |