From 68c46b7d8e31e3a7911360108e63ee31dcad0998 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 20 Oct 2023 13:45:39 +0100 Subject: [PATCH] regisdtration token --- .drone/deploy.sh | 3 --- .drone/drone-home.yml | 9 +++++++++ docker-compose.yml | 6 ++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.drone/deploy.sh b/.drone/deploy.sh index 489700f..7c04ca8 100644 --- a/.drone/deploy.sh +++ b/.drone/deploy.sh @@ -1,7 +1,4 @@ export LOCAL_DOCKER_REGISTRY=${REGISTRY_DOMAIN}:${REGISTRY_PORT}/${ROOT}/${NAME}/ \ && echo $1 \ && export TAG=$1 \ -&& docker stack rm gitea \ -&& echo 'sleeping...zzz' \ -&& sleep 60 \ && docker stack deploy -c docker-compose.yml gitea --with-registry-auth diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 34fc363..5854ea5 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -16,6 +16,7 @@ steps: - drone_build_number - drone_repo_name - drone_repo_namespace + - runner_registration_token - gitea_mailer_host - gitea_mailer_from - gitea_mailer_user @@ -32,6 +33,7 @@ steps: - "echo \"export GITEA_MAILER_FROM='$${GITEA_MAILER_FROM}'\" >> env-gitea # \"gitea-mailer-from\"" - "echo \"export GITEA_MAILER_USER='$${GITEA_MAILER_USER}'\" >> env-gitea # \"gitea-mailer-user\"" - "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 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\"" @@ -59,6 +61,8 @@ steps: from_secret: gitea-security-secret-key GITEA_SERVER_LFS_JWT_SECRET: from_secret: gitea-server-lfs-jwt-secret + RUNNER_REGISTRATION_TOKEN: + from_secret: runner-registration-token trigger: event: @@ -240,6 +244,7 @@ steps: - registry_domain - registry_port - registry_password + - runner_registration_token - gitea_mailer_host - gitea_mailer_from - gitea_mailer_user @@ -251,6 +256,7 @@ steps: - gitea_mailer_passwd - gitea_mailer_protocol script: + - export RUNNER_REGISTRATION_TOKEN=$${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} @@ -293,5 +299,8 @@ steps: from_secret: gitea-security-secret-key GITEA_SERVER_LFS_JWT_SECRET: from_secret: gitea-server-lfs-jwt-secret + RUNNER_REGISTRATION_TOKEN: + from_secret: runner-registration-token + ... diff --git a/docker-compose.yml b/docker-compose.yml index 1159d76..bcb5689 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,12 @@ services: image: gitea/act_runner:latest networks: - appnet + environment: + # - e CONFIG_FILE=/config.yaml \ + - e GITEA_INSTANCE_URL=https://sigyl.com/git/ + - e GITEA_RUNNER_REGISTRATION_TOKEN=$RUNNER_REGISTRY_TOKEN + - e GITEA_RUNNER_NAME="giles-test" + # - e GITEA_RUNNER_LABELS= \ volumes: gitea-app: