mirror of https://github.com/joomla/joomla-cms.git
Drone: Switching to key authentication for artifacts (#43236)
This commit is contained in:
parent
b8d58e7fa8
commit
6966a8c78d
34
.drone.yml
34
.drone.yml
|
@ -311,21 +311,29 @@ steps:
|
||||||
environment:
|
environment:
|
||||||
WEB_SERVER:
|
WEB_SERVER:
|
||||||
from_secret: webserver
|
from_secret: webserver
|
||||||
FTP_SERVER:
|
FTP_KEY:
|
||||||
from_secret: ftpserver
|
from_secret: ftp_key
|
||||||
FTP_USERNAME:
|
FTP_USER:
|
||||||
from_secret: ftpusername
|
from_secret: ftp_user
|
||||||
FTP_PASSWORD:
|
FTP_HOST:
|
||||||
from_secret: ftppassword
|
from_secret: ftp_host
|
||||||
|
ARTIFACTS_ROOT:
|
||||||
|
from_secret: artifacts_root
|
||||||
GITHUB_TOKEN:
|
GITHUB_TOKEN:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
commands:
|
commands:
|
||||||
- export PLUGIN_DEST_DIR=/artifacts/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
|
- export PLUGIN_DEST_DIR=$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
|
||||||
- echo https://$WEB_SERVER$PLUGIN_DEST_DIR
|
- echo https://$WEB_SERVER/drone/$PLUGIN_DEST_DIR
|
||||||
- rclone config create artifacts ftp host $FTP_SERVER user $FTP_USERNAME port 21 pass $FTP_PASSWORD
|
- mkdir -p ~/.ssh
|
||||||
- rclone mkdir artifacts:$PLUGIN_DEST_DIR
|
- eval $(ssh-agent -s)
|
||||||
- rclone copy tests/System/output/ artifacts:$PLUGIN_DEST_DIR
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||||
- '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'
|
- 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:
|
when:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
|
@ -496,6 +504,6 @@ trigger:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: ca3d5f3a6e39270f147f8f02ca4bc4cca7050f7ab2bcaf0258426e0089cfef5b
|
hmac: 0bb4fab35202cd25de338d26dd2f6afa715103eb3317778cbad6cde75ec987d9
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in New Issue