vania-janet/multiturn-rag-retrieval-data huggingface dataset:
If the failure happened for a public repository, then update the existing build to use the HTTPS URL of the Git repository, and run the build.



1. Use the [ibmcloud ce build update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-build-update) command to update the build configuration to use the HTTPS URL of the Git repository; for example,

ibmcloud ce build update --name <BUILD_NAME> --source <GIT_REPO>
2. Use the [ibmcloud ce buildrun submit](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-buildrun-submit) command to submit a new build run. For the buildrun submit command, you must specify the --build option to provide the name of your build configuration. You can optionally specify the --name option to provide the name for this build run. If you specify the --name option, make sure that you use a different build run name from the failed build run, or ensure that you delete the failed build run by using the [ibmcloud ce buildrun delete](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-buildrun-delete) command. For example,

ibmcloud ce buildrun submit --build <BUILD_NAME> --name <BUILDRUN_NAME>







 For private repositories 

If the failure happened for a private repository, then create a an SSH secret and use the SSH protocol. An SSH secret contains the credentials to access the private repository that contains the source code to build your container image. An SSH secret is also used as a Git repository access secret. The SSH secret contains a private key while the corresponding public key is stored with your Git repository provider.
If your source is located in a public repository, create a build configuration with settings that include information about where to pull source from a public repository. For the build output, you can choose to specify registry details along with a registry secret to access your built image in the registry. Or, you can choose to let Code Engine take care of building the image for you from your source and storing the image in IBM Cloud Container Registry. For this case, you do not need to specify a registry secret or the location of the image registry.

Creating a build configuration does not create an image, but creates the configuration to build an image. You must then run a build that references the build configuration to create an image. The build configuration is not validated or used to create an image until the build is run. The build configuration enables multiple subsequent builds of an image, such as when changes are applied to the source repository.



 Creating a build configuration from the console (public repo) 



1. Go to the [Code Engine dashboard](https://cloud.ibm.com/codeengine/overview).
2. Select the project where you added your container registry.
3. From the project page, click Image builds.
4. Click Create. The Specify build details side panel opens where you enter the details of your build.
5. In the Source section, enter a name for your build, the URL of your source repository, and your code repo access. If your code is in a public repo, use an HTTPS URL and select None for the code repo access. An example of an HTTPS URL is https://github.com/IBM/CodeEngine. If your code is in a private repo, use an SSH URL for the code repo URL and either select the name of an existing code repo access or [create a code repo access](https://cloud.ibm.com/docs/codeengine?topic=codeengine-code-repositories). An example of an SSH URL is git@github.com:IBM/CodeEngine.git. Optionally, select a source branch name.
If your image exists in Container Registry, you can select from the existing images, or enter a new repository or tag.
8. Click Done to finish the creation of the build.



After you create the build, you must [run the build](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-imagebuild-run).





 Creating a build configuration with the CLI (public repo) 

To create a build configuration with the CLI, use the build create command. For a complete listing of options, see the [ibmcloud ce build create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-build-create) command.

With the build create command, you can choose to let Code Engine take care of building the image from your source for you and then storing the image in IBM Cloud Container Registry. For this automatic access case, you do not need to specify a registry secret or the location of the image registry. Or, you can specify the location for your build image output and provide a registry secret so that Code Engine can access and push the build result to your registry.



 Creating a build configuration with the CLI (with public repo source and automatic access to registry) 

In this scenario, Code Engine builds an image from your public Git repository source, and automatically uploads the image to IBM Cloud Container Registry with automatic access. See [Setting up authorities for image registries](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registryauthorities-registry) for more information about setting required permissions for Code Engine to automatically access these images in Container Registry.

Before you begin



* [Set up your Code Engine CLI environment](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli).
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).





1.
For this automatic access case, you do not need to specify a registry secret or the location of the image registry. Or, you can specify the location for your build image output and provide a registry secret so that Code Engine can access and push the build result to your registry.



 Creating a build configuration with the CLI (with private repo source and automatic access to registry) 

In this scenario, Code Engine builds an image from your private repository source, and automatically uploads the image to IBM Cloud Container Registry. See [Setting up authorities for image registries](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registryauthorities-registry) for more information about setting required permissions for Code Engine to automatically access these images in Container Registry.

Before you begin



* [Set up your Code Engine CLI environment](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli).
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).
* [Create a Git repository secret to access your source](https://cloud.ibm.com/docs/codeengine?topic=codeengine-code-repositories).





1. Create a build configuration to build an image from a private repository and let Code Engine automatically store and access the image. For example, the following build create command creates a build configuration that is called helloworld-build-private that builds from the private Git repo https://github.com/myprivaterepo/builds, and uses the buildpacks strategy and medium build size. Code Engine automatically uploads the image to IBM Cloud Container Registry. Also, because the branch name of the repository is not specified with the --commit option, Code Engine automatically uses the default branch of the specified repository, which is main for this Git repo. By not specifying the location of the image registry or a registry secret, Code Engine pushes the build output to IBM Cloud Container Registry with automatic access.
If you want more control over the build of your image, then you can choose to [build the image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-image) with Code Engine before you deploy your app.
* If you are starting with source code that resides on a local workstation, you can choose to let Code Engine take care of building the image from your source and deploying the app with a single CLI command. In this scenario, Code Engine uploads your image to IBM Cloud® Container Registry. To learn more, see [Deploying your app from local source code with the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-local-source-code). If you want more control over the build of your image, then you can choose to [build the image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-image) with Code Engine before you deploy your app.

For example, you might choose to let Code Engine handle the build of your local source while you evolve the development of your source for the app. Then, after the image is matured, you can update the deployed app to reference the specific image that you want. You can repeat this process as needed.



When you deploy your updated app, the latest version of your referenced container image is downloaded and deployed, unless a tag is specified for the image. If a tag is specified for the image, then the tagged image is used for the deployment.

Looking for more code examples? Check out the [Samples for IBM Cloud Code Engine GitHub repo](https://github.com/IBM/CodeEngine).
Now that you have created your job and [run your job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-run-job), you can view details about your job configuration and job runs from your job page.

Need help? Check out [Troubleshooting tips for builds](https://cloud.ibm.com/docs/codeengine?topic=codeengine-troubleshoot-build).





 Creating your job from repository source code with the CLI 

You can create your job directly from repository source code with the CLI. Use the job create command to both build an image from your Git repository source, and define the configuration for your job.

Before you begin



* Set up your [Code Engine CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli) environment.
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).



In this scenario, Code Engine builds an image from your Git repository source, automatically uploads the image to your container registry, and then creates your job configuration to reference this built image with the job create command. You need to provide only a name for the job and the URL to the Git repository if the image is to be located in an IBM Cloud Container Registry account. In this case, Code Engine manages the namespace for you. However, if you want to use a different container registry, then you must specify the image and a registry access secret for that container registry. Use the ibmcloud ce jobrun submit command to run your job that references the built image. For a complete listing of options, see the [ibmcloud ce job create](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-job-create) and [ibmcloud ce jobrun submit](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-jobrun-submit) commands.
* If you are starting with source code that resides on a local workstation, you can choose to let Code Engine take care of building the image from your source and creating the job with a single CLI command. In this scenario, Code Engine uploads your image to IBM Cloud® Container Registry. To learn more, see [Creating your job from local source code with the CLI](https://cloud.ibm.com/docs/codeengine?topic=codeengine-job-local-source-code). If you want more control over the build of your image, then you can choose to [build the image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-image) with Code Engine before you create (or update) your job and run the job.



For example, you might choose to let Code Engine handle the build of your local source while you evolve the development of your source for the job. Then, after the image is matured, you can update the job to reference the specific image that you want. You can repeat this process as needed.

When you run your updated job, the latest version of your referenced container image is used for the job run, unless a tag is specified for the image. If a tag is specified for the image, then the tagged image is used for the job run.



 Updating a job from the console 

When a job is in ready state, you can update the job. Let's update the myjob job that you created previously to change the container image from icr.io/codeengine/firstjob to icr.io/codeengine/testjob and then subsequently update an environment variable. When a request is sent to this icr.io/codeengine/testjob sample job, the job reads the environment variable TARGET and prints "Hello ${TARGET}!". If this environment variable is empty, "Hello World!" is returned. For more information about the code that is used for this example, see [testjob](https://github.com/IBM/CodeEngine/tree/main/testjob).



1. Navigate to your job page.
Image: private.us.icr.io/ce--6ef04-8aaon2dfwa0/buildrun-helloworld-buildrun
Registry Secret: ce-auto-icr-private-us-south
Build Strategy: dockerfile-medium
Timeout: 10m0s
Source: https://github.com/IBM/CodeEngine
Commit: main
Context Directory: /hello
Dockerfile: Dockerfile







 Running a single build with the CLI (with public repo source and user-provided access to registry) 

In this user-provided access scenario, Code Engine builds an image from your public Git repository source, and then uploads the image to your container registry with the registry access that you provide with a single build command.

Before you begin



* [Set up your Code Engine CLI environment](https://cloud.ibm.com/docs/codeengine?topic=codeengine-install-cli).
* [Create and work with a project](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-project).
* [Create a registry secret so you can save your image](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registry).





1. Run a build to build an image from a public Git repo and specify the location of the image registry for the build output with a registry secret. For example, the following buildrun submit command runs a build run that is called helloworld-buildrun2 that builds from the public Git repo https://github.com/IBM/CodeEngine, and stores the image to the us.icr.io/mynamespace/codeengine-helloworld registry by using the myregistry registry secret to access this registry.
For more information about SSH secrets to access repositories, see [Accessing private code repositories](https://cloud.ibm.com/docs/codeengine?topic=codeengine-code-repositories).



2. After secrets are defined, use the [ibmcloud ce build update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-build-update) command to update the build configuration. If you are referencing an registry secret, specify the name of the secret by using the --registry-secret option with the build update command. If you are referencing an SSH secret to access a private repository that contains the source code to build your container image, specify the --git-repo-secret option with the build update command. For example,

ibmcloud ce build update --name <BUILD_NAME> [--registry-secret <REGISTRY_ACCESS_SECRET>] [--git-repo-secret <GIT_REPO_SECRET>]
3. Use the [ibmcloud ce buildrun submit](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-buildrun-submit) command to submit a new build run. For the buildrun submit command, you must specify the --build option to provide the name of your build configuration. You can optionally specify the --name option to provide the name for this build run. If you specify the --name option, make sure that you use a different build run name from the failed build run, or ensure that you delete the failed build run by using the [ibmcloud ce buildrun delete](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-buildrun-delete) command. For example,

ibmcloud ce buildrun submit --build <BUILD_NAME> --name <BUILDRUN_NAME>
Run 'ibmcloud ce buildrun get -n myapp-local-run-220414-161009244' for details.
[...]



Now that your app is created and deployed from local source code, you can update the app to meet your needs by using the [ibmcloud ce app update](https://cloud.ibm.com/docs/codeengine?topic=codeengine-clicli-application-update) command. For more information about updating apps, see [Updating your app](https://cloud.ibm.com/docs/codeengine?topic=codeengine-update-app). If you want to update your source to use with your app, you must provide the --build-source option on the application update command.

Instead of building your image from local source and deploying your app with a single command, you can choose to build from local source first before you deploy your app. See [Creating a build configuration that pulls source from a local workstation](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-imagebuild-config-local-cli), [Running a build for source from a local workstation](https://cloud.ibm.com/docs/codeengine?topic=codeengine-build-imagebuild-run-cli), and [Deploying applications](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloads).

When your app is deployed from local source or from [repository source code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-app-source-code) from the CLI, the resulting build run is not based on a build configuration. Build runs that complete are ultimately automatically deleted. Build runs that are not based on a build configuration are deleted after 1 hour if the build run is successful. If the build run is not successful, this build run is deleted after 24 hours. You can only display information about this build run with the CLI. You cannot view this build run in the console.
* You can [update your job](https://cloud.ibm.com/docs/codeengine?topic=codeengine-update-job) and its referenced code in any of the following ways, independent of how you created or previously updated your job.



* If you have a container image, per the [Open Container Initiative (OCI) standard](https://opencontainers.org/), then you need to provide only a reference to the image, which points to the location of your container registry when you create (or update) your job. You can create (or update) your job from images in a [public registry](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-job) or [private registry](https://cloud.ibm.com/docs/codeengine?topic=codeengine-create-job-private) and then access the referenced image from your job run.

If you created your job by using the job create command and you specified the --build-source option to build the container image from local or repository source, and you want to change your job to point to a different container image, you must first remove the association of the build from your job. For example, run ibmcloud ce job update -n JOB_NAME --build-clear. After you remove the association of the build from your job, you can update the job to reference a different image.
* If you are starting with source code that resides in a Git repository, you can choose to let Code Engine take care of building the image from your source and creating (or updating) the job with a single operation. In this scenario, Code Engine uploads your image to IBM Cloud® Container Registry. To learn more, see [Creating a job from repository source code](https://cloud.ibm.com/docs/codeengine?topic=codeengine-run-job-source-code).
Updating your app 

An application contains one or more revisions. A revision represents an immutable version of the configuration properties of the application. Each update of an application configuration property creates a new revision of the application.

To create a revision, modify the application. If you are modifying your app, you must provide valid vCPU and memory combinations. For more information about these options, see [Options for deploying an app](https://cloud.ibm.com/docs/codeengine?topic=codeengine-application-workloadsoptionsdeploy)

Code Engine has a quota for the number of apps and app revisions in a project. For more information about limits for projects, see [Project quotas](https://cloud.ibm.com/docs/codeengine?topic=codeengine-limitsproject_quotas). Code Engine retains only the latest inactive revision of your application in addition to your active app revision. Older revisions are deleted.

You can [update your deployed app](https://cloud.ibm.com/docs/codeengine?topic=codeengine-update-app) and its referenced code by using any of the following ways, independent of how you created or previously updated your app:



* If you have a container image, per the [Open Container Initiative (OCI) standard](https://opencontainers.org/), then you need to provide only a reference to the image, which points to the location of your container registry when you deploy your app. You can deploy your app with an image in a [public registry](https://cloud.ibm.com/docs/codeengine?topic=codeengine-deploy-app) or [private registry](https://cloud.ibm.com/docs/codeengine?topic=codeengine-deploy-app-private).

If you created your app by using the app create command and you specified the --build-source option to build the container image from local or repository source, and you want to change your app to point to a different container image, you must first remove the association of the build from your app.
Deploying your app from repository source code 

You can deploy your application directly from source code that is located in a Git repository with the IBM Cloud® Code Engine console and CLI. Find out what advantages are available when you [build your image with Code Engine](https://cloud.ibm.com/docs/codeengine?topic=codeengine-faqsdockerbld-cebuild).



 Deploying your app from repository source code from the console 

You can deploy your application directly from source code with the console.

Before you begin, [plan for your build](https://cloud.ibm.com/docs/codeengine?topic=codeengine-plan-build). You can also find [tips for creating a Dockerfile](https://cloud.ibm.com/docs/codeengine?topic=codeengine-dockerfile).

Code Engine can automatically push (upload) images to IBM Cloud® Container Registry namespaces in your account and even create a namespace for you. To upload images to a different Container Registry account or to a private Docker Hub account, see [Accessing container registries](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registry).

For information about required permissions for accessing image registries, see [Setting up authorities for image registries](https://cloud.ibm.com/docs/codeengine?topic=codeengine-add-registryauthorities-registry).



1. Open the [Code Engine](https://cloud.ibm.com/codeengine/overview) console.
2. Select Start creating from Start from source code.
3. Select Application.
4. Enter a name for the application. Use a name for your application that is unique within the project.
5. Select a project from the list of available projects. You can also [create a new one](https://cloud.ibm.com/docs/codeengine?topic=codeengine-manage-projectcreate-a-project).