diff --git a/.drone.yml b/.drone.yml index 1200d8c40ec2c..fcc5360d28f84 100644 --- a/.drone.yml +++ b/.drone.yml @@ -229,21 +229,29 @@ steps: environment: WEB_SERVER: from_secret: webserver - FTP_SERVER: - from_secret: ftpserver - FTP_USERNAME: - from_secret: ftpusername - FTP_PASSWORD: - from_secret: ftppassword + FTP_KEY: + from_secret: ftp_key + FTP_USER: + from_secret: ftp_user + FTP_HOST: + from_secret: ftp_host + ARTIFACTS_ROOT: + from_secret: artifacts_root GITHUB_TOKEN: from_secret: github_token commands: - - export PLUGIN_DEST_DIR=/artifacts/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER - - echo https://$WEB_SERVER$PLUGIN_DEST_DIR - - rclone config create artifacts ftp host $FTP_SERVER user $FTP_USERNAME port 21 pass $FTP_PASSWORD - - rclone mkdir artifacts:$PLUGIN_DEST_DIR - - rclone copy tests/System/output/ artifacts:$PLUGIN_DEST_DIR - - 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://$WEB_SERVER$PLUGIN_DEST_DIR\"}" > /dev/null' + - export PLUGIN_DEST_DIR=$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER + - echo https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR + - mkdir -p ~/.ssh + - eval $(ssh-agent -s) + - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config + - echo "$FTP_KEY" > ~/.ssh/id_rsa + - chmod 600 ~/.ssh/id_rsa + - ssh-add + - rclone config create artifacts sftp host $FTP_HOST user $FTP_USER port 22 + - rclone mkdir artifacts:$ARTIFACTS_ROOT/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER + - rclone copy tests/System/output/ artifacts:$ARTIFACTS_ROOT/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER + - 'curl -X POST "https://api.github.com/repos/$DRONE_REPO/statuses/$DRONE_COMMIT" -H "Content-Type: application/json" -H "Authorization: token $GITHUB_TOKEN" -d "{\"state\":\"failure\", \"context\": \"Artifacts from Failure\", \"description\": \"You can find artifacts from the failure of the build here:\", \"target_url\": \"https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR\"}" > /dev/null' when: status: - failure @@ -407,6 +415,6 @@ trigger: --- kind: signature -hmac: 6ff990776397b763388e15c484c14359c5fab51fa2f9e51b9542cb4ae4f936d0 +hmac: 90d71e1cf5e5dcdb753ea1da6f8b6e571fc82a47994bd856e83c5f30bdd4a2af ...