Skip to content

Commit

Permalink
update docker image prune rules (#2003)
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Sep 12, 2024
1 parent 09d4f2d commit 9c39b42
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .azure-pipelines/template/docker-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ steps:
- ${{ if eq(parameters.dockerConfigName, 'commonDockerConfig') }}:
- script: |
rm -fr ${BUILD_SOURCESDIRECTORY} || sudo rm -fr ${BUILD_SOURCESDIRECTORY} || true
echo y | docker image prune -a
displayName: "Clean workspace"
- checkout: self
Expand All @@ -49,7 +48,6 @@ steps:
rm -fr ${BUILD_SOURCESDIRECTORY} || sudo rm -fr ${BUILD_SOURCESDIRECTORY} || true
mkdir ${BUILD_SOURCESDIRECTORY}
chmod 777 ${BUILD_SOURCESDIRECTORY}
echo y | docker image prune -a
displayName: "Clean workspace"
- checkout: none
Expand All @@ -63,6 +61,7 @@ steps:
- ${{ if eq(parameters.imageSource, 'build') }}:
- script: |
docker image prune -a -f
if [[ ! $(docker images | grep -i ${{ parameters.repoName }}:${{ parameters.repoTag }}) ]]; then
docker build -f ${BUILD_SOURCESDIRECTORY}/.azure-pipelines/docker/${{parameters.dockerFileName}}.devel -t ${{ parameters.repoName }}:${{ parameters.repoTag }} .
fi
Expand Down

0 comments on commit 9c39b42

Please sign in to comment.