From 1309cb37def8575cf53717aec54fec95dc34da35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Wed, 6 Dec 2023 11:28:19 +0100 Subject: [PATCH] Remove model-release workflow --- .github/workflows/model-release.yml | 94 ----------------------------- 1 file changed, 94 deletions(-) delete mode 100644 .github/workflows/model-release.yml diff --git a/.github/workflows/model-release.yml b/.github/workflows/model-release.yml deleted file mode 100644 index ae05cb3..0000000 --- a/.github/workflows/model-release.yml +++ /dev/null @@ -1,94 +0,0 @@ ---- -name: "[DEPRECATED] Model release DAG update" - -on: - workflow_call: - inputs: - schedule_interval: - description: | - Schedule interval for the model release. For syntax, check https://airflow.apache.org/docs/apache-airflow/stable/dag-run.html#cron-presets - type: string - required: true - os: - description: "OS version to run the workflow on. If not provided, defaults to 'ubuntu-latest'" - type: string - default: ubuntu-latest - required: false - secrets: - ssh_key: - description: | - SSH key to use to build and test the model. The user of the key must have access to our other private - repositories. - required: true - google_service_account_json: - description: | - Google service account JSON to use for scheduling. - required: true - pypi_username: - description: | - Username to use to log in into our private PyPi server. - required: true - pypi_password: - description: | - Password to use to log in into our private PyPi server. - required: true - -jobs: - model-update-production-dag: - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') # Can only be triggered on tags - runs-on: ${{ inputs.os }} - name: Update model's production DAG - env: - GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.google_service_account_json }} - GOOGLE_APPLICATION_CREDENTIALS: /tmp/service-account.json - steps: - - uses: actions/checkout@v3 - - name: Get the tag name - run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV" - - name: Get tag branch name - run: echo "BRANCH_NAME=release_$TAG" >> "$GITHUB_ENV" - - name: Check upstream branch existence - run: bash -c 'if [[ -z "${{ env.BRANCH_NAME }}" ]]; then exit 1; fi' - - name: Set upstream branch - run: | - git ls-remote --exit-code --heads origin ${{ env.BRANCH_NAME }} - git fetch --all && git checkout ${{ env.BRANCH_NAME }} && git reset --hard origin/${{ env.BRANCH_NAME }} - git branch --set-upstream-to=origin/${{ env.BRANCH_NAME }} ${{ env.BRANCH_NAME }} - - name: Check if the branch is in sync with the default branch # https://stackoverflow.com/a/27940027/2615633 - run: | - BRANCH_CHECK=$(git rev-list --left-right --count origin/${{ github.event.repository.default_branch }}...origin/${{ env.BRANCH_NAME }} | awk '{print $1,$2}') && [[ "$BRANCH_CHECK" == "0 0" ]] - - name: Create Google Authentication JSON - run: | - echo '${{ secrets.google_service_account_json }}' >> "${{ env.GOOGLE_APPLICATION_CREDENTIALS }}" - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Login to GCR - uses: docker/login-action@v1 - with: - registry: eu.gcr.io - username: _json_key - password: ${{ secrets.google_service_account_json }} - - name: Setup SSH - uses: webfactory/ssh-agent@v0.6.0 - with: - ssh-private-key: | - ${{ secrets.ssh_key }} - - name: Configure pip to access our private PyPi repo - run: | - sudo /bin/bash -c "echo $'[global]\n\ - trusted-host = pypi.remerge.io\n\ - pypi.org\n\ - \n\ - index-url = https://pypi.org/simple\n\ - extra-index-url = https://${{ secrets.pypi_username }}:${{ secrets.pypi_password }}@pypi.remerge.io/simple'\ - > /etc/pip.conf" - - name: Install MLEM - run: pipx install mlem - - name: Schedule the DAG # to be updated with the _actual_ schedule command, once it works - run: | - mlem -vvvv schedule pipeline --interval '${{ inputs.schedule_interval }}' --suffix "production.latest_release" - - name: Remove Google Authentication JSON - if: always() - run: | - rm -rf "${{ env.GOOGLE_APPLICATION_CREDENTIALS }}"