diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 728b67d..4f0bed9 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -26,9 +26,6 @@ jobs: id: docker with: images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }} - tags: | - type=sha,prefix= - type=ref,event=tag - name: Login to registry uses: docker/login-action@v3 @@ -36,6 +33,9 @@ jobs: registry: ${{ steps.repository.outputs.registry }} username: "${{ secrets.PACKAGES_USER }}" password: "${{ secrets.PACKAGES_TOKEN }}" + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -49,4 +49,5 @@ jobs: push: true allow: network.host network: host + platforms: linux/amd64,linux/arm64 tags: ${{ steps.docker.outputs.tags }} diff --git a/.forgejo/workflows/createapp.yaml b/.forgejo/workflows/createapp.yaml new file mode 100644 index 0000000..1e3b470 --- /dev/null +++ b/.forgejo/workflows/createapp.yaml @@ -0,0 +1,78 @@ +name: createapp + +on: + workflow_dispatch: + inputs: + a_app_region: + type: string + description: "Application Region e.g. EU" + default: EU + b_app_flavor: + type: string + description: "Application Flavor e.g. EU.small" + default: EU.small + +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 }} + +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 Curl + run: | + sudo apt update + sudo apt install -y curl jq + - + name: Create edgeXR 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 < - - - - - EDP meets Edge Connect - - - - - -
- - - -
- - -

EDP meets Edge Connect

-
- - - diff --git a/k8s-deployment.yaml b/k8s-deployment.yaml deleted file mode 100644 index 15dd6d6..0000000 --- a/k8s-deployment.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: edgeconnect-coder-tcp - labels: - run: edgeconnect-coder -spec: - type: LoadBalancer - ports: - - name: tcp80 - protocol: TCP - port: 80 - targetPort: 80 - selector: - run: edgeconnect-coder ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: edgeconnect-coder-deployment -spec: - replicas: 1 - selector: - matchLabels: - run: edgeconnect-coder - template: - metadata: - labels: - run: edgeconnect-coder - mexDeployGen: kubernetes-basic - spec: - volumes: - containers: - - name: edgeconnect-coder - image: ###IMAGETAG### - imagePullPolicy: Always - ports: - - containerPort: 80 - protocol: TCP