diff --git a/.github/workflows/gha-e2e-tests.yaml b/.github/workflows/gha-e2e-tests.yaml index db94b81c..16b9093d 100644 --- a/.github/workflows/gha-e2e-tests.yaml +++ b/.github/workflows/gha-e2e-tests.yaml @@ -49,6 +49,22 @@ jobs: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + default-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run default setup test run: hack/e2e-test.sh default-setup-v2 env: @@ -76,6 +92,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + single-namespace-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run single namespace setup test run: hack/e2e-test.sh single-namespace-setup-v2 env: @@ -103,6 +136,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + dind-mode-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run dind mode setup test run: hack/e2e-test.sh dind-mode-setup env: @@ -130,6 +180,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + kubernetes-mode-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run kubernetes mode setup test run: hack/e2e-test.sh kubernetes-mode-setup env: @@ -157,6 +224,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + auth-proxy-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run single namespace setup test run: hack/e2e-test.sh single-namespace-setup env: @@ -184,6 +268,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + anonymous-proxy-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run anonymous proxy setup test run: hack/e2e-test.sh anonymous-proxy-setup env: @@ -211,6 +312,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + self-signed-ca-setup-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run self signed CA setup test run: hack/e2e-test.sh self-signed-ca-setup env: @@ -238,6 +356,23 @@ jobs: env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + + update-strategy-tests-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run update strategy test run: hack/e2e-test.sh update-strategy env: @@ -266,8 +401,25 @@ jobs: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" shell: bash + init-with-min-runners-v2: + runs-on: ubuntu-latest + timeout-minutes: 20 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.repository_id + steps: + - uses: actions/checkout@v6 + with: + ref: ${{github.head_ref}} + + - name: Get configure token + id: config-token + uses: peter-murray/workflow-application-token-action@d17e3a9a36850ea89f35db16c1067dd2b68ee343 + with: + application_id: ${{ secrets.E2E_TESTS_ACCESS_APP_ID }} + application_private_key: ${{ secrets.E2E_TESTS_ACCESS_PK }} + organization: ${{ env.TARGET_ORG }} - name: Run init with min runners test run: hack/e2e-test.sh init-with-min-runners env: GITHUB_TOKEN: "${{steps.config-token.outputs.token}}" - shell: bash \ No newline at end of file + shell: bash + diff --git a/charts/gha-runner-scale-set-experimental/templates/_mode_dind.tpl b/charts/gha-runner-scale-set-experimental/templates/_mode_dind.tpl index 2eb49af9..a6e7ade5 100644 --- a/charts/gha-runner-scale-set-experimental/templates/_mode_dind.tpl +++ b/charts/gha-runner-scale-set-experimental/templates/_mode_dind.tpl @@ -78,7 +78,7 @@ volumeMounts: {{- with $dindContainer.volumeMounts }} {{- toYaml . | nindent 2 }} {{- end }} -{{- if $dind.copyExternals }} +{{- if $dind.copyRunnerExternals }} - name: dind-externals mountPath: /home/runner/externals {{ end }} @@ -95,7 +95,7 @@ volumeMounts: - name: dind-sock emptyDir: {} {{ include "githubServerTLS.podVolumeItem" . }} -{{- if .Values.runner.dind.copyExternals }} +{{- if .Values.runner.dind.copyRunnerExternals }} - name: dind-externals emptyDir: {} {{- end }} @@ -163,4 +163,4 @@ value: {{ $waitForDockerInSecondsInt | toString | quote }} {{- end -}} {{- $dockerSockPath := trimPrefix "unix://" $dockerSock -}} {{- dir $dockerSockPath -}} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml b/charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml index e15ba116..a97caf4d 100644 --- a/charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml +++ b/charts/gha-runner-scale-set-experimental/templates/autoscalingrunnserset.yaml @@ -181,7 +181,7 @@ spec: serviceAccountName: {{ include "autoscaling-runner-set.template-service-account" . | quote }} {{- if $hasInitContainers }} initContainers: - {{- if and (eq $runnerMode "dind") $dind.copyExternals }} + {{- if and (eq $runnerMode "dind") $dind.copyRunnerExternals }} - {{ include "runner-mode-dind.copy-externals" . | nindent 10 }} {{- end }} {{- range $extraInitContainers }} @@ -220,4 +220,4 @@ spec: {{- end }} {{- if gt (len $runnerPodSpecExtraFields) 0 }} {{- toYaml $runnerPodSpecExtraFields | nindent 6 }} - {{- end }} \ No newline at end of file + {{- end }} diff --git a/charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_dind_mode_spec_test.yaml b/charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_dind_mode_spec_test.yaml index 75d1d493..2ec6d4db 100644 --- a/charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_dind_mode_spec_test.yaml +++ b/charts/gha-runner-scale-set-experimental/tests/autoscaling_runner_set_dind_mode_spec_test.yaml @@ -114,7 +114,7 @@ tests: name: dind-externals emptyDir: {} - - it: should omit init-dind-externals and dind-externals volume when copyExternals is false + - it: should omit init-dind-externals and dind-externals volume when copyRunnerExternals is false set: scaleset.name: "test" auth.url: "https://github.com/org" @@ -124,7 +124,7 @@ tests: runner: mode: "dind" dind: - copyExternals: false + copyRunnerExternals: false release: name: "test-name" namespace: "test-namespace" diff --git a/charts/gha-runner-scale-set-experimental/values.yaml b/charts/gha-runner-scale-set-experimental/values.yaml index 84b37056..eced4064 100644 --- a/charts/gha-runner-scale-set-experimental/values.yaml +++ b/charts/gha-runner-scale-set-experimental/values.yaml @@ -189,7 +189,7 @@ runner: # assets from the /home/runner/externals directory, copy externals # starts the init container whose purpose is to prepare the environment # for the dind container. - copyExternals: true + copyRunnerExternals: true dockerGroupId: "123" dockerSock: "unix:///var/run/docker.sock" waitForDockerInSeconds: 120