diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 5ddfe38..88cf98b 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -18,6 +18,7 @@ steps: - drone_repo_namespace - runner_registration_token - user_runner_registration_token + - organisation_runner_registration_token - gitea_mailer_host - gitea_mailer_from - gitea_mailer_user @@ -36,6 +37,7 @@ steps: - "echo \"export GITEA_APP_NAME='$${GITEA_APP_NAME}'\" >> env-gitea # \"gitea-app-name\"" - "echo \"export RUNNER_REGISTRATION_TOKEN='$${RUNNER_REGISTRATION_TOKEN}'\" >> env-gitea # \"runner_registration_token\"" - "echo \"export USER_RUNNER_REGISTRATION_TOKEN='$${USER_RUNNER_REGISTRATION_TOKEN}'\" >> env-gitea # \"user_runner_registration_token\"" + - "echo \"export ORGANISATION_RUNNER_REGISTRATION_TOKEN='$${ORGANISATION_RUNNER_REGISTRATION_TOKEN}'\" >> env-gitea # \"organisation_runner_registration_token\"" - "echo \"export GITEA_SERVER_LFS_JWT_SECRET='$${GITEA_SERVER_LFS_JWT_SECRET}'\" >> env-gitea # \"gitea-server-lfs-jwt-secret\"" - "echo \"export GITEA_SECURITY_SECRET_KEY='$${GITEA_SECURITY_SECRET_KEY}'\" >> env-gitea # \"gitea-security-secret-key\"" - "echo \"export GITEA_SECURITY_INTERNAL_TOKEN='$${GITEA_SECURITY_INTERNAL_TOKEN}'\" >> env-gitea # \"gitea-security-internal-token\"" @@ -67,6 +69,8 @@ steps: from_secret: runner-registration-token USER_RUNNER_REGISTRATION_TOKEN: from_secret: user-runner-registration-token + ORGANISATION_RUNNER_REGISTRATION_TOKEN: + from_secret: organisation-runner-registration-token trigger: event: @@ -189,7 +193,9 @@ steps: - gitea_mailer_protocol - runner_registration_token - user_runner_registration_token + - organisation_runner_registration_token script: + - export ORGANISATION_RUNNER_REGISTRATION_TOKEN=$${ORGANISATION_RUNNER_REGISTRATION_TOKEN} - export USER_RUNNER_REGISTRATION_TOKEN=$${USER_RUNNER_REGISTRATION_TOKEN} - export RUNNER_REGISTRATION_TOKEN=$${RUNNER_REGISTRATION_TOKEN} - export GITEA_SERVER_LFS_JWT_SECRET=$${GITEA_SERVER_LFS_JWT_SECRET} @@ -238,6 +244,8 @@ steps: from_secret: runner-registration-token USER_RUNNER_REGISTRATION_TOKEN: from_secret: user-runner-registration-token + ORGANISATION_RUNNER_REGISTRATION_TOKEN: + from_secret: organisation-runner-registration-token - name: deploy tag ${DRONE_TAG} when: @@ -259,6 +267,7 @@ steps: - registry_password - runner_registration_token - user_runner_registration_token + - organisation_runner_registration_token - gitea_mailer_host - gitea_mailer_from - gitea_mailer_user @@ -272,6 +281,7 @@ steps: script: - export RUNNER_REGISTRATION_TOKEN=$${RUNNER_REGISTRATION_TOKEN} - export USER_RUNNER_REGISTRATION_TOKEN=$${USER_RUNNER_REGISTRATION_TOKEN} + - export ORGANISATION_RUNNER_REGISTRATION_TOKEN=$${ORGANISATION_RUNNER_REGISTRATION_TOKEN} - export GITEA_SERVER_LFS_JWT_SECRET=$${GITEA_SERVER_LFS_JWT_SECRET} - export GITEA_SECURITY_SECRET_KEY=$${GITEA_SECURITY_SECRET_KEY} - export GITEA_SECURITY_INTERNAL_TOKEN=$${GITEA_SECURITY_INTERNAL_TOKEN} @@ -318,6 +328,8 @@ steps: from_secret: runner-registration-token USER_RUNNER_REGISTRATION_TOKEN: from_secret: user-runner-registration-token + ORGANISATION_RUNNER_REGISTRATION_TOKEN: + from_secret: organisation-runner-registration-token ... diff --git a/docker-compose.yml b/docker-compose.yml index f14b5ec..bf43f53 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,24 @@ services: - GITEA_RUNNER_REGISTRATION_TOKEN=$USER_RUNNER_REGISTRATION_TOKEN - GITEA_RUNNER_NAME="giles-test" - GITEA_RUNNER_LABELS="" - + organisation-act-runner: + deploy: + placement: + constraints: [node.labels.com.sigyl.git-stack == yes] + replicas: 5 + restart_policy: + condition: any + image: ${LOCAL_DOCKER_REGISTRY}act_runner:${TAG} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - appnet + environment: + - CONFIG_FILE=/config.yaml + - GITEA_INSTANCE_URL=https://sigyl.com/git/ + - GITEA_RUNNER_REGISTRATION_TOKEN=$ORGANISATION_RUNNER_REGISTRATION_TOKEN + - GITEA_RUNNER_NAME="giles-test" + - GITEA_RUNNER_LABELS="" volumes: gitea-app: