diff --git a/.github/workflows/lf-production-deploy-new.yaml b/.github/workflows/lf-production-deploy-new.yaml new file mode 100644 index 0000000000..6b4bfe739b --- /dev/null +++ b/.github/workflows/lf-production-deploy-new.yaml @@ -0,0 +1,494 @@ +name: LF Production Deploy New + +on: + workflow_dispatch: + inputs: + deploy_search_sync_worker: + description: Deploy search-sync-worker service? + required: true + type: boolean + deploy_search_sync_api: + description: Deploy search-sync-api service? + required: true + type: boolean + deploy_integration_sync_worker: + description: Deploy integration-sync-worker service? + required: true + type: boolean + deploy_webhook_api: + description: Deploy webhook-api service? + required: true + type: boolean + deploy_automations_worker: + description: Deploy automations-worker service? + required: true + type: boolean + deploy_emails_worker: + description: Deploy emails-worker service? + required: true + type: boolean + deploy_profiles_worker: + description: Deploy profiles-worker service? + required: true + type: boolean + deploy_members_enrichment_worker: + description: Deploy members-enrichment-worker service? + required: true + type: boolean + deploy_merge_suggestions_worker: + description: Deploy merge-suggestions-worker service? + required: true + type: boolean + deploy_entity_merging_worker: + description: Deploy entity-merging-worker service? + required: true + type: boolean + deploy_script_executor: + description: Deploy script-executor service? + required: true + type: boolean + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.LF_PRODUCTION_CLUSTER_NAME }} + CROWD_ROLE_ARN: ${{ secrets.LF_PRODUCTION_CLUSTER_ROLE_ARN }} + AWS_ACCESS_KEY_ID: ${{ secrets.LF_AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.LF_AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.LF_AWS_REGION }} + SLACK_CHANNEL: deploys-lf + SLACK_WEBHOOK: ${{ secrets.LF_PRODUCTION_SLACK_CHANNEL_HOOK }} + +jobs: + build-and-push-search-sync-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: search-sync-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-search-sync-api: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_api }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: search-sync-api + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-integration-sync-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_sync_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: integration-sync-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-webhook-api: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_webhook_api }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: webhook-api + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-automations-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_automations_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: automations-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-emails-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_emails_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: emails-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-profiles-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_profiles_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: profiles-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-members-enrichment-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_members_enrichment_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: members-enrichment-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-merge-suggestions-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_merge_suggestions_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: merge-suggestions-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-entity-merging-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_entity_merging_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: entity-merging-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-script-executor: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_script_executor }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: script-executor + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-search-sync-worker: + needs: build-and-push-search-sync-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: search-sync-worker + image: ${{ needs.build-and-push-search-sync-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: lfx_prod + prioritized: true + + deploy-search-sync-api: + needs: build-and-push-search-sync-api + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_api }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: search-sync-api + image: ${{ needs.build-and-push-search-sync-api.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-integration-sync-worker: + needs: build-and-push-integration-sync-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_sync_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: integration-sync-worker + image: ${{ needs.build-and-push-integration-sync-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: lfx_prod + prioritized: true + + deploy-webhook-api: + needs: build-and-push-webhook-api + runs-on: ubuntu-latest + if: ${{ inputs.deploy_webhook_api }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: webhook-api + image: ${{ needs.build-and-push-webhook-api.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-automations-worker: + needs: build-and-push-automations-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_automations_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: automations-worker + image: ${{ needs.build-and-push-automations-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-emails-worker: + needs: build-and-push-emails-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_emails_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: emails-worker + image: ${{ needs.build-and-push-emails-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-profiles-worker: + needs: build-and-push-profiles-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_profiles_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: profiles-worker + image: ${{ needs.build-and-push-profiles-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-members-enrichment-worker: + needs: build-and-push-members-enrichment-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_members_enrichment_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: members-enrichment-worker + image: ${{ needs.build-and-push-members-enrichment-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-merge-suggestions-worker: + needs: build-and-push-merge-suggestions-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_merge_suggestions_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: merge-suggestions-worker + image: ${{ needs.build-and-push-merge-suggestions-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-entity-merging-worker: + needs: build-and-push-entity-merging-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_entity_merging_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: entity-merging-worker + image: ${{ needs.build-and-push-entity-merging-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-script-executor: + needs: build-and-push-script-executor + runs-on: ubuntu-latest + if: ${{ inputs.deploy_script_executor }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: script-executor + image: ${{ needs.build-and-push-script-executor.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} \ No newline at end of file diff --git a/.github/workflows/production-deploy-new.yaml b/.github/workflows/production-deploy-new.yaml new file mode 100644 index 0000000000..fd42e4b582 --- /dev/null +++ b/.github/workflows/production-deploy-new.yaml @@ -0,0 +1,494 @@ +name: Production Deploy New + +on: + workflow_dispatch: + inputs: + deploy_search_sync_worker: + description: Deploy search-sync-worker service? + required: true + type: boolean + deploy_search_sync_api: + description: Deploy search-sync-api service? + required: true + type: boolean + deploy_integration_sync_worker: + description: Deploy integration-sync-worker service? + required: true + type: boolean + deploy_webhook_api: + description: Deploy webhook-api service? + required: true + type: boolean + deploy_automations_worker: + description: Deploy automations-worker service? + required: true + type: boolean + deploy_emails_worker: + description: Deploy emails-worker service? + required: true + type: boolean + deploy_profiles_worker: + description: Deploy profiles-worker service? + required: true + type: boolean + deploy_members_enrichment_worker: + description: Deploy members-enrichment-worker service? + required: true + type: boolean + deploy_merge_suggestions_worker: + description: Deploy merge-suggestions-worker service? + required: true + type: boolean + deploy_entity_merging_worker: + description: Deploy entity-merging-worker service? + required: true + type: boolean + deploy_script_executor: + description: Deploy script-executor service? + required: true + type: boolean + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.PRODUCTION_CLUSTER_NAME }} + CROWD_ROLE_ARN: ${{ secrets.PRODUCTION_CLUSTER_ROLE_ARN }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + SLACK_CHANNEL: deploys + SLACK_WEBHOOK: ${{ secrets.PRODUCTION_SLACK_CHANNEL_HOOK }} + +jobs: + build-and-push-search-sync-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: search-sync-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-search-sync-api: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_api }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: search-sync-api + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-integration-sync-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_sync_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: integration-sync-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-webhook-api: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_webhook_api }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: webhook-api + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-automations-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_automations_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: automations-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-emails-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_emails_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: emails-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-profiles-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_profiles_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: profiles-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-members-enrichment-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_members_enrichment_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: members-enrichment-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-merge-suggestions-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_merge_suggestions_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: merge-suggestions-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-entity-merging-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_entity_merging_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: entity-merging-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-script-executor: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_script_executor }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: script-executor + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-search-sync-worker: + needs: build-and-push-search-sync-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: search-sync-worker + image: ${{ needs.build-and-push-search-sync-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-search-sync-api: + needs: build-and-push-search-sync-api + runs-on: ubuntu-latest + if: ${{ inputs.deploy_search_sync_api }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: search-sync-api + image: ${{ needs.build-and-push-search-sync-api.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-integration-sync-worker: + needs: build-and-push-integration-sync-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_sync_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: integration-sync-worker + image: ${{ needs.build-and-push-integration-sync-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-webhook-api: + needs: build-and-push-webhook-api + runs-on: ubuntu-latest + if: ${{ inputs.deploy_webhook_api }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: webhook-api + image: ${{ needs.build-and-push-webhook-api.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-automations-worker: + needs: build-and-push-automations-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_automations_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: automations-worker + image: ${{ needs.build-and-push-automations-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-emails-worker: + needs: build-and-push-emails-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_emails_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: emails-worker + image: ${{ needs.build-and-push-emails-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-profiles-worker: + needs: build-and-push-profiles-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_profiles_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: profiles-worker + image: ${{ needs.build-and-push-profiles-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-members-enrichment-worker: + needs: build-and-push-members-enrichment-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_members_enrichment_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: members-enrichment-worker + image: ${{ needs.build-and-push-members-enrichment-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-merge-suggestions-worker: + needs: build-and-push-merge-suggestions-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_merge_suggestions_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: merge-suggestions-worker + image: ${{ needs.build-and-push-merge-suggestions-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-entity-merging-worker: + needs: build-and-push-entity-merging-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_entity_merging_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: entity-merging-worker + image: ${{ needs.build-and-push-entity-merging-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-script-executor: + needs: build-and-push-script-executor + runs-on: ubuntu-latest + if: ${{ inputs.deploy_script_executor }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: script-executor + image: ${{ needs.build-and-push-script-executor.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} \ No newline at end of file diff --git a/.github/workflows/production-deploy-original.yaml b/.github/workflows/production-deploy-original.yaml new file mode 100644 index 0000000000..eb26636eb1 --- /dev/null +++ b/.github/workflows/production-deploy-original.yaml @@ -0,0 +1,393 @@ +name: Production Deploy Original + +on: + workflow_dispatch: + inputs: + deploy_api: + description: Deploy api service? + required: true + type: boolean + deploy_job_generator: + description: Deploy job-generator service? + required: true + type: boolean + deploy_nodejs_worker: + description: Deploy nodejs-worker service? + required: true + type: boolean + deploy_discord_ws: + description: Deploy discord-ws service? + required: true + type: boolean + deploy_integration_run_worker: + description: Deploy integration-run-worker service? + required: true + type: boolean + deploy_integration_stream_worker: + description: Deploy integration-stream-worker service? + required: true + type: boolean + deploy_integration_data_worker: + description: Deploy integration-data-worker service? + required: true + type: boolean + deploy_data_sink_worker: + description: Deploy data-sink-worker service? + required: true + type: boolean + deploy_python_worker: + description: Deploy python-worker service? + required: true + type: boolean + deploy_frontend: + description: Deploy frontend? + required: true + type: boolean + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.PRODUCTION_CLUSTER_NAME }} + CROWD_ROLE_ARN: ${{ secrets.PRODUCTION_CLUSTER_ROLE_ARN }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + SLACK_CHANNEL: deploys + SLACK_WEBHOOK: ${{ secrets.PRODUCTION_SLACK_CHANNEL_HOOK }} + +jobs: + build-and-push-backend: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_api || inputs.deploy_job_generator || inputs.deploy_nodejs_worker || inputs.deploy_discord_ws }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: backend + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-integration-run-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_run_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: integration-run-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-integration-stream-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_stream_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: integration-stream-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-integration-data-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_data_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: integration-data-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-data-sink-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_data_sink_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: data-sink-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-frontend: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_frontend }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: frontend + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + build-and-push-python-worker: + runs-on: ubuntu-latest + if: ${{ inputs.deploy_python_worker }} + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: python-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-api: + needs: build-and-push-backend + runs-on: ubuntu-latest + if: ${{ inputs.deploy_api }} + defaults: + run: + shell: bash + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: api + image: ${{ needs.build-and-push-backend.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-nodejs-worker: + needs: build-and-push-backend + runs-on: ubuntu-latest + if: ${{ inputs.deploy_nodejs_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: nodejs-worker + image: ${{ needs.build-and-push-backend.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-discord-ws: + needs: build-and-push-backend + runs-on: ubuntu-latest + if: ${{ inputs.deploy_discord_ws }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: discord-ws + image: ${{ needs.build-and-push-backend.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-job-generator: + needs: build-and-push-backend + runs-on: ubuntu-latest + if: ${{ inputs.deploy_job_generator }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: job-generator + image: ${{ needs.build-and-push-backend.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-integration-run-worker: + needs: build-and-push-integration-run-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_run_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: integration-run-worker + image: ${{ needs.build-and-push-integration-run-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-integration-stream-worker: + needs: build-and-push-integration-stream-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_stream_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: integration-stream-worker + image: ${{ needs.build-and-push-integration-stream-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-integration-data-worker: + needs: build-and-push-integration-data-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_integration_data_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: integration-data-worker + image: ${{ needs.build-and-push-integration-data-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-data-sink-worker: + needs: build-and-push-data-sink-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_data_sink_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: data-sink-worker + image: ${{ needs.build-and-push-data-sink-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + cloud_env: prod + prioritized: true + + deploy-frontend: + needs: build-and-push-frontend + runs-on: ubuntu-latest + if: ${{ inputs.deploy_frontend }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: frontend + image: ${{ needs.build-and-push-frontend.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-python-worker: + needs: build-and-push-python-worker + runs-on: ubuntu-latest + if: ${{ inputs.deploy_python_worker }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: python-worker + image: ${{ needs.build-and-push-python-worker.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} \ No newline at end of file diff --git a/.github/workflows/production-deploy.yaml b/.github/workflows/test-custom-action.yaml similarity index 100% rename from .github/workflows/production-deploy.yaml rename to .github/workflows/test-custom-action.yaml