Skip to content

Commit

Permalink
add builddate output
Browse files Browse the repository at this point in the history
  • Loading branch information
dipinknair committed Mar 28, 2024
1 parent f82f3d1 commit b3147e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
docs:
name: Documentation
needs: [style, doc-style]
runs-on: ubuntu-latest
runs-on: public-ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v4

Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci_cd_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jobs:

nightly-doc-build:
name: Documentation building
runs-on: ubuntu-latest
runs-on: public-ubuntu-latest-8-cores
outputs:
docker_info: ${{ steps.capture_info.outputs.docker_info }}
build_info: ${{ steps.capture_info.outputs.build_info }}
steps:
- uses: actions/checkout@v4

Expand All @@ -42,8 +43,8 @@ jobs:

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y nodejs npm graphviz
apt-get update
apt-get install -y nodejs npm graphviz
npm install -g @mermaid-js/mermaid-cli
- name: Install Python dependencies
Expand All @@ -66,12 +67,15 @@ jobs:
echo CPU info
lscpu
docker pull ${{ env.MECHANICAL_IMAGE }}
BUILD_DATE=$(docker run --rm -it --entrypoint head ${{ env.MECHANICAL_IMAGE }} -n 1 /install/ansys_inc/v242/aisol/CommonFiles/builddate.txt)
docker run --restart always --name ${{ env.DOCKER_MECH_CONTAINER_NAME }} -e ANSYSLMD_LICENSE_FILE=1055@${{ env.LICENSE_SERVER }} -p ${{ env.PYMECHANICAL_PORT }}:10000 ${{ env.MECHANICAL_IMAGE }} > log.txt &
grep -q 'WB Initialize Done' <(timeout 60 tail -f log.txt)
PUSHED_AT=$(docker inspect --format='{{.Created}}' ${{ env.MECHANICAL_IMAGE }})
echo "::group::Docker Info"
echo "docker_info=${{ env.DOCKER_IMAGE_VERSION }} was pushed at: $PUSHED_AT" >> $GITHUB_OUTPUT
echo "docker_info=$PUSHED_AT" >> $GITHUB_OUTPUT
echo "build_info=$BUILD_DATE" >> $GITHUB_OUTPUT
echo "${{ env.DOCKER_IMAGE_VERSION }} pushed at $PUSHED_AT"
echo "Buil date : $PUSHED_AT"
echo "::endgroup::"
- name: Build HTML documentation
Expand Down Expand Up @@ -107,6 +111,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
notification-summary: Nightly build failure on ${{ needs.nightly-doc-build.outputs.docker_info }}
notification-summary: Nightly build failure on ${{ env.MECHANICAL_IMAGE }} build on ${{ needs.nightly-doc-build.outputs.build_info }} , pushed at ${{ needs.nightly-doc-build.outputs.docker_info }} (UTC)
notification-color: dc3545
timezone: America/Chicago

0 comments on commit b3147e8

Please sign in to comment.