I am trying to push a docker registry image to CloudFoundry using the Cloud Foundry Plugin. The application fails in the staging step.
I have added registry url and username in manifest.yml file and providing the password in the environment variable as mentioned in cf docs.
Jenkinsfile snippet:
stage ('Dev_Deployment') {
steps{
sh 'export CF_DOCKER_PASSWORD=$USER_CREDENTIALS_PSW'
pushToCloudFoundry(
target: 'https://api.sys.dev.example.io',
credentialsId: 'pcfcreds',
organization: 'pcforg',
cloudSpace: 'pcfspace',
manifestChoice: [manifestFile: 'manifest.yml']
)
}
}
manifest.yml code:
---
applications:
- name: App-1
memory: 1G
instances: 1
host: App-1
disk_quota: 1G
docker:
image: registry-dev.apps.dev.example.io/app-1
username: user1
I expect the docker image to be deployed as an application in PCF.
But I am getting the error in application staging
java.lang.IllegalStateException: Application SpringDemo-3 failed during staging
It actually doesn't consider it as a docker deployment. Rather it considers it as a normal application deployment and searches for the buildpack.
2019-07-08T19:23:14.80+0530 [STG/0] ERR None of the buildpacks detected a compatible application
Are there any sample pipelines where a docker image which is in a secured registry, is being pushed to CloudFoundry?