Make auto scheduling robust #1269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Development | |
| concurrency: | |
| group: development-concurrency | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| jobs: | |
| get-short-sha: | |
| outputs: | |
| tag: ${{ steps.get-tag.outputs.tag }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: get-tag | |
| run: | | |
| SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-8) | |
| echo "tag=$SHA_SHORT" >> "$GITHUB_OUTPUT" | |
| build-and-push-flotilla-components-to-robotics-staging-registry: | |
| name: Build and push flotilla components to robotics dev container registry | |
| needs: get-short-sha | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| matrix: | |
| component: [broker, backend, frontend] | |
| uses: equinor/armada/.github/workflows/build_and_publish_docker_image_to_container_registry.yml@main | |
| with: | |
| registry: roboticsdevacr.azurecr.io | |
| image_name: robotics/flotilla-${{ matrix.component }} | |
| tag: "dev.${{ needs.get-short-sha.outputs.tag }}" | |
| secondary_tag: dev | |
| push_to_ghcr: true | |
| path_to_dockerfile: ${{ matrix.component}}/Dockerfile | |
| path_to_context: ./${{ matrix.component}} | |
| # Authenticate to the registry with a federated credential instead | |
| # of the registry password. The environment below is what the OIDC | |
| # subject binds to on the Azure side. | |
| environment: Development | |
| use_oidc: true | |
| azure_subscription_id: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
| deploy: | |
| name: Update deployment in Development | |
| needs: [build-and-push-flotilla-components-to-robotics-staging-registry, get-short-sha] | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| component: [frontend, backend, broker] | |
| uses: equinor/armada/.github/workflows/update_kubernetes_deployment.yml@main | |
| with: | |
| environment: development | |
| registry: roboticsdevacr.azurecr.io | |
| image_name: robotics/flotilla-${{ matrix.component }} | |
| tag: "dev.${{ needs.get-short-sha.outputs.tag }}" | |
| author_email: ${{ github.event.head_commit.author.email }} | |
| author_name: ${{ github.event.head_commit.author.name }} | |
| infrastructure_repository: equinor/robotics-infrastructure | |
| kustomization_base_path: k8s_kustomize/robotics/overlays | |
| commit_message_service_name: Flotilla | |
| secrets: | |
| deploy_key: ${{ secrets.ROBOTICS_INFRASTRUCTURE_DEPLOY_KEY }} |