From 8f810907cd27471aaaea4f53bb233db82c06861f Mon Sep 17 00:00:00 2001 From: Maurice Faber Date: Sun, 3 Jul 2022 12:29:43 +0200 Subject: [PATCH] fix: drone namespace --- src/tasks/gitea/gitea-drone-oauth.ts | 2 +- src/validators.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tasks/gitea/gitea-drone-oauth.ts b/src/tasks/gitea/gitea-drone-oauth.ts index 8487698b..07748286 100644 --- a/src/tasks/gitea/gitea-drone-oauth.ts +++ b/src/tasks/gitea/gitea-drone-oauth.ts @@ -20,7 +20,7 @@ export interface DroneSecret { } const errors: string[] = [] -const namespace = 'team-admin' +const namespace = env.DRONE_NAMESPACE const secretName = 'drone-source-control' const csrfCookieName = '_csrf' // _csrf cookie is the MVC (Minimal Viable Cookie) for authorization & grant to work. const giteaUrl: string = env.GITEA_URL.endsWith('/') ? env.GITEA_URL.slice(0, -1) : env.GITEA_URL diff --git a/src/validators.ts b/src/validators.ts index 9a3a38c2..172177ad 100644 --- a/src/validators.ts +++ b/src/validators.ts @@ -42,6 +42,7 @@ export const IDP_SUB_CLAIM_MAPPER = str({ default: 'sub', }) +export const DRONE_NAMESPACE = str({ desc: 'The namespace of the drone release', default: 'drone' }) export const DRONE_TOKEN = str({ desc: 'The admin token to use for drone api server' }) export const DRONE_URL = str({ desc: 'The public url of the drone server' }) export const GITEA_PASSWORD = str({ desc: 'The gitea admin password' })