Uploading an Artifact in Artifact Registry
The method that you use to upload an artifact to Artifact Registry depends on the size of the artifact file.
- File size less than 200 MB
-
- Oracle Cloud Console (recommended)
- OCI CLI in Cloud Shell
- OCI CLI in a local environment
- REST API
- File size 200 MB to 4 GB
-
- OCI CLI in Cloud Shell (recommended)
- OCI CLI in a local environment
- REST API
- File size greater than 4 GB
-
- OCI CLI in a local environment (recommended)
- REST API
Tip
If an artifact file size is greater than 200 MB, you can't use the Console to upload that artifact, but you can copy the CLI command for uploading that artifact from the Console. To get a generated CLI command, see the following steps for uploading an artifact in the Console.
If an artifact file size is greater than 200 MB, you can't use the Console to upload that artifact, but you can copy the CLI command for uploading that artifact from the Console. To get a generated CLI command, see the following steps for uploading an artifact in the Console.
Upload artifacts to Artifact Registry repositories by using the Command Line Reference for Artifact Registry.
To upload an artifact into a repository in Artifact Registry, use the
artifacts generic artifact
resource.Get all the commands for
artifacts generic artifact
:oci artifacts generic artifact -h
Get help for the
upload-by-path
command:oci artifacts generic artifact upload-by-path -h
Find the required options:
--repository-id
--artifact-path
(user-defined path to organize artifact in repository)--artifact-version
(user-defined version)--content-body
(path to artifact in your local environment)
Upload an artifact:
oci artifacts generic artifact upload-by-path --repository-id <repository-OCID> --artifact-path <user-defined-path-for-artifact> --artifact-version <version> --content-body <path-to-artifact-on-local-env>
Example:
oci artifacts generic artifact upload-by-path --repository-id ocid1.artifactrepository.oc1..xxx... --artifact-path project01/my-web-app/artifact-abc --artifact-version 1.0 --content-body <path-to-artifact-on-local-env>
Use the PutGenericArtifactContentByPath operation to upload an artifact in a specific repository.