Since the IBM Cloud Foundry Service is getting deprecated real soon, I am in need of migrating my existing apps from Cloud Foundry to IBM Code Engine. I am successful in creating a sample app by following the UI instructions provided in IBM docs using the Dockerfile provided in same page.
Now I have the requirement to automate the following task using the jenkins pipeline jobs.
- Creating/deploying a new sample app in CE environment(dockerfile)
- Update the deployed app on code changes(dockerfile)
- Set up a job to include the environment variables during deployment
I would like to get the CLI command to build and push the sample app dockerfile first, which then followed by other requirements.Quick help on this really appreciated.
First of all, make sure you have correctly setup your IBM Cloud CLI, i.e. the region and resource group match your expected settings.
The CLI and Code Engine plugin will tell in case this is not setup.
Next, make sure you have a project. So either use one that you already have and create a new one.
Similar to the
cf appscommand, you can list the apps you already have:To create an app, use the following command:
There is a tutorial in the docs that covers this topic.
Coming from Cloud Foundry, you might be more interested or familiar with pushing source code rather than building the image or using a pre-existing image. The command looks very similar:
Check the Cloud Foundry to Code Engine migration guide for more details.