pantheon-systems / circleci-orb

Use CircleCI to push code to Pantheon Dev and Multidev Environments
10 stars 18 forks source link

Github to Pantheon stuck with CircleCI #53

Open lucasvm opened 3 years ago

lucasvm commented 3 years ago

Hello all

For some reason my push to Pantheon using CircleCI got stuck at this stage:

 Initialized empty Git repository in /tmp/pantheon_repo/.git/
pantheon    ssh://codeserver.dev.86bd52c6-f874-4f97-b319-25ce381e8c7d@codeserver.dev.86bd52c6-f874-4f97-b319-25ce381e8c7d.drush.in:2222/~/repository.git (fetch)
pantheon    ssh://codeserver.dev.86bd52c6-f874-4f97-b319-25ce381e8c7d@codeserver.dev.86bd52c6-f874-4f97-b319-25ce381e8c7d.drush.in:2222/~/repository.git (push)
Warning: Permanently added '[codeserver.dev.86bd52c6-f874-4f97-b319-25ce381e8c7d.drush.in]:2222,[35.188.167.131]:2222' (RSA) to the list of known hosts.

Not sure why, it just dont pass this stage ..

I have added the terminus token via env variable on CircleCI UI.

And this is my orb:

version: 2.1
workflows:
  version: 2
  just_push:
      jobs:
      - pantheon/push
orbs:
  pantheon: pantheon-systems/pantheon@0.5.1

I have also tried some others settings, i got the deploy process success on CircleCI but i dont see the commit on Pantheon, not sure what im missing, this is my last test:

# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
defaults: &defaults
  docker:
    - image: quay.io/pantheon-public/build-tools-ci:6.x
  working_directory: ~/example_drops_8_composer
  environment:
    #=========================================================================
    # In addition to the environment variables defined in this file, also
    # add the following variables in the Circle CI UI.
    #
    # See: https://circleci.com/docs/2.0/env-vars/
    #
    # TERMINUS_SITE:  Name of the Pantheon site to run tests on, e.g. my_site
    # TERMINUS_TOKEN: The Pantheon machine token
    # GITHUB_TOKEN:   The GitHub personal access token
    # GIT_EMAIL:      The email address to use when making commits
    #
    # TEST_SITE_NAME: The name of the test site to provide when installing.
    # ADMIN_PASSWORD: The admin password to use when installing.
    # ADMIN_EMAIL:    The email address to give the admin when installing.
    #
    # If your Pantheon environments use the security feature to lockdown
    # access with a HTTP Basic Authentication username and password, you may
    # also add any of the following environment variables to target specific
    # Pantheon environments. The value should be URL-encoded and follow the
    # format 'username:password' (without quotes).
    #
    # MULTIDEV_SITE_BASIC_AUTH
    # DEV_SITE_BASIC_AUTH
    # TEST_SITE_BASIC_AUTH
    # LIVE_SITE_BASIC_AUTH
    #
    # If all environments are locked using the same username and password you
    # may instead use the following environment variable in Circle CI UI.
    #
    # SITE_BASIC_AUTH
    #
    #=========================================================================
    TZ: "/usr/share/zoneinfo/America/Los_Angeles"
    TERMINUS_SITE:  ADDEDMYSITE
    TERMINUS_TOKEN: ADDEDMYTOKEN
    TERMINUS_ENV: dev
    # The variables below usually do not need to be modified.

version: 2
jobs:
  configure_env_vars:
    <<: *defaults

    steps:
      - checkout

      - run:
          # Set TERMINUS_ENV and related environment variables.
          # https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment
          name: setup-environment-vars
          command: /build-tools-ci/scripts/set-environment

      - run:
          name: clone-bash-env
          command: cp $BASH_ENV bash_env.txt

      # https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
      - persist_to_workspace:
          root: .
          paths:
            - bash_env.txt

  static_tests:
    <<: *defaults

    steps:
      - checkout

      - restore_cache:
          keys:
            - composer-cache-{{ checksum "composer.lock" }}
            - composer-cache-

  build_php:
    <<: *defaults
    steps:
      - checkout

      - restore_cache:
          keys:
            - composer-cache-{{ checksum "composer.lock" }}
            - composer-cache-
            - vendor-{{ checksum "composer.lock" }}
            - vendor-

      - run:
          # Set TERMINUS_ENV and related environment variables.
          # https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment
          name: setup-environment-vars
          command: /build-tools-ci/scripts/set-environment

      - persist_to_workspace:
          root: .
          paths:
            - web
            - vendor
            - drush

  deploy_to_pantheon:
    <<: *defaults
    steps:
      - checkout

      # Attach the workspace
      - attach_workspace:
          at: /tmp

  composer_lock_updater:
    <<: *defaults
    steps:
      - checkout

      - run:
          # Set TERMINUS_ENV and related environment variables.
          # https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment
          name: setup-environment-vars
          command: /build-tools-ci/scripts/set-environment

      - run:
          name: Authenticate with Terminus
          command: terminus -n auth:login --machine-token="$TERMINUS_TOKEN"

      - run:
          name: run composer lock updater
          command: set -e && terminus project:clu $TERMINUS_SITE

workflows:
  version: 2
  build_deploy_and_test:
    jobs:
      - configure_env_vars
      - static_tests
      - build_php
      - deploy_to_pantheon:
          requires:
            - static_tests
            - build_php

  scheduled_update_check:
    triggers:
       - schedule:
           cron: "0 0 * * *"
           filters:
             branches:
              only:
                - master
    jobs:
      - composer_lock_updater   
orbs:
  pantheon: pantheon-systems/pantheon@0.5.1  
rakeshnimje commented 3 years ago

Facing the same issue.

rakeshnimje commented 3 years ago

Recreated the ssh keys and followed all the steps in readme file. Now, it is working fine.