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

Add option for whether to switch to SFTP mode #28

Open
stevector opened this issue Jun 19, 2019 · 6 comments
Open

Add option for whether to switch to SFTP mode #28

stevector opened this issue Jun 19, 2019 · 6 comments

Comments

@stevector
Copy link
Contributor

stevector commented Jun 19, 2019

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: pantheon-systems/terminus-build-tools-plugin#351

@Farnoosh63
Copy link

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..

@maskedjellybean
Copy link

maskedjellybean commented Jul 14, 2020

Hi @Farnoosh63 , would you mind giving me an example of adding that line to post steps? Thanks!

@maskedjellybean
Copy link

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/[email protected]

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

@stevector stevector changed the title Don't switch environment to sftp mode after push Add option for whether too switch to SFTP mode Jul 20, 2020
@stevector
Copy link
Contributor Author

Hi @maskedjellybean, I think you need to indent post-steps

@maskedjellybean
Copy link

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/[email protected]

@Farnoosh63
Copy link

Mine is the same as @maskedjellybean => terminus connection:set "$TERMINUS_SITE.$TERMINUS_ENV" git

@stevector stevector changed the title Add option for whether too switch to SFTP mode Add option for whether to switch to SFTP mode Dec 31, 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

No branches or pull requests

3 participants