diff --git a/.gitignore b/.gitignore index 1bae12d8..bbb37b43 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist/ **/tests/_temp/** packages/k8s/tests/test-kind.yaml command +commands.sh diff --git a/Dockerfile.runner b/Dockerfile.runner deleted file mode 100644 index 578cfd32..00000000 --- a/Dockerfile.runner +++ /dev/null @@ -1,12 +0,0 @@ -FROM summerwind/actions-runner:latest - -WORKDIR /home/runner - -COPY packages/k8s/dist/index.js /index.js -COPY packages/k8s/tests/jobtemplate.yaml /template.yaml - -ENV ACTIONS_RUNNER_CONTAINER_HOOK="/index.js" -ENV ACTIONS_RUNNER_JOB_TEMPLATE_PATH="/template.yaml" - -RUN curl -o actions-runner-linux-x64-2.300.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.300.0/actions-runner-linux-x64-2.300.0.tar.gz \ - && tar xzf ./actions-runner-linux-x64-2.300.0.tar.gz diff --git a/packages/k8s/tests/test-kind.yaml b/packages/k8s/tests/test-kind.yaml index 952c2917..a711d705 100644 --- a/packages/k8s/tests/test-kind.yaml +++ b/packages/k8s/tests/test-kind.yaml @@ -4,8 +4,8 @@ nodes: - role: control-plane # add a mount from /path/to/my/files on the host to /files on the node extraMounts: - - hostPath: /Users/nielstenboom/workspace/runner-container-hooks - containerPath: /Users/nielstenboom/workspace/runner-container-hooks + - hostPath: {{PATHTOREPO}} + containerPath: {{PATHTOREPO}} # optional: if set, the mount is read-only. # default false readOnly: false diff --git a/podspec.yaml b/podspec.yaml deleted file mode 100644 index b558e1cf..00000000 --- a/podspec.yaml +++ /dev/null @@ -1,50 +0,0 @@ -# apiVersion: v1 -# kind: Pod -# metadata: -# name: niels-test-container-hook -# spec: -# containers: -# - name: runner -# image: summerwind/actions-runner-dind:latest -# command: ["sh", "-c", "while true; do sleep 1; done"] -# securityContext: -# privileged: true - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: pod-admin -rules: -- apiGroups: [""] - resources: ["pods", "jobs", "pods/log", "pods/exec", "secrets"] - verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] -- apiGroups: ["batch"] - resources: ["jobs"] - verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: pod-admin-binding -subjects: -- kind: ServiceAccount - name: default - namespace: default -roleRef: - kind: Role - name: pod-admin - apiGroup: rbac.authorization.k8s.io ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: niels-test-container-hook-work - namespace: default -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: 1Mi - storageClassName: aws-efs \ No newline at end of file