/docker-platformsh-cli

An alpine image with the Platform.sh CLI installed.

Primary LanguageDockerfile

Platform.sh CLI

An alpine image with the Platform.sh CLI installed.

Usage

docker run -it -e PLATFORMSH_CLI_TOKEN millerrs/platformsh-cli

Usage in Jenkins Pipeline

  1. Install Jenkins SSH Agent Plugin
  2. Add your ssh key and Platform.sh token in the global credentials section of Jenkins (instructions)
  3. Update the credential and project IDs in the pipeline
stage('Platform.sh') {
    environment {
        PLATFORMSH_CLI_TOKEN = credentials("platform-cli-token")
        PLATFORMSH_PROJECT_ID = 'platform-project-id'
    }
    agent {
        docker {
            image 'millerrs/platformsh-cli'
        }
    }
    steps {
        sshagent(['jenkins-ssh-platform']) {
            sh './run-your-script.sh'
        }
    }
}