copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2021-09-01 |
jobs in code engine, batch jobs in code engine, running jobs with code engine, creating jobs with code engine, images for jobs in code engine, jobs, job run, environment variables |
codeengine |
{: #run-job-source-code}
You can create your job from source code. Find out what advantages are available when you build your image with {{site.data.keyword.codeengineshort}}. {: shortdesc}
Before you begin, plan for your build. You can also find tips for creating a Dockerfile. Each time you run the job, the most current version of the dependent build artifacts, including the buildpacks and container image, are used during the build process and are included in the resulting container image.
{{site.data.keyword.codeengineshort}} can automatically push images to {{site.data.keyword.registryshort}} namespaces in your account and even create a namespace for you. To push images to a different {{site.data.keyword.registryshort}} account or to a private DockerHub account, see Accessing container registries.
- Open the {{site.data.keyword.codeengineshort}}{: external} console.
- Select Start creating from Start from source code.
- Select Job.
- Enter a name for the job. Use a name for your job that is unique within the project.
- Select a project from the list of available projects. You can also create a new one. Note that you must have a selected project to create a job.
- Select Source code.
- Click Specify build details.
- Select a source repository and Branch name, for example,
https://github.com/IBM/CodeEngine
andMain
. Click Next. - Select a strategy for your build and resources for your build. For more information about build options, see Planning your build. Click Next.
- Select a container registry location, such as
IBM Registry, Dallas
. If your registry is private, you must set up access to it. - Select your Registry access. If you are building your image to a {{site.data.keyword.registryshort}} instance that is in your account, you can select
Automatic
. - Select a namespace, name, and a tag for your image.
- Click Done.
- Modify any default values for environment variables or runtime settings. For more information about these options, see Options for creating and running a job.
- Click Create.
Need help? Check out Troubleshooting tips for builds.