Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions azure-pipelines/azure-pipelines-viseron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ stages:
docker manifest inspect roflcoopter/viseron:${release_version}
}

echo "Pulling architecture-specific images for version $(viseronVersion)"
docker pull roflcoopter/amd64-viseron:$(viseronVersion)
docker pull roflcoopter/rpi3-viseron:$(viseronVersion)
docker pull roflcoopter/aarch64-viseron:$(viseronVersion)

# Create version tag
echo "Creating and pushing multi-arch manifest for $(viseronVersion)"
create_manifest $(viseronVersion)
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines/templates/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
--build-arg BUILDKIT_INLINE_CACHE=1
--build-arg VISERON_VERSION=$(viseronVersion)
--build-arg VISERON_GIT_COMMIT=$(Build.SourceVersion)
--build-arg NODE_OPTIONS="--max-old-space-size=4096"
--build-arg NODE_OPTIONS="--max-old-space-size=2048"
${{ architecture }}-${{ parameters.image }}
displayName: Build ${{ architecture }}-${{ parameters.image }}
condition: and(succeeded(), eq('${{ parameters.imageNameOnly }}', false))
Expand All @@ -96,7 +96,7 @@ jobs:
--build-arg BUILDKIT_INLINE_CACHE=1
--build-arg VISERON_VERSION=$(viseronVersion)
--build-arg VISERON_GIT_COMMIT=$(Build.SourceVersion)
--build-arg NODE_OPTIONS="--max-old-space-size=4096"
--build-arg NODE_OPTIONS="--max-old-space-size=2048"
${{ parameters.image }}
displayName: Build ${{ parameters.image }}
condition: and(succeeded(), eq('${{ parameters.imageNameOnly }}', true))
Expand Down
13 changes: 12 additions & 1 deletion azure-pipelines/templates/cleanup.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
steps:
- script: |
df -h
displayName: List free space before cleaning
FREE_GB=$(df -BG --output=avail / | tail -1 | tr -d ' G')
echo "Free space: ${FREE_GB}GB"
if [ "${FREE_GB}" -lt 20 ]; then
echo "##vso[task.setvariable variable=needsCleanup]true"
else
echo "##vso[task.setvariable variable=needsCleanup]false"
fi
displayName: Check free space
- script: |
docker rmi -f $(docker images -aq) || true
displayName: Clean up Docker images
condition: eq(variables.needsCleanup, 'true')
- script: |
docker system prune --force --all --volumes || true
displayName: Docker prune
condition: eq(variables.needsCleanup, 'true')
- script: |
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /usr/local/.ghcup || true
sudo rm -rf /opt/hostedtoolcache/CodeQL || true
displayName: Remove unused files
condition: eq(variables.needsCleanup, 'true')
- script: |
df -h
displayName: List free space after cleaning
condition: eq(variables.needsCleanup, 'true')
Loading