-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Your Name
committed
Sep 19, 2024
1 parent
f8a6e9b
commit d1b904d
Showing
2 changed files
with
27 additions
and
14 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
// const { createClient } = require("@supabase/supabase-js") | ||
const { createClient } = require("@supabase/supabase-js") | ||
Check failure on line 1 in plugins/kontinuous-ui/pre-deploy/01-deployment_event.js GitHub Actions / Lint
|
||
|
||
module.exports = async (manifests, _options, { config, logger }) => { | ||
const { repositoryName } = config | ||
logger.debug("*****> REPOSITORY NAME:", repositoryName) | ||
module.exports = async (_manifests, _options, { config }) => { | ||
const { | ||
action, | ||
gitSha, | ||
projectName, | ||
environment, | ||
refLabelValue, | ||
repositoryName, | ||
} = config | ||
|
||
// const supabase = createClient( | ||
// "https://dabwsunwcukreynmegja.supabase.co", | ||
// "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRhYndzdW53Y3VrcmV5bm1lZ2phIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjU2NDQwMDksImV4cCI6MjA0MTIyMDAwOX0.8779ZywO5dvRLfMGMShlxBUqGeqC6WK4k3e0puBN7So" | ||
// ) | ||
// logger.info("Creation du client supabase") | ||
// const { data, error } = await supabase.from("users").select("*") | ||
// logger.info("Execution de la requete", error) | ||
// if (error) throw error | ||
// logger.info("DATA:", JSON.stringify(data, null, 2)) | ||
logger.info("CONFIG", config) | ||
const supabase = createClient( | ||
"https://dabwsunwcukreynmegja.supabase.co", | ||
"XXXX" | ||
) | ||
|
||
const { error } = await supabase.from("deployments_logs").insert([ | ||
{ | ||
status: action, | ||
commit_hash: gitSha, | ||
project: projectName, | ||
environment, | ||
branch: refLabelValue, | ||
repository: repositoryName, | ||
}, | ||
]) | ||
|
||
if (error) throw error | ||
} | ||
|
||
// ../kontinuous/kontinuous deploy --kubeconfig-context ovh-dev --dry-run -d |