An alpine image with the Platform.sh CLI installed.
docker run -it -e PLATFORMSH_CLI_TOKEN millerrs/platformsh-cli
- Install Jenkins SSH Agent Plugin
- Add your ssh key and Platform.sh token in the global credentials section of Jenkins (instructions)
- 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'
}
}
}