From 15ab587c10d01240a3422a3b2de35ec386bf1ddb Mon Sep 17 00:00:00 2001 From: Adrien Chapelet Date: Tue, 1 Oct 2024 16:12:59 +0200 Subject: [PATCH] fix: add PR to build all Dockers --- .github/workflows/dockers_builder.yml | 75 ++++++++++++++------------- .github/workflows/workflow.yml | 1 + docker/debian11/Dockerfile-master | 3 +- docker/debian8/Dockerfile-master | 3 +- 4 files changed, 43 insertions(+), 39 deletions(-) diff --git a/.github/workflows/dockers_builder.yml b/.github/workflows/dockers_builder.yml index 8e92dbc3df..3ab41b0406 100644 --- a/.github/workflows/dockers_builder.yml +++ b/.github/workflows/dockers_builder.yml @@ -1,6 +1,7 @@ name: Build Navitia Dockers on: + pull_request: push: branches: - dev @@ -185,7 +186,7 @@ jobs: - name: Create navitia images run: | echo "********* Building Tyr Web ***************" - docker build -t navitia/$component --build-arg GITHUB_TOKEN=${{ steps.ci-core-app-token.outputs.token }} -f docker/debian11/Dockerfile-tyr-web . + docker build -t navitia/tyr-web --build-arg GITHUB_TOKEN=${{ steps.ci-core-app-token.outputs.token }} -f docker/debian11/Dockerfile-tyr-web . - name: Push dev images on SBX ECR if: github.ref == 'refs/heads/dev' @@ -414,46 +415,46 @@ jobs: rm -rf ./.??* - publish_aws: - runs-on: [self-hosted, corefront, sandbox] - name: Aws Dispatch (Dev) - needs: [debian8_front_images, debian8_back_images, debian11_images, common_variables] - steps: - - name: Generate token for aws images - id: app-token - uses: getsentry/action-github-app-token@v2.0.0 - with: - app_id: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_ID }} - private_key: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_PEM }} - - - name: Aws Dispatch Frontend for dev - if: github.ref == 'refs/heads/dev' - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ steps.app-token.outputs.token }} - repository: hove-io/corefront-aws-assets - event-type: build-trigger - client-payload: '{"branch": "dev", "tag": "dev"}' - - - name: Aws Dispatch Frontend for release - if: startsWith(github.ref, 'refs/tags/') - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ steps.app-token.outputs.token }} - repository: hove-io/corefront-aws-assets - event-type: build-trigger - client-payload: '{"branch": "release", "tag": "${{ needs.common_variables.outputs.RELEASE_TAG }}"}' - - - name: failure notification - if: failure() - run: | - sudo apt update && sudo apt install -y httpie - echo '{"text":":warning: Github Actions: dockers_builder the job publish_aws failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}} + # publish_aws: + # runs-on: [self-hosted, corefront, sandbox] + # name: Aws Dispatch (Dev) + # needs: [debian8_front_images, debian8_back_images, debian11_images, common_variables] + # steps: + # - name: Generate token for aws images + # id: app-token + # uses: getsentry/action-github-app-token@v2.0.0 + # with: + # app_id: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_ID }} + # private_key: ${{ secrets.GA_OS_WORKFLOW_TRIGGER_APP_PEM }} + + # - name: Aws Dispatch Frontend for dev + # if: github.ref == 'refs/heads/dev' + # uses: peter-evans/repository-dispatch@v2 + # with: + # token: ${{ steps.app-token.outputs.token }} + # repository: hove-io/corefront-aws-assets + # event-type: build-trigger + # client-payload: '{"branch": "dev", "tag": "dev"}' + + # - name: Aws Dispatch Frontend for release + # if: startsWith(github.ref, 'refs/tags/') + # uses: peter-evans/repository-dispatch@v2 + # with: + # token: ${{ steps.app-token.outputs.token }} + # repository: hove-io/corefront-aws-assets + # event-type: build-trigger + # client-payload: '{"branch": "release", "tag": "${{ needs.common_variables.outputs.RELEASE_TAG }}"}' + + # - name: failure notification + # if: failure() + # run: | + # sudo apt update && sudo apt install -y httpie + # echo '{"text":":warning: Github Actions: dockers_builder the job publish_aws failed !"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}} run_artemis: runs-on: [self-hosted, corefront, sandbox] - needs: [publish_aws] + needs: [debian11_back_images, debian11_front_images] name: Run artemis Dispatch (Dev) if: github.ref == 'refs/heads/dev' steps: diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6fbe971ce0..0bdbb17637 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -156,6 +156,7 @@ jobs: if: ${{ matrix.os.docker_image == 'mutable-debian8_dev'}} run: | apt remove --yes cmake + apt install wget -y mkdir local_bin cd local_bin wget https://cmake.org/files/v3.18/cmake-3.18.6-Linux-x86_64.tar.gz diff --git a/docker/debian11/Dockerfile-master b/docker/debian11/Dockerfile-master index cb50d5735b..9b8eab2ba9 100644 --- a/docker/debian11/Dockerfile-master +++ b/docker/debian11/Dockerfile-master @@ -12,7 +12,8 @@ RUN apt-get install -y --force-yes ca-certificates \ postgresql-client \ netcat \ dh-python \ - curl + curl \ + wget COPY docker/ca-certificates/*.crt /usr/local/share/ca-certificates/ RUN update-ca-certificates diff --git a/docker/debian8/Dockerfile-master b/docker/debian8/Dockerfile-master index d628fdac3e..97772eaa96 100755 --- a/docker/debian8/Dockerfile-master +++ b/docker/debian8/Dockerfile-master @@ -12,7 +12,8 @@ RUN apt-get install -y --force-yes ca-certificates \ postgresql-client \ netcat \ dh-python \ - curl + curl \ + wget COPY docker/ca-certificates/*.crt /usr/local/share/ca-certificates/ RUN update-ca-certificates