https://docs.oracle.com/ja-jp/iaas/Content/artifacts/get-started.htm
-- 1. コンパートメント作成
oci iam compartment create \
--compartment-id ocid1.tenancy.oc1..111111111111111111111111111111111111111111111111111111111111 \
--description cmp01 \
--name cmp01
oci iam compartment list \
--query 'data[?"name"==`'cmp01'`].id | [0]' \
--raw-output
-- 2. リポジトリ作成
oci artifacts repository list \
--compartment-id ocid1.compartment.oc1..111111111111111111111111111111111111111111111111111111111111 \
--all
oci artifacts repository create --generate-full-command-json-input
oci artifacts repository create \
--repository-type GENERIC \
--is-immutable false \
--display-name repo01 \
--compartment-id ocid1.compartment.oc1..111111111111111111111111111111111111111111111111111111111111
oci artifacts repository get \
--repository-id ocid1.artifactrepository.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111
-- 3. アーティファクトのアップロード
echo test > test.txt
oci artifacts generic artifact list \
--compartment-id ocid1.compartment.oc1..111111111111111111111111111111111111111111111111111111111111 \
--repository-id ocid1.artifactrepository.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111 \
--all
oci artifacts generic artifact upload-by-path \
--repository-id ocid1.artifactrepository.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111 \
--artifact-path project01/aaa/bbb \
--artifact-version 1.0 \
--content-body ./test.txt
-- 4. アーティファクトのダウンロード
oci artifacts generic artifact download \
--artifact-id ocid1.genericartifact.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111 \
--file test.log
cat test.log
-- 5. クリーンアップ
アーティファクト削除
oci artifacts generic artifact list \
--compartment-id ocid1.compartment.oc1..111111111111111111111111111111111111111111111111111111111111 \
--repository-id ocid1.artifactrepository.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111 \
--all
oci artifacts generic artifact delete \
--artifact-id ocid1.genericartifact.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111 \
--force
リポジトリ削除
oci artifacts repository list \
--compartment-id ocid1.compartment.oc1..111111111111111111111111111111111111111111111111111111111111 \
--all
oci artifacts repository delete \
--repository-id ocid1.artifactrepository.oc1.iad.0.111111111111111111111111111111111111111111111111111111111111 \
--force
コンパートメント削除
oci iam compartment list \
--query 'data[?"name"==`'cmp01'`].id | [0]' \
--raw-output
oci iam compartment delete \
--compartment-id ocid1.compartment.oc1..111111111111111111111111111111111111111111111111111111111111 \
--force