add Docker image cleanup (#106)

This commit is contained in:
Max
2021-07-25 21:16:58 +02:00
committed by GitHub
parent 5dab8ee214
commit 5ec0115e8b
3 changed files with 33 additions and 9 deletions

View File

@@ -56,9 +56,9 @@ jobs:
run: docker login ${{ env.DOCKER_SERVER }} -u ${{ env.DOCKER_USER_NAME }} -p ${{ env.DOCKER_USER_PASSWORD }}
- name: build docker image
working-directory: wlan-testing
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }} -f docker/Dockerfile .
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }} -f docker/Dockerfile .
- name: push docker image
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }}
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
test:
@@ -122,7 +122,7 @@ jobs:
spec:
containers:
- name: tests
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }}
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
command:
- /bin/bash
- -x
@@ -280,3 +280,11 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
directory: reports
cleanup:
needs: [ test ]
runs-on: ubuntu-latest
if: always()
steps:
- name: cleanup Docker image
run: curl -u${{ env.DOCKER_USER_NAME }}:${{ env.DOCKER_USER_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-docker-repo/cloud-sdk-nightly/${{ github.run_id }}"

View File

@@ -53,9 +53,9 @@ jobs:
run: docker login ${{ env.DOCKER_SERVER }} -u ${{ env.DOCKER_USER_NAME }} -p ${{ env.DOCKER_USER_PASSWORD }}
- name: build docker image
working-directory: wlan-testing
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }} -f docker/Dockerfile .
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }} -f docker/Dockerfile .
- name: push docker image
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }}
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
# cloudsdk:
# runs-on: ubuntu-latest
@@ -171,7 +171,7 @@ jobs:
spec:
containers:
- name: tests
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }}
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
command:
- /bin/bash
- -x
@@ -329,3 +329,11 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
directory: reports
cleanup:
needs: [ test ]
runs-on: ubuntu-latest
if: always()
steps:
- name: cleanup Docker image
run: curl -u${{ env.DOCKER_USER_NAME }}:${{ env.DOCKER_USER_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-docker-repo/cloud-sdk-nightly/${{ github.run_id }}"

View File

@@ -63,9 +63,9 @@ jobs:
run: docker login ${{ env.DOCKER_SERVER }} -u ${{ env.DOCKER_USER_NAME }} -p ${{ env.DOCKER_USER_PASSWORD }}
- name: build docker image
working-directory: wlan-testing
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }} -f docker/Dockerfile .
run: docker build -t ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }} -f docker/Dockerfile .
- name: push docker image
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }}
run: docker push ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
# cloudsdk:
# runs-on: ubuntu-latest
@@ -180,7 +180,7 @@ jobs:
spec:
containers:
- name: tests
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:pytest-${{ github.run_number }}
image: ${{ env.DOCKER_SERVER }}/cloud-sdk-nightly:${{ github.run_id }}
command:
- /bin/bash
- -x
@@ -340,3 +340,11 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
directory: reports
cleanup:
needs: [ test ]
runs-on: ubuntu-latest
if: always()
steps:
- name: cleanup Docker image
run: curl -u${{ env.DOCKER_USER_NAME }}:${{ env.DOCKER_USER_PASSWORD }} -X DELETE "https://tip.jfrog.io/artifactory/tip-wlan-cloud-docker-repo/cloud-sdk-nightly/${{ github.run_id }}"