-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide in api/status the git commit metadata (SHA/branch/tag) used to make a Vercel deployment #225
Provide in api/status the git commit metadata (SHA/branch/tag) used to make a Vercel deployment #225
Conversation
✅ Deployment SUCCESS |
❌ Deployment FAILED |
✅ Deployment SUCCESS |
✅ Deployment SUCCESS |
✅ Deployment SUCCESS |
✅ Deployment SUCCESS |
✅ Deployment SUCCESS |
❌ E2E tests FAILED for commit 17d87f6 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-74al9lftj.vercel.app |
❌ E2E tests FAILED for commit 49a7c76 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-pwg9qzct3.vercel.app |
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit 472c850 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-q2nk52j0q.vercel.app |
❌ E2E tests FAILED for commit ebf5ddc previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-hy3j38kbi.vercel.app |
❌ E2E tests FAILED for commit 4bf9482 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-l72b1oare.vercel.app |
✅ Deployment SUCCESS |
❌ E2E tests FAILED for commit 2668f45 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-h5w6r0mfx.vercel.app |
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit 2cc6dcb previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-qafpid34i.vercel.app |
next.config.js
Outdated
@@ -14,6 +15,13 @@ const noRedirectBlacklistedPaths = ['_next', 'api']; // Paths that mustn't have | |||
const publicBasePaths = ['robots', 'static', 'favicon.ico']; // All items (folders, files) under /public directory should be added there, to avoid redirection when an asset isn't found | |||
const noRedirectBasePaths = [...supportedLocales, ...publicBasePaths, ...noRedirectBlacklistedPaths]; // Will disable url rewrite for those items (should contain all supported languages and all public base paths) | |||
const date = new Date(); | |||
const commitInfo = gitCommitInfo(); | |||
const GIT_COMMIT_SHA = process.env.GIT_COMMIT_SHA || (commitInfo && commitInfo.commit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -43,6 +43,8 @@ export const status = async (req: NextApiRequest, res: NextApiResponse): Promise | |||
environment: process.env.NODE_ENV, | |||
preset: process.env.NEXT_PUBLIC_NRN_PRESET, | |||
customerRef: process.env.NEXT_PUBLIC_CUSTOMER_REF, | |||
GIT_COMMIT_SHA: process.env.GIT_COMMIT_SHA, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those don't print anything at https://nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app/api/status
✅ E2E tests SUCCESS for commit 67f2741 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-2bi0erfzi.vercel.app |
❌ E2E tests FAILED for commit 179a2f5 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-2bi0erfzi.vercel.app |
❌ E2E tests FAILED for commit fef67d3 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-2bi0erfzi.vercel.app |
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit ecd1d30 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-fd0g8dbxe.vercel.app |
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit d49a98e previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-r99p1z9cj.vercel.app |
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit 088e920 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-qfopct48a.vercel.app |
@@ -16,18 +16,19 @@ | |||
"deploy:all": "yarn deploy:customer1 && yarn deploy:customer2", | |||
"deploy:all:production": "yarn deploy:customer1:production && yarn deploy:customer2:production", | |||
"deploy:all:all": "yarn deploy:all && yarn deploy:all:production", | |||
"deploy:customer": "yarn vercel:cleanup && vercel --confirm --local-config=vercel.${CUSTOMER_REF}.staging.json --debug", | |||
"deploy:customer:production:simple": "yarn vercel:cleanup && vercel --confirm --local-config=vercel.${CUSTOMER_REF}.production.json --prod --debug", | |||
"deploy:ci:gha": "yarn vercel:cleanup && echo 'XXX - GIT_COMMIT_REF: ' $GIT_COMMIT_REF && echo 'GIT_COMMIT_SHA: ' $GIT_COMMIT_SHA && yarn vercel:deploy --local-config=vercel.${CUSTOMER_REF}.staging.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Demmonius I tried to echo here but don't see those printed on any log. Is that normal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, I'm going to have a look !
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit 8ad5a10 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-r0scdfzih.vercel.app |
✅ Deployment SUCCESS |
✅ Deployment SUCCESS |
✅ E2E tests SUCCESS for commit 064f33b previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-bs6ifnbtt.vercel.app |
❌ E2E tests FAILED for commit 16df616 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-bs6ifnbtt.vercel.app |
…o make a Vercel deployment (#225)
https://app.asana.com/0/1136912812619441/1199380329316502
Make GIT_COMMIT_REF and GIT_COMMIT_SHA available as build environment variables.
Useful if you need to know what git commit hash/branch/tag was used to make a deployment.