Adding a Container Image Repository Artifact

Create a reference to a container image repository type of artifact.

In the build pipeline, to store the Managed Build stage output, you need an OCI Container Registry repository or an Artifact Registry repository.

You must create an artifact reference to point to the repository location containing the build output. Before you create an artifact reference, you must have a DevOps project.

For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.

    1. Open the navigation menu and click Developer Services. Under DevOps, click Projects.
    2. On the DevOps Projects page, select the project for which you want to add an artifact.
    3. On the details page of the project, from the left side, click Artifacts.
    4. On the Artifacts page, click Add artifact.
    5. In the Add artifact panel, provide the following details:
      1. Enter a name for the artifact.
      2. For Type, select Container image repository.
      3. Enter the path of the Container Registry repository.

        For example, <region-key>.ocir.io/<tenancy-namespace>/<repo-name> is the fully qualified path to a repository in Oracle Cloud Infrastructure (OCI) Container Registry.

      4. Select Allow parameterization if you want to replace the placeholders in the artifact content by argument values provided during the deployment.

        For more information, see Configuring Parameters.

      5. (Optional) To add tags to the artifact, click Show tagging options. Tagging is a metadata system that lets you organize and track the resources in your tenancy.

        If you have permissions to create a resource, you also have permissions to add free-form tags to that resource.

        To add a defined tag, you must have permissions to use the tag namespace.

        For more information, see Resource Tags.

    6. Click Add.

    A reference to the container image repository is created.

  • To create a reference to a container image repository type of artifact, Run the create-ocir-artifact command:

    oci devops deploy-artifact create-ocir-artifact

    Required Parameters for the create-ocir-artifact command:

    • --argument-substitution-mode
    • --source-image-uri
    • --artifact-type
    • --project-id

    To get all the commands for deploy-artifact:

    oci devops deploy-artifact -h

    To get help for the create-ocir-artifact command:

    oci devops deploy-artifact create-ocir-artifact -h
  • To create a reference to a container image repository type of artifact, use the CreateDeployArtifact operation. For the deployArtifactType attribute, specify the DOCKER_IMAGE value.