Skip to content

Commit cb40049

Browse files
committed
Introduce docker pruning when running the cron job
1 parent 527eb5c commit cb40049

File tree

10 files changed

+240
-3
lines changed

10 files changed

+240
-3
lines changed

.github/docker-prune.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# pruning is only run when inside CI to avoid accidentally removing stuff
6+
# GITHUB_ACTIONS is always set to true inside Github Actions
7+
# https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables
8+
if [ "${GITHUB_ACTIONS}" == true ] ; then
9+
docker container prune -f
10+
docker image prune -f
11+
docker network prune -f
12+
docker volume prune -f
13+
fi

.github/workflows/native-build-development.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Build Quickstart with native
3737
run: |
38-
mvn -B clean install --fail-at-end -Pnative \
38+
mvn -B clean install --fail-at-end -Pnative -Ddocker \
3939
-Dquarkus.native.container-build=true \
4040
-Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:19.3.1-java8 \
4141
-pl '!rest-client-quickstart,!security-jwt-quickstart'

context-propagation/pom.xml

+29-1
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,33 @@
166166
</plugins>
167167
</build>
168168
</profile>
169+
<profile>
170+
<id>docker</id>
171+
<activation>
172+
<property>
173+
<name>docker</name>
174+
</property>
175+
</activation>
176+
<build>
177+
<plugins>
178+
<plugin>
179+
<groupId>org.codehaus.mojo</groupId>
180+
<artifactId>exec-maven-plugin</artifactId>
181+
<executions>
182+
<execution>
183+
<id>docker-prune</id>
184+
<phase>generate-resources</phase>
185+
<goals>
186+
<goal>exec</goal>
187+
</goals>
188+
<configuration>
189+
<executable>${basedir}/../.github/docker-prune.sh</executable>
190+
</configuration>
191+
</execution>
192+
</executions>
193+
</plugin>
194+
</plugins>
195+
</build>
196+
</profile>
169197
</profiles>
170-
</project>
198+
</project>

getting-started-reactive-crud/pom.xml

+29-1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,34 @@
149149
</plugins>
150150
</build>
151151
</profile>
152+
<profile>
153+
<id>docker</id>
154+
<activation>
155+
<property>
156+
<name>docker</name>
157+
</property>
158+
</activation>
159+
<build>
160+
<plugins>
161+
<plugin>
162+
<groupId>org.codehaus.mojo</groupId>
163+
<artifactId>exec-maven-plugin</artifactId>
164+
<executions>
165+
<execution>
166+
<id>docker-prune</id>
167+
<phase>generate-resources</phase>
168+
<goals>
169+
<goal>exec</goal>
170+
</goals>
171+
<configuration>
172+
<executable>${basedir}/../.github/docker-prune.sh</executable>
173+
</configuration>
174+
</execution>
175+
</executions>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
152180
</profiles>
153181

154-
</project>
182+
</project>

kafka-quickstart/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,33 @@
137137
</plugins>
138138
</build>
139139
</profile>
140+
<profile>
141+
<id>docker</id>
142+
<activation>
143+
<property>
144+
<name>docker</name>
145+
</property>
146+
</activation>
147+
<build>
148+
<plugins>
149+
<plugin>
150+
<groupId>org.codehaus.mojo</groupId>
151+
<artifactId>exec-maven-plugin</artifactId>
152+
<executions>
153+
<execution>
154+
<id>docker-prune</id>
155+
<phase>generate-resources</phase>
156+
<goals>
157+
<goal>exec</goal>
158+
</goals>
159+
<configuration>
160+
<executable>${basedir}/../.github/docker-prune.sh</executable>
161+
</configuration>
162+
</execution>
163+
</executions>
164+
</plugin>
165+
</plugins>
166+
</build>
167+
</profile>
140168
</profiles>
141169
</project>

neo4j-quickstart/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,33 @@
138138
</plugins>
139139
</build>
140140
</profile>
141+
<profile>
142+
<id>docker</id>
143+
<activation>
144+
<property>
145+
<name>docker</name>
146+
</property>
147+
</activation>
148+
<build>
149+
<plugins>
150+
<plugin>
151+
<groupId>org.codehaus.mojo</groupId>
152+
<artifactId>exec-maven-plugin</artifactId>
153+
<executions>
154+
<execution>
155+
<id>docker-prune</id>
156+
<phase>generate-resources</phase>
157+
<goals>
158+
<goal>exec</goal>
159+
</goals>
160+
<configuration>
161+
<executable>${basedir}/../.github/docker-prune.sh</executable>
162+
</configuration>
163+
</execution>
164+
</executions>
165+
</plugin>
166+
</plugins>
167+
</build>
168+
</profile>
141169
</profiles>
142170
</project>

security-jdbc-quickstart/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,33 @@
134134
</plugins>
135135
</build>
136136
</profile>
137+
<profile>
138+
<id>docker</id>
139+
<activation>
140+
<property>
141+
<name>docker</name>
142+
</property>
143+
</activation>
144+
<build>
145+
<plugins>
146+
<plugin>
147+
<groupId>org.codehaus.mojo</groupId>
148+
<artifactId>exec-maven-plugin</artifactId>
149+
<executions>
150+
<execution>
151+
<id>docker-prune</id>
152+
<phase>generate-resources</phase>
153+
<goals>
154+
<goal>exec</goal>
155+
</goals>
156+
<configuration>
157+
<executable>${basedir}/../.github/docker-prune.sh</executable>
158+
</configuration>
159+
</execution>
160+
</executions>
161+
</plugin>
162+
</plugins>
163+
</build>
164+
</profile>
137165
</profiles>
138166
</project>

security-keycloak-authorization-quickstart/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,33 @@
139139
</plugins>
140140
</build>
141141
</profile>
142+
<profile>
143+
<id>docker</id>
144+
<activation>
145+
<property>
146+
<name>docker</name>
147+
</property>
148+
</activation>
149+
<build>
150+
<plugins>
151+
<plugin>
152+
<groupId>org.codehaus.mojo</groupId>
153+
<artifactId>exec-maven-plugin</artifactId>
154+
<executions>
155+
<execution>
156+
<id>docker-prune</id>
157+
<phase>generate-resources</phase>
158+
<goals>
159+
<goal>exec</goal>
160+
</goals>
161+
<configuration>
162+
<executable>${basedir}/../.github/docker-prune.sh</executable>
163+
</configuration>
164+
</execution>
165+
</executions>
166+
</plugin>
167+
</plugins>
168+
</build>
169+
</profile>
142170
</profiles>
143171
</project>

security-openid-connect-multi-tenancy/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,33 @@
158158
</plugins>
159159
</build>
160160
</profile>
161+
<profile>
162+
<id>docker</id>
163+
<activation>
164+
<property>
165+
<name>docker</name>
166+
</property>
167+
</activation>
168+
<build>
169+
<plugins>
170+
<plugin>
171+
<groupId>org.codehaus.mojo</groupId>
172+
<artifactId>exec-maven-plugin</artifactId>
173+
<executions>
174+
<execution>
175+
<id>docker-prune</id>
176+
<phase>generate-resources</phase>
177+
<goals>
178+
<goal>exec</goal>
179+
</goals>
180+
<configuration>
181+
<executable>${basedir}/../.github/docker-prune.sh</executable>
182+
</configuration>
183+
</execution>
184+
</executions>
185+
</plugin>
186+
</plugins>
187+
</build>
188+
</profile>
161189
</profiles>
162190
</project>

security-openid-connect-web-authentication-quickstart/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,33 @@
157157
</plugins>
158158
</build>
159159
</profile>
160+
<profile>
161+
<id>docker</id>
162+
<activation>
163+
<property>
164+
<name>docker</name>
165+
</property>
166+
</activation>
167+
<build>
168+
<plugins>
169+
<plugin>
170+
<groupId>org.codehaus.mojo</groupId>
171+
<artifactId>exec-maven-plugin</artifactId>
172+
<executions>
173+
<execution>
174+
<id>docker-prune</id>
175+
<phase>generate-resources</phase>
176+
<goals>
177+
<goal>exec</goal>
178+
</goals>
179+
<configuration>
180+
<executable>${basedir}/../.github/docker-prune.sh</executable>
181+
</configuration>
182+
</execution>
183+
</executions>
184+
</plugin>
185+
</plugins>
186+
</build>
187+
</profile>
160188
</profiles>
161189
</project>

0 commit comments

Comments
 (0)