[Git][ghc/ghc][master] Add .gitlab/README.md with creds instructions
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Thu Jul 4 15:19:10 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00
Add .gitlab/README.md with creds instructions
- - - - -
1 changed file:
- + .gitlab/README.md
Changes:
=====================================
.gitlab/README.md
=====================================
@@ -0,0 +1,36 @@
+# Where the GitLab happens
+
+
+## Updating PERF_NOTES_PUSH_CREDENTIALS
+
+This CI variable is used by test-metrics.sh to push performance data as a git
+note to https://gitlab.haskell.org/ghc/ghc-performance-notes.
+
+The current token will expire on 2025-07-02.
+
+### STEPS
+
+Set and fetch the updated token:
+
+```
+GITLAB_WRITE=<Your Gitlab API token>
+
+one_year_later="$(date --date='1 year' --iso-8601)"
+curl -X POST --header "PRIVATE-TOKEN: $GITLAB_WRITE" -H "Content-Type: application/json" \
+ --data '{"name":"test-metrics.sh", "scopes":["write_repository"], "expires_at":"$one_year_later"}' \
+ https://gitlab.haskell.org/api/v4/projects/117/access_tokens \
+ | jq .token
+```
+
+Update the variable:
+
+```
+GITLAB_WRITE=<Your Gitlab API token>
+
+NEW_VALUE=<Output from the above>
+
+curl --fail-with-body --request PUT --header "PRIVATE-TOKEN: $GITLAB_WRITE" \
+ "https://gitlab.haskell.org/api/v4/projects/1/variables/PERF_NOTES_PUSH_CREDENTIALS" \
+ --form "value=$NEW_VALUE"
+
+```
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fab13100f23dd0fc231c0e8fe8faf237b7d1bbcc
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fab13100f23dd0fc231c0e8fe8faf237b7d1bbcc
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240704/38d06938/attachment-0001.html>
More information about the ghc-commits
mailing list