-
Notifications
You must be signed in to change notification settings - Fork 5
fix: MAPDL service in CICD #231
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
Merged
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
f853582
fix: following pymapdl cicd
clatapie 7d85d0e
fix: following pymapdl cicd 2
clatapie db39ee8
fix: using v24.1 MAPDL image
clatapie 3ec6917
fix: removing `DISTRIBUTED_MODE: "dmp"` in CICD
clatapie a5ef6ea
fix: modifying `start_mapdl.sh` file
clatapie cd9b2c9
maint: removing student version
clatapie 323b404
maint: adding additional testing step in CICD
clatapie 772d7ec
fix: CICD
clatapie 036c3cf
maint: removing previous `ansys-mapdl-core` version installed by the …
clatapie 83dfd32
fix: changing MAPDL image version
clatapie 14297f8
maint: using `collect_mapdl_logs.sh` file
clatapie bd06183
fix: update file permissions
clatapie f35c25e
fix: `Display files structure` action in CICD
clatapie af758f0
fix: typo in CICD
clatapie 3e83efb
maint: fix MAPDL logs in CICD
clatapie 3290bc3
fix: homogenizing `MAPDL_INSTANCE` value in CICD
clatapie 2290394
fix: `MAPDL_INSTANCE` value
clatapie f2992c4
maint: adding `PYMAPDL_PORT` env in `ansys/actions`
clatapie f8aeedf
fix: testing an approach
clatapie f1f77a2
maint: reverting some changes
clatapie ee4480e
maint: removing cache
clatapie c002bd6
maint: trying to remove `ex_28`
clatapie cb82364
fix: run_location in `ex_21`
clatapie a67b620
doc: readding èx_28` file
clatapie 94f16fc
fix: CICD and `ex_28`
clatapie 231a3da
fix: using debug mode when launching mapdl
clatapie 7a5b281
fix: adding log file in outputs
clatapie d2b6d22
fix: `ex_28`
clatapie 8b93443
maint: printing pymapdl report
clatapie e458965
fix: attempt to fix CICD
clatapie 5fa7efc
fix: attempt to fix CICD 2
clatapie 9a2fcc4
fix: removing last attempts
clatapie a4cb5fc
maint: removing pyvista settings already defined in `common_jupyter_e…
clatapie 2e1d581
maint: testing the origin of the error
clatapie 59723fd
recovering mapdl log
germa89 f0dfbad
Fixing log.txt
germa89 083bbcd
Adding tests
germa89 faf7c28
test
germa89 7d07926
fix run
germa89 00bfb78
getting mapdl output
germa89 268dab6
restoring
germa89 ab1820f
remove tailing
germa89 5d6cfb5
Printing all
germa89 d810cf9
trying to not redirect.
germa89 8b2fb27
fix: CICD cache
clatapie f6d51e2
maint: using another MAPDL image
clatapie f95f121
maint: MAPDL image version to `v24.1-ubuntu-student`
clatapie 49a9ca3
Not supress output
germa89 e8cf56e
Revert "Not supress output"
germa89 9aac93a
Test ps and container
germa89 baabbc8
changing order
germa89 912c1bb
mIssing pipe
germa89 c109188
Adding waiting for services
germa89 fd90e69
fix: installing dependencies before tests
clatapie 9f7f752
reord dpf
germa89 d2e514e
Merge branch 'fix/mapdl_image_in_cicd' of https://github.com/pyansys/…
germa89 447da52
maint: cleaning environment
clatapie e4459e4
maint: removing DEBUG mode in example
clatapie bef5e5d
Reog and cleaning
germa89 141918c
Merge branches 'fix/mapdl_image_in_cicd' and 'fix/mapdl_image_in_cicd…
germa89 1fc7360
Update .github/workflows/ci_cd.yml
germa89 2da1904
maint: uninstalling previous `ansys-mapdl-core` version in CICD
clatapie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,45 @@ | ||
| #!/bin/bash | ||
| if [[ $MAPDL_VERSION == *"ubuntu"* ]] ; then | ||
| echo "It is an ubuntu based image" | ||
| export FILE=/jobs/file | ||
| export WDIR='/jobs/' | ||
|
|
||
| else | ||
| echo "It is a CentOS based image" | ||
| export FILE=file | ||
| export WDIR="" | ||
|
|
||
| fi; | ||
|
|
||
|
|
||
| mkdir "$LOG_NAMES" && echo "Successfully generated directory $LOG_NAMES" | ||
|
|
||
| #### | ||
| echo "Collecting MAPDL logs..." | ||
|
|
||
| (docker exec "$MAPDL_INSTANCE" /bin/bash -c "mkdir -p /mapdl_logs && echo 'Successfully created directory inside docker container'") || echo "Failed to create a directory inside docker container for logs." | ||
| (docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.out' > /dev/null ;then cp -f /file*.out /mapdl_logs && echo 'Successfully copied out files.'; fi") || echo "Failed to copy the 'out' files into a local file" | ||
| (docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.err' > /dev/null ;then cp -f /file*.err /mapdl_logs && echo 'Successfully copied err files.'; fi") || echo "Failed to copy the 'err' files into a local file" | ||
| (docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.log' > /dev/null ;then cp -f /file*.log /mapdl_logs && echo 'Successfully copied log files.'; fi") || echo "Failed to copy the 'log' files into a local file" | ||
| (docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$WDIR*.crash' > /dev/null ;then cp -f /*.crash /mapdl_logs && echo 'Successfully copied crash files.'; fi") || echo "Failed to copy the 'crash' files into a local file" | ||
|
|
||
| docker cp "$MAPDL_INSTANCE":/mapdl_logs/. ./"$LOG_NAMES"/. || echo "Failed to copy the 'log-build-docs' files into a local directory" | ||
|
|
||
| #### | ||
| echo "Collecting local build logs..." | ||
|
|
||
| echo "Collecting docker run log..." | ||
| cp log.txt ./"$LOG_NAMES"/log.txt || echo "MAPDL run docker log not found." | ||
|
|
||
| echo "Copying docker launch log..." | ||
| cp mapdl_launch.log ./"$LOG_NAMES"/mapdl_launch.log || echo "MAPDL launch docker log not found." | ||
| # cp mapdl_launch_1.log ./"$LOG_NAMES"/mapdl_launch_1.log || echo "MAPDL launch docker log not found." | ||
|
|
||
| echo "Collecting file structure..." | ||
| ls -R > ./"$LOG_NAMES"/files_structure.txt || echo "Failed to copy file structure to a file" | ||
|
|
||
| echo "Collecting docker file structure..." | ||
| docker exec "$MAPDL_INSTANCE" /bin/bash -c "ls -R" > ./"$LOG_NAMES"/docker_files_structure.txt || echo "Failed to copy the docker structure into a local file" | ||
|
|
||
| echo "Tar files..." | ||
| tar cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES" || echo "Failed to compress" |
This file contains hidden or 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,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "::group:: Display files structure" && ls -R && echo "::endgroup::" | ||
|
|
||
|
|
||
| echo "::group:: Display files structure" && docker exec "$MAPDL_INSTANCE" /bin/bash -c "ls -R" && echo "::endgroup::" || echo "Failed to display the docker structure." | ||
|
|
||
|
|
||
| echo "::group:: Display docker run log" && (cat log.txt | echo "The file 'log.txt' has not been generated") && echo "::endgroup::" | ||
|
|
||
| # Displaying MAPDL files | ||
| FILE_PAT=./"$LOG_NAMES"/*.err | ||
| if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Error file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'out' files." | ||
|
|
||
| FILE_PAT=./"$LOG_NAMES"/*.log | ||
| if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Log file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'err' files." | ||
|
|
||
| FILE_PAT=./"$LOG_NAMES"/*.out | ||
| if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Output file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'log' files." | ||
|
|
This file contains hidden or 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 hidden or 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,19 @@ | ||
| #!/bin/bash | ||
| echo "Waiting for the MAPDL service to be up..." | ||
| nc -v -z localhost "$PYMAPDL_PORT" | ||
| echo "::group:: ps aux Output" && ps aux && echo "::endgroup::" | ||
|
|
||
| echo "Waiting for MAPDL port is open..." | ||
| echo "::group:: Waiting for the MAPDL port to be open..." | ||
| while ! nc -z localhost "$PYMAPDL_PORT"; do | ||
| sleep 0.1 | ||
| done | ||
| echo "::endgroup::" | ||
| echo "MAPDL service is up!" | ||
|
|
||
| echo "::group:: Waiting for the DPF port to be open..." | ||
| while ! nc -z localhost "$DPF_PORT"; do | ||
| sleep 0.1 | ||
| done | ||
| echo "::endgroup::" | ||
| echo "DPF service is up!" |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.