Skip to content

Commit 623f4c4

Browse files
authored
Use Terminus CLU (#203)
* Use Terminus CLU for CircleCI * Use Terminus CLU for GitLab * Exit on errors for BitBucket CLU job
1 parent ecc8d39 commit 623f4c4

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,13 @@ jobs:
217217
name: setup-environment-vars
218218
command: /build-tools-ci/scripts/set-environment
219219

220+
- run:
221+
name: Authenticate with Terminus
222+
command: terminus -n auth:login --machine-token="$TERMINUS_TOKEN"
223+
220224
- run:
221225
name: run composer lock updater
222-
command: set -e && clu https://${GITHUB_TOKEN}:[email protected]/${CI_PROJECT_USERNAME}/${CI_PROJECT_REPONAME}.git | sed -e "s/${GITHUB_TOKEN}/[REDACTED]/g"
226+
command: set -e && terminus project:clu $TERMINUS_SITE
223227

224228
workflows:
225229
version: 2

.gitlab-ci.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,7 @@ test:behat:cleanup:
155155

156156
schedule:composer:update:
157157
stage: updates
158-
variables:
159-
# The default set of CI credentials do not contain the necessary permissions in GitLab for our operations.
160-
LAB_CORE_TOKEN: $GITLAB_TOKEN
161-
LAB_CORE_USER: $CI_REGISTRY_USER
162-
LAB_CORE_HOST: "https://$CI_SERVER_HOST"
163-
GIT_STRATEGY: none
164158
script:
165-
# The default repository URL uses a token without permission to write so replace it with ours.
166-
- FULL_REPOSITORY_URL=$(sed 's|'"$CI_JOB_TOKEN"'|'"$GITLAB_TOKEN"'|' <<< "$CI_REPOSITORY_URL")
167-
# lab tries to use CI variables with improper permissions.
168-
- unset CI_PROJECT_URL
169-
- unset CI_REGISTRY_USER
170-
- unset CI_JOB_TOKEN
171-
- set -e && clu --provider=gitlab $FULL_REPOSITORY_URL
159+
- set -e && terminus project:clu $TERMINUS_SITE
172160
only:
173161
- schedules

bitbucket-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,4 @@ pipelines:
127127
- export CI_PROJECT_NAME=$BITBUCKET_REPO_FULL_NAME && echo $CI_PROJECT_NAME
128128
- /build-tools-ci/scripts/set-environment
129129
- terminus -n auth:login --machine-token="$TERMINUS_TOKEN"
130-
- terminus project:clu $TERMINUS_SITE
130+
- set -e && terminus project:clu $TERMINUS_SITE

0 commit comments

Comments
 (0)