Skip to content

Commit c79f700

Browse files
committed
feat: allowing new Core Service containers
1 parent 1b806fd commit c79f700

File tree

10 files changed

+324
-179
lines changed

10 files changed

+324
-179
lines changed

.github/workflows/ci_cd.yml

Lines changed: 66 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
PACKAGE_NAME: 'ansys-geometry-core'
1414
DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com'
1515
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
16-
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/ansys/geometry:windows-latest
16+
ANSRV_GEO_IMAGE_DOCS_TAG: ghcr.io/ansys/geometry:windows-latest
1717
ANSRV_GEO_PORT: 700
1818
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
1919
GEO_CONT_NAME: ans_geo
@@ -122,6 +122,10 @@ jobs:
122122
experimental: false
123123
- docker-image: "windows-latest-unstable"
124124
experimental: true
125+
- docker-image: "core-windows-latest"
126+
experimental: false
127+
- docker-image: "core-windows-latest-unstable"
128+
experimental: true
125129

126130
steps:
127131
- uses: actions/checkout@v4
@@ -235,11 +239,11 @@ jobs:
235239
- name: Stop the Geometry service
236240
if: always()
237241
run: |
238-
if ( $env:SKIP_UNSTABLE -match 'false')
242+
if ( ${{ env.SKIP_UNSTABLE }} -match 'false')
239243
{
240-
docker stop $env:GEO_CONT_NAME
241-
docker logs $env:GEO_CONT_NAME
242-
docker rm $env:GEO_CONT_NAME
244+
docker stop ${{ env.GEO_CONT_NAME }}
245+
docker logs ${{ env.GEO_CONT_NAME }}
246+
docker rm ${{ env.GEO_CONT_NAME }}
243247
}
244248
245249
- name: Stop any remaining containers
@@ -274,7 +278,7 @@ jobs:
274278
password: ${{ secrets.GITHUB_TOKEN }}
275279

276280
- name: Download Geometry service container (if needed)
277-
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
281+
run: docker pull ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
278282

279283
- name: Check location of self-hosted runner and define license server accordingly
280284
if: runner.name == 'pygeometry-ci-2'
@@ -290,7 +294,7 @@ jobs:
290294
}
291295
292296
- name: Start Geometry service and verify start
293-
run: docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_WINDOWS_TAG }}
297+
run: docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
294298

295299
- name: Run Ansys documentation building action
296300
uses: ansys/actions/doc-build@v8
@@ -302,9 +306,9 @@ jobs:
302306
- name: Stop the Geometry service
303307
if: always()
304308
run: |
305-
docker stop $env:GEO_CONT_NAME
306-
docker logs $env:GEO_CONT_NAME
307-
docker rm $env:GEO_CONT_NAME
309+
docker stop ${{ env.GEO_CONT_NAME }}
310+
docker logs ${{ env.GEO_CONT_NAME }}
311+
docker rm ${{ env.GEO_CONT_NAME }}
308312
309313
- name: Stop any remaining containers
310314
if: always()
@@ -331,9 +335,9 @@ jobs:
331335
fail-fast: false
332336
matrix:
333337
include:
334-
- docker-image: "linux-latest"
338+
- docker-image: "core-linux-latest"
335339
experimental: false
336-
- docker-image: "linux-latest-unstable"
340+
- docker-image: "core-linux-latest-unstable"
337341
experimental: true
338342

339343
steps:
@@ -403,7 +407,7 @@ jobs:
403407
needs: [smoke-tests]
404408
runs-on: ubuntu-latest
405409
env:
406-
ANSRV_GEO_IMAGE_MINREQS: 'ghcr.io/ansys/geometry:linux-latest'
410+
ANSRV_GEO_IMAGE_MINREQS: 'ghcr.io/ansys/geometry:core-linux-latest'
407411
strategy:
408412
fail-fast: false
409413
matrix:
@@ -481,8 +485,9 @@ jobs:
481485
- name: Download binaries (if conditions met)
482486
if: env.REUSE_LAST_ARTIFACTS == 'false'
483487
run: |
484-
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerWindows.zip --output windows-binaries.zip
485-
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerLinux.zip --output linux-binaries.zip
488+
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerWindows.zip --output windows-dms-binaries.zip
489+
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerCoreWindows.zip --output windows-core-binaries.zip
490+
curl.exe -X GET -H "X-JFrog-Art-Api: ${{ secrets.ARTIFACTORY_KEY }}" ${{ secrets.ARTIFACTORY_URL }}/${{ env.ARTIFACTORY_VERSION }}/DockerCoreLinux.zip --output linux-core-binaries.zip
486491
487492
- name: Reuse last binaries (if conditions met)
488493
if: env.REUSE_LAST_ARTIFACTS == 'true'
@@ -501,21 +506,29 @@ jobs:
501506
git lfs fetch origin --include="$env:PREVIOUS_VERSION/*"
502507
git lfs checkout $env:PREVIOUS_VERSION
503508
# Copy the binaries from the previous version
504-
cp ./$env:PREVIOUS_VERSION/windows-binaries.zip windows-binaries.zip
505-
cp ./$env:PREVIOUS_VERSION/linux-binaries.zip linux-binaries.zip
509+
cp ./$env:PREVIOUS_VERSION/windows-dms-binaries.zip windows-dms-binaries.zip
510+
cp ./$env:PREVIOUS_VERSION/windows-core-binaries.zip windows-core-binaries.zip
511+
cp ./$env:PREVIOUS_VERSION/linux-core-binaries.zip linux-core-binaries.zip
506512
507-
- name: Upload Windows binaries as workflow artifacts
513+
- name: Upload DMS Windows binaries as workflow artifacts
508514
uses: actions/upload-artifact@v4
509515
with:
510-
name: windows-binaries.zip
511-
path: windows-binaries.zip
516+
name: windows-dms-binaries.zip
517+
path: windows-dms-binaries.zip
512518
retention-days: 1
513519

514-
- name: Upload Linux binaries as workflow artifacts
520+
- name: Upload Linux Core service binaries as workflow artifacts
515521
uses: actions/upload-artifact@v4
516522
with:
517-
name: linux-binaries.zip
518-
path: linux-binaries.zip
523+
name: linux-core-binaries.zip
524+
path: linux-core-binaries.zip
525+
retention-days: 1
526+
527+
- name: Upload Windows Core service binaries as workflow artifacts
528+
uses: actions/upload-artifact@v4
529+
with:
530+
name: windows-core-binaries.zip
531+
path: windows-core-binaries.zip
519532
retention-days: 1
520533

521534
- name: Publish the binaries to private repo
@@ -525,8 +538,9 @@ jobs:
525538
$env:VERSION=$env:VERSION_WITH_PREFIX.substring(1)
526539
mkdir $env:VERSION -ErrorAction SilentlyContinue
527540
Remove-Item -Recurse -Force .\$env:VERSION\*
528-
mv windows-binaries.zip .\$env:VERSION\
529-
mv linux-binaries.zip .\$env:VERSION\
541+
mv windows-dms-binaries.zip .\$env:VERSION\
542+
mv windows-core-binaries.zip .\$env:VERSION\
543+
mv linux-core-binaries.zip .\$env:VERSION\
530544
git config user.email ${{ secrets.BINARIES_EMAIL }}
531545
git config user.name ${{ secrets.BINARIES_USERNAME }}
532546
git add *
@@ -537,6 +551,14 @@ jobs:
537551
name: Building Geometry Service - Windows
538552
runs-on: [self-hosted, Windows, pygeometry]
539553
needs: [fetch-release-artifacts]
554+
strategy:
555+
fail-fast: false
556+
matrix:
557+
include:
558+
- mode: "dms"
559+
zip-file: "windows-dms-binaries.zip"
560+
- docker-image: "coreservice"
561+
zip-file: "windows-core-binaries.zip"
540562
steps:
541563
- name: Checkout repository
542564
uses: actions/checkout@v4
@@ -546,16 +568,16 @@ jobs:
546568
with:
547569
python-version: ${{ env.MAIN_PYTHON_VERSION }}
548570

549-
- name: Download Windows binaries
571+
- name: Download Windows binaries for ${{ matrix.mode }}
550572
uses: actions/download-artifact@v4
551573
with:
552-
name: windows-binaries.zip
553-
path: docker/windows-binaries.zip
574+
name: ${{ matrix.zip-file }}
575+
path: docker/${{ matrix.zip-file }}
554576

555577
- name: Build Docker image
556578
working-directory: docker
557579
run: |
558-
docker build -f windows/Dockerfile -t ghcr.io/ansys/geometry:windows-latest-tmp .
580+
docker build -f windows/${{ matrix.mode }}/Dockerfile -t ghcr.io/ansys/geometry:windows-tmp .
559581
560582
- name: Check location of self-hosted runner and define license server accordingly
561583
if: runner.name == 'pygeometry-ci-2'
@@ -564,7 +586,7 @@ jobs:
564586

565587
- name: Launch Geometry service
566588
run: |
567-
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ghcr.io/ansys/geometry:windows-latest-tmp
589+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ghcr.io/ansys/geometry:windows-tmp
568590
569591
- name: Validate connection using PyAnsys Geometry
570592
run: |
@@ -589,14 +611,14 @@ jobs:
589611
- name: "Compressing Windows Dockerfile"
590612
uses: vimtor/[email protected]
591613
with:
592-
files: docker/windows/Dockerfile
593-
dest: windows-dockerfile.zip
614+
files: docker/windows/${{ matrix.mode }}/Dockerfile
615+
dest: windows-${{ matrix.mode }}-dockerfile.zip
594616

595617
- name: Upload Windows Dockerfile
596618
uses: actions/upload-artifact@v4
597619
with:
598-
name: windows-dockerfile.zip
599-
path: windows-dockerfile.zip
620+
name: windows-${{ matrix.mode }}-dockerfile.zip
621+
path: windows-${{ matrix.mode }}-dockerfile.zip
600622
retention-days: 7
601623

602624
- name: Stop the Geometry service
@@ -618,7 +640,7 @@ jobs:
618640
- name: Delete the Docker images (and untagged ones)
619641
if: always()
620642
run: |
621-
docker image rm ghcr.io/ansys/geometry:windows-latest-tmp
643+
docker image rm ghcr.io/ansys/geometry:windows-tmp
622644
docker system prune -f
623645
624646
# =================================================================================================
@@ -641,17 +663,17 @@ jobs:
641663
- name: Download Linux binaries
642664
uses: actions/download-artifact@v4
643665
with:
644-
name: linux-binaries.zip
645-
path: docker/linux-binaries.zip
666+
name: linux-core-binaries.zip
667+
path: docker/linux-core-binaries.zip
646668

647669
- name: Build Docker image
648670
working-directory: docker
649671
run: |
650-
docker build -f linux/Dockerfile -t ghcr.io/ansys/geometry:linux-latest-tmp .
672+
docker build -f linux/Dockerfile -t ghcr.io/ansys/geometry:linux-tmp .
651673
652674
- name: Launch Geometry service
653675
run: |
654-
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ghcr.io/ansys/geometry:linux-latest-tmp
676+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ghcr.io/ansys/geometry:linux-tmp
655677
656678
- name: Validate connection using PyAnsys Geometry
657679
run: |
@@ -679,14 +701,14 @@ jobs:
679701
- name: "Compressing Linux Dockerfile"
680702
uses: vimtor/[email protected]
681703
with:
682-
files: docker/linux/Dockerfile
683-
dest: linux-dockerfile.zip
704+
files: docker/linux/coreservice/Dockerfile
705+
dest: linux-core-dockerfile.zip
684706

685707
- name: Upload Linux Dockerfile
686708
uses: actions/upload-artifact@v4
687709
with:
688-
name: linux-dockerfile.zip
689-
path: linux-dockerfile.zip
710+
name: linux-core-dockerfile.zip
711+
path: linux-core-dockerfile.zip
690712
retention-days: 7
691713

692714
- name: Stop the Geometry service
@@ -717,7 +739,7 @@ jobs:
717739
uses: ansys/actions/release-github@v8
718740
with:
719741
library-name: ${{ env.PACKAGE_NAME }}
720-
additional-artifacts: windows-dockerfile.zip linux-dockerfile.zip
742+
additional-artifacts: windows-dms-dockerfile.zip windows-core-dockerfile.zip linux-core-dockerfile.zip
721743

722744
upload_dev_docs:
723745
name: Upload dev documentation

.github/workflows/docker_ansyslab_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
packages: read
1313

1414
env:
15-
LINUX_STABLE_GHCR: ghcr.io/ansys/geometry:linux-latest
15+
LINUX_STABLE_GHCR: ghcr.io/ansys/geometry:core-linux-latest
1616
LINUX_STABLE_FUJI: azwepsifujiaksacr.azurecr.io/ansys/discovery/geometry:linux-latest
1717

1818
jobs:

.github/workflows/docker_ansyslab_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Upload Windows latest to Ansys Lab
1+
name: Upload Windows latest to Ansys Lab (DMS)
22

33
on:
44
workflow_dispatch:

.github/workflows/docker_cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
with:
2727
package-name: 'geometry'
2828
token: ${{ secrets.GITHUB_TOKEN }}
29-
tags-kept: 'windows-latest, windows-latest-unstable, windows-coreservice, windows-coreservice-unstable, linux-latest, linux-latest-unstable, 24.1, 24.2, 25.1, windows-24.1, windows-24.2, windows-25.1, linux-24.1, linux-24.2, linux-25.1'
29+
tags-kept: 'windows-latest, windows-latest-unstable, core-windows-latest, core-windows-latest-unstable, core-linux-latest, core-linux-latest-unstable, 24.1, 24.2, 25.1, windows-24.1, windows-24.2, windows-25.1, windows-25.2, core-windows-25.2, linux-24.1, linux-24.2, linux-25.1, core-linux-25.2'

.github/workflows/docker_push_stable.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)