Skip to content

Commit

Permalink
fix: HTC Mock and Get Throughput actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tschneider-aneo committed Oct 29, 2024
1 parent 4704bb8 commit d092245
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
12 changes: 6 additions & 6 deletions get-throughput/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ inputs:
description: "The amount of seconds the throughtput getter will wait for the session to finish"
required: false
default: "600"
# outputs:
# session-throughput:
# description: "Throughput for the session"
# value: ${{ steps.get-throughput.outputs }}
outputs:
bench-file-path:
description: "JSON with throughput for the session"
value: ${{ steps.get-throughput.outputs.bench-file-path }}
runs:
using: composite
steps:
Expand All @@ -33,5 +33,5 @@ runs:
run: |
set -ex
cd tools/ci/python
pip install requirements.txt
python program.py "$GRPC_CLIENT_ENDPOINT" "$SESSION_NAME" "$POLL_DURATION_LIMIT"
pip install -r requirements.txt
echo "bench-file-path=$(python program.py -n "$SESSION_NAME" --polling-limit "$POLL_DURATION_LIMIT" "$GRPC_CLIENT_ENDPOINT")" >> "$GITHUB_OUTPUT"
17 changes: 12 additions & 5 deletions htcmock/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ inputs:
description: "A name that is provided as the value for key 'SessionName' for the 'HtcMock__Options' option"
required: false
default: "cicd"

purge-data:
description: "Whether to purge session after execution"
required: false
default: "false"
outputs:
session-name:
description: "Name of the HTC Mock session to help retrieve its id"
value: ${{ steps.run.outputs.session-name }}
runs:
using: composite
steps:
Expand All @@ -37,11 +44,11 @@ runs:
SUBTASKS_LEVELS: ${{ inputs.subtasks-levels }}
SESSION_NAME: ${{ inputs.session-name }}
GRPC_CLIENT_ENDPOINT: ${{ inputs.grpc-client-endpoint }}
ARMONIK_KUBERNETES_NAMESPACE: ${{ inputs.armonik-kubernetes-namespace }}
PURGE_DATA: ${{ inputs.purge-data }}
run: |
set -ex
cd tools/ci
echo "session-name=$SESSION_NAME" >> "$GITHUB_OUTPUTS"
sed "s/@@NTASKS@@/$NTASKS/g; s/@@SUBTASKS_LEVELS@@/$SUBTASKS_LEVELS/g; s/@@SESSION_NAME@@/$SESSION_NAME/g; s/@@GRPC_CLIENT_ENDPOINT@@/$GRPC_CLIENT_ENDPOINT/g" \
htcmock-job-template.yml |
echo "session-name=$SESSION_NAME" >> "$GITHUB_OUTPUT"
sed "s/@@ARMONIK_CORE_VERSION@@/$ARMONIK_CORE_VERSION/g; s/@@NTASKS@@/$NTASKS/g; s/@@SUBTASKS_LEVELS@@/$SUBTASKS_LEVELS/g; s/@@SESSION_NAME@@/$SESSION_NAME/g; s/@@GRPC_CLIENT_ENDPOINT@@/$GRPC_CLIENT_ENDPOINT/g; s/@@PURGE_DATA@@/$PURGE_DATA/g" \
${{ inputs.working-directory }}/tools/ci/htcmock-job-template.yml |
kubectl apply -f -

0 comments on commit d092245

Please sign in to comment.