Skip to content

Commit

Permalink
Upload cicd and perf reports to different sftp
Browse files Browse the repository at this point in the history
Upload cicd and perf reports to different sftp hosts, with different users
  • Loading branch information
vmilosevic committed Dec 20, 2024
1 parent 1d3c452 commit 3bfb1ef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
27 changes: 17 additions & 10 deletions .github/actions/collect_data/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ inputs:
repository:
description: "Repository name"
required: true
type: string
run_id:
description: "Pipeline ID to use for data"
required: true
type: string
run_attempt:
description: "Run attempt of the workflow run"
required: true
type: string
sftp_host:
description: "SFTP server hostname"
description: "SFTP server hostname (for cicd reports)"
required: false
type: string
sftp_user:
description: "SFTP server username"
description: "SFTP server username (for cicd reports)"
required: false
sftp_perf_host:
description: "SFTP server hostname (for perf reports)"
required: false
sftp_perf_user:
description: "SFTP server username (for perf reports)"
required: false
type: string
ssh-private-key:
description: "SSH private key"
required: false
type: string

runs:
using: "composite"
Expand Down Expand Up @@ -62,10 +62,17 @@ runs:
echo "${{ inputs.ssh-private-key }}" > id_key
chmod go-rwx id_key
- name: Upload files
- name: Upload CICD reports
if: ${{ inputs.sftp_host != '' }}
shell: bash
run: sftp -oStrictHostKeyChecking=no -i id_key -b ${GITHUB_ACTION_PATH}/sftp-json.txt ${{ inputs.sftp_user }}@${{ inputs.sftp_host }}
run: |
sftp -oStrictHostKeyChecking=no -i id_key -b ${GITHUB_ACTION_PATH}/sftp-cicd.txt ${{ inputs.sftp_user }}@${{ inputs.sftp_host }}
- name: Upload Perf reports
if: ${{ inputs.sftp_perf_host != '' }}
shell: bash
run: |
sftp -oStrictHostKeyChecking=no -i id_key -b ${GITHUB_ACTION_PATH}/sftp-perf.txt ${{ inputs.sftp_perf_user }}@${{ inputs.sftp_perf_host }}
- name: Upload workflow run data, even on failure
if: ${{ !cancelled() }}
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/collect_data/sftp-cicd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
put -r pipeline_*.json
ls -hal
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
put -r pipeline_*.json
put -r benchmark_*.json
ls -hal

0 comments on commit 3bfb1ef

Please sign in to comment.