cloudapi: Make container name and tag optional
If the user does not pass a name, use the distribution as a name A provided tag is used only if name is provided. It The tag's default is a generated using UUID to avoid collisions
This commit is contained in:
parent
1847a6ae05
commit
ca32d7b729
4 changed files with 122 additions and 117 deletions
|
|
@ -71,8 +71,7 @@ function createReqFile() {
|
|||
"ref": "${OSTREE_REF}"
|
||||
},
|
||||
"upload_options": {
|
||||
"name": "${DISTRO}-${IMAGE_TYPE}",
|
||||
"tag": "${CI_COMMIT_REF_SLUG}"
|
||||
"name": "${DISTRO}-${IMAGE_TYPE}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -80,10 +79,10 @@ EOF
|
|||
}
|
||||
|
||||
function checkUploadStatusOptions() {
|
||||
local IMAGE_URL
|
||||
IMAGE_URL=$(echo "$UPLOAD_OPTIONS" | jq -r '.url')
|
||||
local IMAGE_URL_WITHOUT_TAG
|
||||
IMAGE_URL_WITHOUT_TAG=$(echo "$UPLOAD_OPTIONS" | jq -r '.url' | awk -F ":" '{print $1}')
|
||||
|
||||
test "${IMAGE_URL}" = "${CI_REGISTRY}/${CI_PROJECT_PATH}/${DISTRO}-${IMAGE_TYPE}:${CI_COMMIT_REF_SLUG}"
|
||||
test "${IMAGE_URL_WITHOUT_TAG}" = "${CI_REGISTRY}/${CI_PROJECT_PATH}/${DISTRO}-${IMAGE_TYPE}"
|
||||
}
|
||||
|
||||
function verify() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue