Skip to content
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

Merged
merged 32 commits into from
Dec 19, 2020

Conversation

Demmonius
Copy link
Collaborator

@Demmonius Demmonius commented Dec 16, 2020

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.

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 5564706 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-adi6tafdz.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

❌  Deployment FAILED
Commit 49a7c76 failed to deploy to
click to see logs

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 17d87f6 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-8ixpscgcj.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 49a7c76 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-74al9lftj.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit ebf5ddc successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-pwg9qzct3.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 4bf9482 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-hy3j38kbi.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 2668f45 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-l72b1oare.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

❌  E2E tests FAILED for commit 17d87f6 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-74al9lftj.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

❌  E2E tests FAILED for commit 49a7c76 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-pwg9qzct3.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 472c850 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-q2nk52j0q.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  E2E tests SUCCESS for commit 472c850 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-q2nk52j0q.vercel.app

@github-actions
Copy link

❌  E2E tests FAILED for commit ebf5ddc previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-hy3j38kbi.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

❌  E2E tests FAILED for commit 4bf9482 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-l72b1oare.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 4310f87 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-kucxaoe8r.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

❌  E2E tests FAILED for commit 2668f45 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-h5w6r0mfx.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 2cc6dcb successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-qafpid34i.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  E2E tests SUCCESS for commit 2cc6dcb previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-qafpid34i.vercel.app

.github/workflows/deploy-vercel-staging.yml Outdated Show resolved Hide resolved
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of those logs print anything, sometimes it's undefined, sometimes empty

Uploading image.png…

@@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

✅  E2E tests SUCCESS for commit 67f2741 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-2bi0erfzi.vercel.app

@github-actions
Copy link

❌  E2E tests FAILED for commit 179a2f5 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-2bi0erfzi.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

❌  E2E tests FAILED for commit fef67d3 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-2bi0erfzi.vercel.app
Download artifacts (screenshots + videos) from checks section

@github-actions
Copy link

✅  Deployment SUCCESS
Commit ecd1d30 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-fd0g8dbxe.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  E2E tests SUCCESS for commit ecd1d30 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-fd0g8dbxe.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit d49a98e successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-r99p1z9cj.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  E2E tests SUCCESS for commit d49a98e previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-r99p1z9cj.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 088e920 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-qfopct48a.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  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",
Copy link
Member

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?

Copy link
Collaborator Author

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 !

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 8ad5a10 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-r0scdfzih.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  E2E tests SUCCESS for commit 8ad5a10 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-r0scdfzih.vercel.app

@github-actions
Copy link

✅  Deployment SUCCESS
Commit 16df616 successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-dq9xaovi2.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@Vadorequest Vadorequest marked this pull request as ready for review December 19, 2020 15:09
@github-actions
Copy link

✅  Deployment SUCCESS
Commit 064f33b successfully deployed to https://nrn-v2-mst-aptd-at-lcz-sty-c1-bs6ifnbtt.vercel.app
Deployment aliased as nrn-v2-mst-aptd-at-lcz-sty-c1-implement-s.vercel.app

@github-actions
Copy link

✅  E2E tests SUCCESS for commit 064f33b previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-bs6ifnbtt.vercel.app

@Vadorequest Vadorequest changed the title Provide a Git SHA in api/status Provide git commit SHA/branch/tag in api/status Dec 19, 2020
@Vadorequest Vadorequest changed the title Provide git commit SHA/branch/tag in api/status Provide in api/status the git commit metadata (SHA/branch/tag) used to make a Vercel deployment Dec 19, 2020
@Vadorequest Vadorequest merged commit fa6e5ad into v2-mst-aptd-at-lcz-sty Dec 19, 2020
@Vadorequest Vadorequest deleted the implement-sha-commit-in-build branch December 19, 2020 15:16
@github-actions
Copy link

❌  E2E tests FAILED for commit 16df616 previously deployed at https://nrn-v2-mst-aptd-at-lcz-sty-c1-bs6ifnbtt.vercel.app
Download artifacts (screenshots + videos) from checks section

Vadorequest pushed a commit that referenced this pull request Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants