diff --git a/plugins/kontinuous-ui/.gitignore b/plugins/kontinuous-ui/.gitignore new file mode 100644 index 000000000..4c49bd78f --- /dev/null +++ b/plugins/kontinuous-ui/.gitignore @@ -0,0 +1 @@ +.env diff --git a/plugins/kontinuous-ui/pre-deploy/01-deployment_event.js b/plugins/kontinuous-ui/pre-deploy/01-deployment_event.js index 8eb59ad68..d90510898 100644 --- a/plugins/kontinuous-ui/pre-deploy/01-deployment_event.js +++ b/plugins/kontinuous-ui/pre-deploy/01-deployment_event.js @@ -1,19 +1,19 @@ const { createClient } = require("@supabase/supabase-js") -module.exports = async (_manifests, _options, { config }) => { +module.exports = async (_manifests, _options, { config, ctx }) => { + const processEnv = ctx.get("env") || process.env + const { SUPABASE_URL: supabaseUrl, SUPABASE_KEY: supabaseKey } = processEnv + console.log("ENV", processEnv, supabaseUrl, supabaseKey) const { - actionCommandName, gitSha, projectName, environment, refLabelValue, repositoryName, + actionCommandName, } = config - const supabase = createClient( - "https://dabwsunwcukreynmegja.supabase.co", - "XXXX" - ) + const supabase = createClient(supabaseUrl, supabaseKey) const { error } = await supabase.from("deployments_logs").insert([ {