From 892ee2fb4ddce0e5f774c3c2298f997bbc5efd49 Mon Sep 17 00:00:00 2001 From: Samuel Khuvis Date: Fri, 5 Jul 2024 11:07:45 -0700 Subject: [PATCH] Fix image scoring plugin and split github actions into separate jobs --- .github/workflows/docker-image.yml | 255 ++++++++++++++++++++++++++++- 1 file changed, 253 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index fee04ff..de240e3 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,8 +11,7 @@ on: type: string jobs: - docker: - + engine: runs-on: ubuntu-latest environment: main steps: @@ -43,6 +42,30 @@ jobs: push: true tags: tapis/camera_traps_engine:${{ env.TRAPS_REL }} build-args: TRAPS_REL=${{ env.TRAPS_REL }} + + pyevents: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push pyevents uses: docker/build-push-action@v5 with: @@ -50,6 +73,30 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: tapis/pyevents + + pyevents_38: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push pyevents:3.8 uses: docker/build-push-action@v5 with: @@ -58,6 +105,30 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: tapis/pyevents:3.8 + + camera_traps_py: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push camera_traps_py uses: docker/build-push-action@v5 with: @@ -65,6 +136,30 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: tapis/camera_traps_py:${{ env.TRAPS_REL }} + + camera_traps_py_38: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push camera_traps_py_3.8 uses: docker/build-push-action@v5 with: @@ -73,6 +168,36 @@ jobs: platforms: linux/amd64,linux/arm64 push: true tags: tapis/camera_traps_py_3.8:${{ env.TRAPS_REL }} + + image_scoring_plugin_py_38: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Delete extra files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Build and push general image_scoring_plugin uses: docker/build-push-action@v5 with: @@ -82,6 +207,36 @@ jobs: tags: tapis/image_scoring_plugin_py_3.8:${{ env.TRAPS_REL }} build-args: REL=${{ env.TRAPS_REL }} file: external_plugins/image_scoring_plugin/Dockerfile-3.8 + + image_scoring_plugin_py_nano_38: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Delete extra files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" - name: Build and push image_scoring_plugin for nano uses: docker/build-push-action@v5 with: @@ -91,6 +246,30 @@ jobs: tags: tapis/image_scoring_plugin_py_nano_3.8:${{ env.TRAPS_REL }} build-args: REL=${{ env.TRAPS_REL }} file: external_plugins/image_scoring_plugin/Dockerfile-3.8-nano + + image_generating_plugin: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push image_generating_plugin uses: docker/build-push-action@v5 with: @@ -99,6 +278,30 @@ jobs: push: true tags: tapis/image_generating_plugin_py:${{ env.TRAPS_REL }} build-args: REL=${{ env.TRAPS_REL }} + + power_measuring_plugin: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push power_measuring_plugin uses: docker/build-push-action@v5 with: @@ -107,6 +310,30 @@ jobs: push: true tags: tapis/power_measuring_plugin_py:${{ env.TRAPS_REL }} build-args: REL=${{ env.TRAPS_REL }} + + oracle_plugin: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push oracle_plugin uses: docker/build-push-action@v5 with: @@ -115,6 +342,30 @@ jobs: push: true tags: sowbaranika1302/oracle_plugin:${{ env.TRAPS_REL }} build-args: REL=${{ env.TRAPS_REL }} + + custom_install: + runs-on: ubuntu-latest + environment: main + steps: + - name: Set TRAPS_REL + run: | + if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then + TRAPS_REL=${{ inputs.release_tag }} + else + TRAPS_REL=${{ github.event.release.tag_name }} + fi + echo "TRAPS_REL=$TRAPS_REL" >> "$GITHUB_ENV" + - name: Checkout + uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push camera-traps-installer uses: docker/build-push-action@v5 with: