From 6ba6a78b12bd1d67f18738cdf52ad8c663e37c53 Mon Sep 17 00:00:00 2001 From: Richard Robert Reitz Date: Thu, 2 Oct 2025 14:14:37 +0200 Subject: [PATCH] feat(edgeconnect): Added sdk action --- .forgejo/workflows/createaction.yaml | 47 --------- .forgejo/workflows/createapp.yaml | 136 --------------------------- .forgejo/workflows/deleteapp.yaml | 116 ----------------------- .forgejo/workflows/deploy.yaml | 16 ++++ EdgeConnectConfig.yaml | 29 ++++++ k8s-deployment.yaml | 39 ++++++++ 6 files changed, 84 insertions(+), 299 deletions(-) delete mode 100644 .forgejo/workflows/createaction.yaml delete mode 100644 .forgejo/workflows/createapp.yaml delete mode 100644 .forgejo/workflows/deleteapp.yaml create mode 100644 .forgejo/workflows/deploy.yaml create mode 100644 EdgeConnectConfig.yaml create mode 100644 k8s-deployment.yaml diff --git a/.forgejo/workflows/createaction.yaml b/.forgejo/workflows/createaction.yaml deleted file mode 100644 index 6405403..0000000 --- a/.forgejo/workflows/createaction.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: createapp - -on: - workflow_dispatch: - inputs: - a_app_region: - type: string - description: "Application Region e.g. EU" - default: EU - required: true - b_app_flavor: - type: string - description: "Application Flavor e.g. EU.small" - default: EU.small - required: true - c_cloudlet: - type: choice - options: - - Amsterdam-OTC - - Hamburg - - Leipzig - - Munich - - Berlin - - Frankfurt - - Magdeburg-OTC - - Bonn - - Magdeburg - - crm-vm-2 - description: "Cloudlet location" - default: Munich - required: true - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - - name: Deploy action - uses: https://edp.buildth.ing/DevFW-CICD/edge-connect-action/deploy@main - id: deploy - with: - region: ${{ inputs.a_app_region }} - flavor: ${{ inputs.b_app_flavor }} - cloudlet: ${{ inputs.c_cloudlet }} - edgexr_platform_username: ${{ secrets.EDGEXR_PLATFORM_USERNAME }} - edgexr_platform_password: ${{ secrets.EDGEXR_PLATFORM_PASSWORD }} diff --git a/.forgejo/workflows/createapp.yaml b/.forgejo/workflows/createapp.yaml deleted file mode 100644 index 52dbab8..0000000 --- a/.forgejo/workflows/createapp.yaml +++ /dev/null @@ -1,136 +0,0 @@ -name: createapp - -on: - workflow_dispatch: - inputs: - a_app_region: - type: string - description: "Application Region e.g. EU" - default: EU - required: true - b_app_flavor: - type: string - description: "Application Flavor e.g. EU.small" - default: EU.small - required: true - c_cloudlet: - type: choice - options: - - Amsterdam-OTC - - Hamburg - - Leipzig - - Munich - - Berlin - - Frankfurt - - Magdeburg-OTC - - Bonn - - Magdeburg - - crm-vm-2 - description: "Cloudlet location" - default: Munich - required: true - -env: - EDGEXR_PLATFORM_USERNAME: ${{ secrets.EDGEXR_PLATFORM_USERNAME }} - EDGEXR_PLATFORM_PASSWORD: ${{ secrets.EDGEXR_PLATFORM_PASSWORD }} - APP_REGION: ${{ inputs.a_app_region }} - APP_FLAVOR: ${{ inputs.b_app_flavor }} - CLOUDLET: ${{ inputs.c_cloudlet }} - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - - name: Repository meta - id: repository - run: | - registry=${{ github.server_url }} - registry=${registry##http*://} - echo "registry=${registry}" >> "$GITHUB_OUTPUT" - echo "registry=${registry}" - repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" - echo "repository=${repository}" >> "$GITHUB_OUTPUT" - echo "repository=${repository}" - - - name: Docker meta - uses: docker/metadata-action@v5 - id: docker - with: - images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }} - - - name: Install Dependencies - run: | - sudo apt update - sudo apt install -y curl jq - - - name: Create Edge Connect App - run: | - set -e - echo login - EDGEXR_TOKEN="$(curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/login -H 'Content-Type: application/json' --data '{"password": "'${EDGEXR_PLATFORM_PASSWORD}'","username": "'${EDGEXR_PLATFORM_USERNAME}'"}' -sSf | jq -r .token)" - - CREATEAPP_JSON=$(cat <> "$GITHUB_OUTPUT" - echo "registry=${registry}" - repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" - echo "repository=${repository}" >> "$GITHUB_OUTPUT" - echo "repository=${repository}" - - - name: Docker meta - uses: docker/metadata-action@v5 - id: docker - with: - images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }} - - - name: Install Dependencies - run: | - sudo apt update - sudo apt install -y curl jq - - - name: Delete Edge Connect App Instance - run: | - set -e - echo login - EDGEXR_TOKEN="$(curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/login -H 'Content-Type: application/json' --data '{"password": "'${EDGEXR_PLATFORM_PASSWORD}'","username": "'${EDGEXR_PLATFORM_USERNAME}'"}' -sSf | jq -r .token)" - - DELETEAPPINSTANCE_JSON=$(cat <