From 9d655676dd422d3945f05aab0c74268b641115e4 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 31 Jan 2022 00:48:38 +0100 Subject: [PATCH] Build the S4U tuto on top of the stable image again --- .github/workflows/docker-stable.yml | 49 ++++++++++++++++++++++++++--- .github/workflows/docker.yml | 38 ---------------------- tools/docker/Dockerfile.tuto-s4u | 2 +- 3 files changed, 45 insertions(+), 44 deletions(-) diff --git a/.github/workflows/docker-stable.yml b/.github/workflows/docker-stable.yml index fbf32ee99e..101decec8f 100644 --- a/.github/workflows/docker-stable.yml +++ b/.github/workflows/docker-stable.yml @@ -43,18 +43,57 @@ jobs: - name: Create the failure Message if: ${{ failure() }} run: | - echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building STABLE docker image! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + ver=$(git describe --tags --abbrev=0) echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building STABLE docker image $ver! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json - name: Create the success Message if: ${{ success() }} run: | - echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker STABLE image built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + ver=$(git describe --tags --abbrev=0) echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker STABLE image $ver built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json - uses: mattermost/action-mattermost-notify@master env: MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} - docker-smpi: + docker-tuto-s4u: + + # the Dockerfile builds upon the docker-unstable image, so add a dependency + needs: docker-unstable + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: build docker tuto-s4u + run: | + cd tools/docker + make tuto-s4u + docker push simgrid/tuto-s4u + - name: Create the failure Message + if: ${{ failure() }} + run: | + ver=$(git describe --tags --abbrev=0) echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker tuto-s4u image $ver! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - name: Create the success Message + if: ${{ success() }} + run: | + ver=$(git describe --tags --abbrev=0) echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker tuto-s4u $ver image built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - uses: mattermost/action-mattermost-notify@master + env: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} + + docker-tuto-smpi: # the Dockerfile builds upon the docker-stable image, so add a dependency needs: docker-stable @@ -84,11 +123,11 @@ jobs: - name: Create the failure Message if: ${{ failure() }} run: | - echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building SMPI docker image on stable docker! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + ver=$(git describe --tags --abbrev=0) echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building SMPI $ver docker image on stable docker! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json - name: Create the success Message if: ${{ success() }} run: | - echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker SMPI stable image built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + ver=$(git describe --tags --abbrev=0) echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker SMPI $ver stable image built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json - uses: mattermost/action-mattermost-notify@master env: MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 66339f5988..830b366996 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -48,44 +48,6 @@ jobs: MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} - docker-tuto-s4u: - - # the Dockerfile builds upon the docker-unstable image, so add a dependency - needs: docker-unstable - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Login against a Docker registry except on PR - # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: build docker tuto-s4u - run: | - cd tools/docker - make tuto-s4u - docker push simgrid/tuto-s4u - - name: Create the failure Message - if: ${{ failure() }} - run: | - echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker tuto-s4u image ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json - - name: Create the success Message - if: ${{ success() }} - run: | - echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker tuto-s4u image built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json - - uses: mattermost/action-mattermost-notify@master - env: - MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} - MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} docker-tuto-mc: diff --git a/tools/docker/Dockerfile.tuto-s4u b/tools/docker/Dockerfile.tuto-s4u index f1f593946d..0c853db43b 100644 --- a/tools/docker/Dockerfile.tuto-s4u +++ b/tools/docker/Dockerfile.tuto-s4u @@ -1,5 +1,5 @@ # Base image -FROM simgrid/unstable +FROM simgrid/stable RUN apt update && apt -y upgrade -- 2.20.1