From 3bfb1ef14a46a632c74240db20960abcfe0f71b3 Mon Sep 17 00:00:00 2001 From: Vladimir Milosevic Date: Fri, 20 Dec 2024 11:38:00 +0000 Subject: [PATCH] Upload cicd and perf reports to different sftp Upload cicd and perf reports to different sftp hosts, with different users --- .github/actions/collect_data/action.yml | 27 ++++++++++++------- .github/actions/collect_data/sftp-cicd.txt | 2 ++ .../{sftp-json.txt => sftp-perf.txt} | 1 - 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 .github/actions/collect_data/sftp-cicd.txt rename .github/actions/collect_data/{sftp-json.txt => sftp-perf.txt} (58%) diff --git a/.github/actions/collect_data/action.yml b/.github/actions/collect_data/action.yml index ef783de..3d667ec 100644 --- a/.github/actions/collect_data/action.yml +++ b/.github/actions/collect_data/action.yml @@ -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" @@ -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() }} diff --git a/.github/actions/collect_data/sftp-cicd.txt b/.github/actions/collect_data/sftp-cicd.txt new file mode 100644 index 0000000..8bb0486 --- /dev/null +++ b/.github/actions/collect_data/sftp-cicd.txt @@ -0,0 +1,2 @@ +put -r pipeline_*.json +ls -hal diff --git a/.github/actions/collect_data/sftp-json.txt b/.github/actions/collect_data/sftp-perf.txt similarity index 58% rename from .github/actions/collect_data/sftp-json.txt rename to .github/actions/collect_data/sftp-perf.txt index 4c415f3..761c598 100644 --- a/.github/actions/collect_data/sftp-json.txt +++ b/.github/actions/collect_data/sftp-perf.txt @@ -1,3 +1,2 @@ -put -r pipeline_*.json put -r benchmark_*.json ls -hal