You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -729,7 +729,7 @@ To enable deployment of Pantheon Review Apps (Multidev environments per pull req
729
729
-`PANTHEON_CLONE_FROM` (optional) The environment to clone from when creating multidev sites. Defaults to 'live'
730
730
-`PANTHEON_SKIP_WIPE_MULTIDEV` (optional) Set to 'true' to skip wiping the multidev environment on each push, preserving its database state. Defaults to 'false'
731
731
- Add the following [secrets to your GitHub repository](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-development-environment-secrets-for-your-repository-or-organization#adding-secrets-for-a-repository):
732
-
-`PANTHEON_TERMINUS_TOKEN` See https://pantheon.io/docs/terminus/install#machine-token
732
+
-`TERMINUS_MACHINE_TOKEN` See https://pantheon.io/docs/terminus/install#machine-token (`PANTHEON_TERMINUS_TOKEN` is also accepted for backwards compatibility)
733
733
-`SSH_PRIVATE_KEY` A private key of a user which can push to Pantheon
734
734
-`SSH_KNOWN_HOSTS` The result of running `ssh-keyscan -H -p 2222 codeserver.dev.$PANTHEON_SITE_ID.drush.in`
735
735
-`PANTHEON_REVIEW_USERNAME` (optional) A username for HTTP basic auth
@@ -885,7 +885,7 @@ To enable deployment of Pantheon Review Apps (Multidev environments per merge re
885
885
-`PANTHEON_SITE_NAME` The canonical site name in Pantheon
886
886
-`PANTHEON_SITE_ID` The Pantheon site UUID, used to construct the SSH remote URL
887
887
-`PANTHEON_GIT_REMOTE` The Pantheon git remote URL e.g. `ssh://codeserver.dev.$PANTHEON_SITE_ID@codeserver.dev.$PANTHEON_SITE_ID.drush.in:2222/~/repository.git`
888
-
-`PANTHEON_TERMINUS_TOKEN` See https://pantheon.io/docs/terminus/install#machine-token (enable the _Mask variable_ checkbox)
888
+
-`TERMINUS_MACHINE_TOKEN` See https://pantheon.io/docs/terminus/install#machine-token (enable the _Mask variable_ checkbox). `PANTHEON_TERMINUS_TOKEN` is also accepted for backwards compatibility.
889
889
-`SSH_PRIVATE_KEY` A private key of a user which can push to Pantheon (enable the _Mask variable_ checkbox)
890
890
-`SSH_KNOWN_HOSTS` The result of running `ssh-keyscan -H -p 2222 codeserver.dev.$PANTHEON_SITE_ID.drush.in` (enable the _Mask variable_ checkbox)
891
891
-`GIT_EMAIL` Email address to use for git commits
@@ -945,7 +945,7 @@ Additionally, Pantheon integration can be added:
945
945
}
946
946
```
947
947
948
-
This will install [Terminus](https://docs.pantheon.io/terminus) in the Tugboat environment. Add `PANTHEON_TOKEN` as a [Tugboat environment variable](https://docs.tugboatqa.com/setting-up-tugboat/select-repo-settings/#set-environment-variables) and set `PANTHEON_SITE_ID` in your `Taskfile.yml` vars. Then add a `sync:tugboat` task to fetch the database during Tugboat preview builds:
948
+
This will install [Terminus](https://docs.pantheon.io/terminus) in the Tugboat environment. Add `TERMINUS_MACHINE_TOKEN` as a [Tugboat environment variable](https://docs.tugboatqa.com/setting-up-tugboat/select-repo-settings/#set-environment-variables) (`PANTHEON_TERMINUS_TOKEN` and `PANTHEON_TOKEN` are also accepted for backwards compatibility), and set `PANTHEON_SITE_ID` in your `Taskfile.yml` vars. Then add a `sync:tugboat` task to fetch the database during Tugboat preview builds:
Copy file name to clipboardExpand all lines: tasks/pantheon.yml
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,22 @@ tasks:
5
5
desc: "Authenticates with Pantheon"
6
6
silent: true
7
7
cmds:
8
-
- if [ -z "$PANTHEON_TOKEN" ]; then echo "❌ PANTHEON_TOKEN is not set. Add it to ~/.ddev/global_config.yaml (web-environment) or your project .env file."; exit 1; fi
9
-
- echo "⚡ Authorizing with Pantheon..."
10
-
- terminus auth:login --machine-token="$PANTHEON_TOKEN" >/dev/null 2>&1 || { echo "❌ Authentication failed. Check PANTHEON_TOKEN in ~/.ddev/global_config.yaml or your project .env file."; exit 1; }
11
-
- echo "✅ Authentication successful."
8
+
- |
9
+
if [ -n "$TERMINUS_MACHINE_TOKEN" ]; then
10
+
_PANTHEON_AUTH_TOKEN="$TERMINUS_MACHINE_TOKEN"
11
+
elif [ -n "$PANTHEON_TERMINUS_TOKEN" ]; then
12
+
echo "⚠️ PANTHEON_TERMINUS_TOKEN is deprecated. Please use TERMINUS_MACHINE_TOKEN instead."
13
+
_PANTHEON_AUTH_TOKEN="$PANTHEON_TERMINUS_TOKEN"
14
+
elif [ -n "$PANTHEON_TOKEN" ]; then
15
+
echo "⚠️ PANTHEON_TOKEN is deprecated. Please use TERMINUS_MACHINE_TOKEN instead."
16
+
_PANTHEON_AUTH_TOKEN="$PANTHEON_TOKEN"
17
+
else
18
+
echo "❌ No Pantheon token found. Set TERMINUS_MACHINE_TOKEN in ~/.ddev/global_config.yaml (web-environment) or your project .env file."
19
+
exit 1
20
+
fi
21
+
echo "⚡ Authorizing with Pantheon..."
22
+
terminus auth:login --machine-token="$_PANTHEON_AUTH_TOKEN" >/dev/null 2>&1 || { echo "❌ Authentication failed. Check your Pantheon token in ~/.ddev/global_config.yaml or your project .env file."; exit 1; }
0 commit comments