Skip to content

chore(deps): update armonik.api to 3.23.0 #971

chore(deps): update armonik.api to 3.23.0

chore(deps): update armonik.api to 3.23.0 #971

Workflow file for this run

name: DeployTest
on:
push:
jobs:
versionning:
name: Versionning
runs-on: ubuntu-latest
outputs:
version: ${{ steps.genver.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Generate Version
id: genver
uses: codacy/[email protected]
with:
minor-identifier: "feat:"
release-branch: release
dev-branch: main
prefix: v
- name: Print version
run: echo VERSION ${{ steps.genver.outputs.version }} >> $GITHUB_STEP_SUMMARY
formatCsharp:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
solution:
- AllSamples.sln
- csharp/native/Demo.sln
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
submodules: true
- name: Install .NET Core
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: 6.x
- name: Install ReSharper
run: |
dotnet tool install -g JetBrains.ReSharper.GlobalTools --version 2022.2.2
- name: Restore
run: |
dotnet restore ${{ matrix.solution }}
- name: Reformat
run: |
jb cleanupcode ${{ matrix.solution }}
- name: Check Diff
run: |
DIFF="$(git diff --name-only)"
if [ -z "$DIFF" ]; then
echo "OK: Format is clean"
else
echo "Error: Format was not clean"
echo "List of files:"
echo "$DIFF"
git diff
exit 1
fi
buildProjects:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
- name: Install .NET Core
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4
with:
dotnet-version: 6.x
- name: Build the package
run: |
dotnet build AllSamples.sln
buildImages:
runs-on: ubuntu-latest
needs:
- versionning
- buildProjects
env:
VERSION: ${{ needs.versionning.outputs.version }}
strategy:
fail-fast: true
matrix:
include:
- img : dockerhubaneo/armonik_demo_helloworld_client
path: ./csharp/native/HelloWorld/Client/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_helloworld_worker
path: ./csharp/native/HelloWorld/Worker/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_multipleresults_client
path: ./csharp/native/MultipleResults/Client/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_multipleresults_worker
path: ./csharp/native/MultipleResults/Worker/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_subtasking_client
path: ./csharp/native/SubTasking/Client/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_subtasking_worker
path: ./csharp/native/SubTasking/Worker/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_linearsubtasking_client
path: ./csharp/native/LinearSubTasking/Client/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_linearsubtasking_worker
path: ./csharp/native/LinearSubTasking/Worker/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_dynamicsubmission_client
path: ./csharp/native/DynamicSubmission/Client/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_dynamicsubmission_worker
path: ./csharp/native/DynamicSubmission/Worker/Dockerfile
ctx: csharp/native/
- img : dockerhubaneo/armonik_demo_java_client
path: ./java/native/HelloWorld/client/Dockerfile
ctx: java/native/HelloWorld/client/
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.ref }}
- name: login
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_LOGIN }} --password-stdin
- name: Build
run: docker build -t ${{ matrix.img }}:$VERSION -f ${{ matrix.path }} ${{ matrix.ctx }}
- name: push
run: docker push ${{ matrix.img }}:$VERSION
testHelloWorld:
runs-on: ubuntu-latest
needs:
- versionning
- buildImages
strategy:
fail-fast: false
matrix:
demo:
- helloworld
- multipleresults
- subtasking
- linearsubtasking
- dynamicsubmission
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.ref }}
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Checkout Infra
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: aneoconsulting/ArmoniK
path: infra
- name: Change version
run: |
cp tools/parameters.tfvars ${{ github.workspace }}/infra/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars
cat ${{ github.workspace }}/infra/versions.tfvars.json | jq --arg version "${{ needs.versionning.outputs.version }}" '.armonik_versions.samples=$version | .armonik_images.samples+=["dockerhubaneo/armonik_demo_helloworld_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_multipleresults_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_subtasking_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_linearsubtasking_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_dynamicsubmission_worker"]' > .versions.tfvars.json
mv .versions.tfvars.json ${{ github.workspace }}/infra/versions.tfvars.json
- id: deploy
name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
working-directory: ${{ github.workspace }}/infra
type: localhost
ext-csharp-version: 0.18.0
core-version: 0.24.4
log-suffix: ${{ matrix.demo }}
- name: Run Demo Client
run: |
export CPIP=$(kubectl get svc control-plane -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)
export CPPort=$(kubectl get svc control-plane -n armonik -o custom-columns="PORT:.spec.ports[*].port" --no-headers=true)
export Grpc__Endpoint=http://$CPIP:$CPPort
docker run --rm dockerhubaneo/armonik_demo_${{ matrix.demo }}_client:${{ needs.versionning.outputs.version }} --endpoint $Grpc__Endpoint --partition ${{ matrix.demo }}
testJavaHelloWorld:
runs-on: ubuntu-latest
needs:
- versionning
- buildImages
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.ref }}
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Checkout Infra
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: aneoconsulting/ArmoniK
path: infra
- name: Change version
run: |
cp tools/parameters.tfvars ${{ github.workspace }}/infra/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars
cat ${{ github.workspace }}/infra/versions.tfvars.json | jq --arg version "${{ needs.versionning.outputs.version }}" '.armonik_versions.samples=$version | .armonik_images.samples+=["dockerhubaneo/armonik_demo_helloworld_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_multipleresults_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_subtasking_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_linearsubtasking_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_dynamicsubmission_worker"]' > .versions.tfvars.json
mv .versions.tfvars.json ${{ github.workspace }}/infra/versions.tfvars.json
- id: deploy
name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
working-directory: ${{ github.workspace }}/infra
type: localhost
ext-csharp-version: 0.18.0
core-version: 0.24.4
log-suffix: javaHelloWorld
- name: Run Demo java Client
run: |
export CPIP=$(kubectl get svc control-plane -n armonik -o custom-columns="IP:.spec.clusterIP" --no-headers=true)
export CPPort=$(kubectl get svc control-plane -n armonik -o custom-columns="PORT:.spec.ports[*].port" --no-headers=true)
export Grpc__Endpoint=http://$CPIP:$CPPort
docker run --rm dockerhubaneo/armonik_demo_java_client:${{ needs.versionning.outputs.version }} --endpoint $Grpc__Endpoint
testInfraWorker:
needs:
- versionning
- buildProjects
strategy:
matrix:
scenario:
- --nbTask 224 --nbInputBytes 4029815 --nbOutputBytes 226016 --workLoadTimeInMs 10
fail-fast: false
runs-on: ubuntu-latest
env:
ARMONIK_SHARED_HOST_PATH: ${{ github.workspace }}/infra/infrastructure/quick-deploy/localhost/all-in-one/data/
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Checkout Infra
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: aneoconsulting/ArmoniK
path: infra
- name: Change version
run: |
cp tools/parameters.tfvars ${{ github.workspace }}/infra/infrastructure/quick-deploy/localhost/all-in-one/parameters.tfvars
cat ${{ github.workspace }}/infra/versions.tfvars.json | jq --arg version "${{ needs.versionning.outputs.version }}" '.armonik_versions.samples=$version | .armonik_images.samples+=["dockerhubaneo/armonik_demo_helloworld_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_multipleresults_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_subtasking_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_linearsubtasking_worker"] | .armonik_images.samples+=["dockerhubaneo/armonik_demo_dynamicsubmission_worker"]' > .versions.tfvars.json
mv .versions.tfvars.json ${{ github.workspace }}/infra/versions.tfvars.json
- id: deploy
name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
working-directory: ${{ github.workspace }}/infra
type: localhost
ext-csharp-version: 0.18.0
core-version: 0.24.4
shared-data-folder: ${{ env.ARMONIK_SHARED_HOST_PATH }}
log-suffix: infraWorker
- name: Run UnifiedAPI
run: |
cd tools/tests
bash -x ./unified_api.sh
- name: Run StressTests
run: |
cd tools/tests
bash -x ./stress-tests.sh -- stressTest ${{ matrix.scenario }}
- name: Copy logs
if: always()
shell: bash
run: |
set -e
mkdir -p /tmp/armoniklogs
sudo find /var/log/pods/ -maxdepth 1 -iname 'armonik_*' -exec cp -rL '{}' /tmp/armoniklogs/ ';'
sudo chown $USER -R /tmp/armoniklogs
find /tmp/armoniklogs -name "*.log"
- name: Store logs
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
if: always()
with:
name: Logs Worker
path: /tmp/armoniklogs/**/*.log
retention-days: 5
- name: Destroy deployment
if: success() || failure()
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
working-directory: ${{ github.workspace }}/infra
type: localhost