Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload cicd and perf reports to different sftp #13

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 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 All @@ -52,8 +52,8 @@ runs:
run: |
python3 ${GITHUB_ACTION_PATH}/src/generate_data.py --run_id ${{ inputs.run_id }}
# Workaround: Copy file to avoid GH upload filename limitations
cp pipeline_*.json pipelinecopy_${{ inputs.run_id }}.json
cp benchmark_*.json benchmarkcopy_${{ inputs.run_id }}.json
cp pipeline_*.json pipelinecopy_${{ inputs.run_id }}.json || true
cp benchmark_*.json benchmarkcopy_${{ inputs.run_id }}.json || true

- name: Create key file
if: ${{ inputs.ssh-private-key != '' }}
Expand All @@ -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
Loading