Open stevector opened 5 years ago
The link above does not exist or is private. I added terminus connection:set "$TERMINUS_SITE.$TERMINUS_ENV" git
to post steps. Watching this issue for any updates on this request..
Hi @Farnoosh63 , would you mind giving me an example of adding that line to post steps? Thanks!
Here's what I have in .circleci/config.yml
, but CircleCI sees the syntax as incorrect and the build fails:
version: 2.1
workflows:
version: 2
pantheon_push:
jobs:
- pantheon/push:
post-steps:
- run: terminus connection:set "$TERMINUS_SITE.$TERMINUS_ENV" git
orbs:
pantheon: pantheon-systems/pantheon@0.2.0
The build fails with this error:
# ERROR IN CONFIG FILE:
# [#/workflows/pantheon_push] only 1 subschema matches out of 2
# 1. [#/workflows/pantheon_push/jobs/0] 0 subschemas matched instead of one
# | 1. [#/workflows/pantheon_push/jobs/0] expected type: String, found: Mapping
# | | SCHEMA:
# | | type: string
# | | INPUT:
# | | push: null
# | | post-steps:
# | | - run: terminus connection:set \"$TERMINUS_SITE.$TERMINUS_ENV\" git
# | 2. [#/workflows/pantheon_push/jobs/0/post-steps] expected type: Mapping, found: Sequence
# | | SCHEMA:
# | | type: object
# | | INPUT:
# | | - run: terminus connection:set \"$TERMINUS_SITE.$TERMINUS_ENV\" git
Hi @maskedjellybean, I think you need to indent post-steps
Thanks @stevector , that was it! My config.yml
now looks like this:
version: 2.1
workflows:
version: 2
pantheon_push:
jobs:
- pantheon/push:
post-steps:
- run:
name: Reset Development Mode
command: terminus connection:set ${TERMINUS_SITE}.${TERMINUS_ENV} git
orbs:
pantheon: pantheon-systems/pantheon@0.2.0
Mine is the same as @maskedjellybean => terminus connection:set "$TERMINUS_SITE.$TERMINUS_ENV" git
updated issued description:
Switching to SFTP mode after pushing code adds time to the build process and may not be wanted. This would be best addressed by a change in the underlying Terminus Build Tools Plugin: https://github.com/pantheon-systems/terminus-build-tools-plugin/issues/351