Skip to content

Commit

Permalink
generate executor.json
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrickTench committed Aug 23, 2024
1 parent d91b91a commit 8703ebd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
cp previous-junit.xml ./allure-results/
fi
python scripts/generate_allure_environment.py ${{ github.sha }} ${{ github.ref_name }} > ./allure-results/environment.properties
python scripts/generate_allure_executor.py ${{ github.server_url }} ${{ github.repository }} ${{ github.run_id }} > ./allure-results/executor.json
- name: Generate Allure Report
run: |
Expand Down
15 changes: 15 additions & 0 deletions scripts/generate_allure_executor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import sys, json

if __name__ == "__main__":
if len(sys.argv) != 4:
print("Usage: python scripts/generate_allure_executor.py <server-url> <repo> <run-id>")
sys.exit(1)

server_url = sys.argv[1]
repo = sys.argv[2]
run_id = sys.argv[3]
data = { 'name':'GitHub Actions', 'type':'github' }
data['buildUrl'] = '{}/{}/actions/runs/{}'.format(server_url, repo, run_id)
data['buildName'] = 'GitHub Actions Run #{}'.format(run_id)

print(json.dumps(data))

0 comments on commit 8703ebd

Please sign in to comment.