-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup docker images / workflow (#215)
Motivation: Docker images can be quite large, lets try to cleanup things we not need. Modifications: Cleanup things during docker image creation Remove docker layer caching Remove action that free disk space Result: Docker image needs less disk-space
- Loading branch information
1 parent
4061518
commit 7976a98
Showing
7 changed files
with
19 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,13 +43,6 @@ jobs: | |
|
||
name: ${{ matrix.setup }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
# Cache .m2/repository | ||
|
@@ -61,14 +54,6 @@ jobs: | |
restore-keys: | | ||
build-${{ matrix.setup }}-cache-m2-repository- | ||
# Enable caching of Docker layers | ||
- uses: jpribyl/[email protected] | ||
continue-on-error: true | ||
with: | ||
key: build-${{ matrix.setup }}-docker-cache-{hash} | ||
restore-keys: | | ||
build-${{ matrix.setup }}-docker-cache- | ||
- name: Build docker image | ||
run: docker-compose ${{ matrix.docker-compose-build }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,13 +42,6 @@ jobs: | |
docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-snapshot" | ||
name: stage-snapshot-${{ matrix.setup }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
# Cache .m2/repository | ||
|
@@ -60,16 +53,6 @@ jobs: | |
restore-keys: | | ||
stage-snapshot-${{ matrix.setup }}-cache-m2-repository- | ||
# Enable caching of Docker layers | ||
- uses: jpribyl/[email protected] | ||
env: | ||
docker-cache-name: staging-${{ matrix.setup }}-cache-docker | ||
continue-on-error: true | ||
with: | ||
key: ${{ runner.os }}-staging-${{ env.docker-cache-name }}-{hash} | ||
restore-keys: | | ||
${{ runner.os }}-staging-${{ env.docker-cache-name }}- | ||
- name: Create local staging directory | ||
run: mkdir -p ~/local-staging | ||
|
||
|
@@ -90,13 +73,6 @@ jobs: | |
# Wait until we have staged everything | ||
needs: stage-snapshot | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,13 +65,6 @@ jobs: | |
|
||
name: ${{ matrix.setup }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
# Cache .m2/repository | ||
|
@@ -83,14 +76,6 @@ jobs: | |
restore-keys: | | ||
build-pr-${{ matrix.setup }}-cache-m2-repository- | ||
# Enable caching of Docker layers | ||
- uses: jpribyl/[email protected] | ||
continue-on-error: true | ||
with: | ||
key: pr-${{ matrix.setup }}-docker-cache-{hash} | ||
restore-keys: | | ||
pr-${{ matrix.setup }}-docker-cache- | ||
- name: Build docker image | ||
run: docker-compose ${{ matrix.docker-compose-build }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,13 +87,6 @@ jobs: | |
docker-compose-run: "-f docker/docker-compose.centos-7.yaml run cross-compile-aarch64-stage-release" | ||
name: stage-release-${{ matrix.setup }} | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
|
||
- name: Download release-workspace | ||
uses: actions/download-artifact@v3 | ||
with: | ||
|
@@ -123,16 +116,6 @@ jobs: | |
- name: Create local staging directory | ||
run: mkdir -p ~/local-staging | ||
|
||
# Enable caching of Docker layers | ||
- uses: jpribyl/[email protected] | ||
env: | ||
docker-cache-name: staging-${{ matrix.setup }}-cache-docker | ||
continue-on-error: true | ||
with: | ||
key: ${{ runner.os }}-staging-${{ env.docker-cache-name }}-{hash} | ||
restore-keys: | | ||
${{ runner.os }}-staging-${{ env.docker-cache-name }}- | ||
- name: Build docker image | ||
working-directory: ./prepare-release-workspace/ | ||
run: docker-compose ${{ matrix.docker-compose-build }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters