Loading .gitlab-ci.yml +7 −5 Original line number Diff line number Diff line Loading @@ -56,7 +56,8 @@ publish-testing-repository: script: - apt update && apt install -y sshpass - | echo "Uploading new files to Testing-new..." set -e echo "Uploading new files to temporary folder Testing-new..." sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P $SFTP_PORT $SFTP_USER@$SFTP_SERVER << EOF mkdir Testing-new put -r vnf-catalog/* Testing-new Loading @@ -68,9 +69,9 @@ publish-testing-repository: rename Testing-new Testing EOF echo "Cleaning up old files..." echo "Cleaning up temporary folder Testing-new..." sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P $SFTP_PORT $SFTP_USER@$SFTP_SERVER << EOF rm -rf Testing-old rmdir Testing-new EOF rules: - if: '$CI_COMMIT_REF_NAME == "master"' # Only in master Loading @@ -89,6 +90,7 @@ publish-ondemand-repository: script: - apt update && apt install -y sshpass - | set -e DESTINATION_FOLDER="${ONDEMAND_DESTINATION_FOLDER:-Stable}" TEMP_FOLDER="${DESTINATION_FOLDER}-new" BACKUP_FOLDER="${DESTINATION_FOLDER}-old" Loading @@ -105,9 +107,9 @@ publish-ondemand-repository: rename $TEMP_FOLDER $DESTINATION_FOLDER EOF echo "Cleaning up old files..." echo "Cleaning up temporary folder $TEMP_FOLDER..." sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P $SFTP_PORT $SFTP_USER@$SFTP_SERVER << EOF rm -rf $BACKUP_FOLDER rmdir $TEMP_FOLDER EOF when: manual # This job is run on demand allow_failure: true Loading Loading
.gitlab-ci.yml +7 −5 Original line number Diff line number Diff line Loading @@ -56,7 +56,8 @@ publish-testing-repository: script: - apt update && apt install -y sshpass - | echo "Uploading new files to Testing-new..." set -e echo "Uploading new files to temporary folder Testing-new..." sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P $SFTP_PORT $SFTP_USER@$SFTP_SERVER << EOF mkdir Testing-new put -r vnf-catalog/* Testing-new Loading @@ -68,9 +69,9 @@ publish-testing-repository: rename Testing-new Testing EOF echo "Cleaning up old files..." echo "Cleaning up temporary folder Testing-new..." sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P $SFTP_PORT $SFTP_USER@$SFTP_SERVER << EOF rm -rf Testing-old rmdir Testing-new EOF rules: - if: '$CI_COMMIT_REF_NAME == "master"' # Only in master Loading @@ -89,6 +90,7 @@ publish-ondemand-repository: script: - apt update && apt install -y sshpass - | set -e DESTINATION_FOLDER="${ONDEMAND_DESTINATION_FOLDER:-Stable}" TEMP_FOLDER="${DESTINATION_FOLDER}-new" BACKUP_FOLDER="${DESTINATION_FOLDER}-old" Loading @@ -105,9 +107,9 @@ publish-ondemand-repository: rename $TEMP_FOLDER $DESTINATION_FOLDER EOF echo "Cleaning up old files..." echo "Cleaning up temporary folder $TEMP_FOLDER..." sshpass -p "$VNF_CATALOG_CREDENTIALS" sftp -o "StrictHostKeyChecking no" -P $SFTP_PORT $SFTP_USER@$SFTP_SERVER << EOF rm -rf $BACKUP_FOLDER rmdir $TEMP_FOLDER EOF when: manual # This job is run on demand allow_failure: true Loading