generated from feelpp/feelpp-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from feelpp/181-handle-report-deployment
resolves: 181 handle report deployment
- Loading branch information
Showing
12 changed files
with
321 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Benchmark Deploy | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
build_wheel: | ||
runs-on: self-ubuntu-22.04 | ||
name: Build wheel package | ||
if: contains(github.event.pull_request.labels.*.name, 'new-benchmark') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build wheel | ||
run: | | ||
npm install | ||
npx downdoc README.adoc | ||
pip3 wheel --no-deps --wheel-dir dist . | ||
env: | ||
CXX: clang++ | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel-artifacts | ||
path: dist/*.whl | ||
|
||
accepted: | ||
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'new-benchmark') | ||
runs-on: self-ubuntu-22.04 | ||
name: Move to production | ||
needs: build_wheel | ||
steps: | ||
- name: Download wheel | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wheel-artifacts | ||
path: dist | ||
|
||
- name: Create Virtual Environment | ||
run: | | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
pip3 install -r requirements.txt | ||
- name: Download stage reports | ||
run: | | ||
source .venv/bin/activate | ||
source ./girder_deploy_config.sh | ||
girder-download -gid $staging_folder_id -o ./tmp/ -d | ||
env: | ||
GIRDER_API_KEY: ${{ secrets.GIRDER }} | ||
- name: Download Production config | ||
run: | | ||
source .venv/bin/activate | ||
source ./girder_deploy_config.sh | ||
girder-download -gid $production_website_config_id -o ./configs_tmp/ -fn production_config.json | ||
env: | ||
GIRDER_API_KEY: ${{ secrets.GIRDER }} | ||
- name: Merge stage configs | ||
run: | | ||
source .venv/bin/activate | ||
merge-json-configs -fp "./tmp/**/website_config.json" -o ./configs_tmp/stage_config.json -u | ||
- name: Update Stage Config | ||
run: | | ||
source .venv/bin/activate | ||
source ./girder_deploy_config.sh | ||
update-stage-config -stag ./configs_tmp/stage_config.json -prod ./configs_tmp/production_config.json -prodid $production_folder_id | ||
env: | ||
GIRDER_API_KEY: ${{ secrets.GIRDER }} | ||
- name: Merge stage and prod configs | ||
run: | | ||
source .venv/bin/activate | ||
merge-json-configs -fp "./configs_tmp/**/*.json" -o ./configs_tmp/website_config.json | ||
- name: Upload New Website config | ||
run: | | ||
source .venv/bin/activate | ||
source ./girder_deploy_config.sh | ||
girder-upload --item ./configs_tmp/website_config.json --girder_id $production_folder_id | ||
env: | ||
GIRDER_API_KEY: ${{ secrets.GIRDER }} | ||
- name: Cleanup stage folder | ||
run: | | ||
echo "Moving all folders from staging/ to merged/" | ||
source .venv/bin/activate | ||
source ./girder_deploy_config.sh | ||
girder-move -oid $staging_folder_id -nid $accepted_folder_id | ||
env: | ||
GIRDER_API_KEY: ${{ secrets.GIRDER }} | ||
denied: | ||
if: github.event.pull_request.merged == false && contains(github.event.pull_request.labels.*.name, 'new-benchmark') | ||
runs-on: self-ubuntu-22.04 | ||
name: Move to denied | ||
needs: build_wheel | ||
steps: | ||
- name: Download wheel | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wheel-artifacts | ||
path: dist | ||
- name: Create Virtual Environment | ||
run: | | ||
python3 -m venv .venv | ||
source .venv/bin/activate | ||
pip3 install -r requirements.txt | ||
- name: Cleanup stage folder | ||
run: | | ||
echo "Moving all folders from staging/ to denied/" | ||
source .venv/bin/activate | ||
source ./girder_deploy_config.sh | ||
girder-move -oid $staging_folder_id -nid $denied_folder_id | ||
env: | ||
GIRDER_API_KEY: ${{ secrets.GIRDER }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
production_website_config_id=6752f0734c9ccbdde21a48ca | ||
staging_folder_id=6752b5194c9ccbdde21a48b8 | ||
production_folder_id=6752efed4c9ccbdde21a48c7 | ||
accepted_folder_id=67580d534c9ccbdde21a4a75 | ||
denied_folder_id=6752b66d4c9ccbdde21a48b9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.