Skip to content

Conversation

@tzssangglass
Copy link
Contributor

@tzssangglass tzssangglass commented Jun 27, 2022

# ${3} - COS path
coscli -e "${VAR_COS_ENDPOINT}" rm -r -f "cos://${2}/packages/${3}"
coscli -e "${VAR_COS_ENDPOINT}" cp -r "cos://${1}/packages/${3}" "cos://${2}/packages"
coscli -e "${VAR_COS_ENDPOINT}" rm -r -f "cos://${2}/packages/${3}" || true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to make sure it is removed successfully?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently it is not needed, if the folder that needs to be deleted does not exist (e.g. there is no /packages/centos directory in VAR_COS_BUCKET_CI now) then an error will be thrown. The purpose here is to ensure that the directory to be deleted must not exist, either not originally or not after a successful deletion.

@tzssangglass tzssangglass requested a review from bzp2010 June 27, 2022 08:59
@spacewander spacewander merged commit f8a2c7a into api7:master Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants