|
148 | 148 | </pluginManagement>
|
149 | 149 | </build>
|
150 | 150 | </profile>
|
| 151 | + <profile> |
| 152 | + <id>gh-build</id> |
| 153 | + <properties> |
| 154 | + <docker.builder.name>k8s-multiarch</docker.builder.name> |
| 155 | + <!-- Ideally, we'd pass this in with `config` flag while provisioning the builder, but it doesn't appear to be working. --> |
| 156 | + <docker.builder.stateDir>~/.docker</docker.builder.stateDir> |
| 157 | + </properties> |
| 158 | + <build> |
| 159 | + <plugins> |
| 160 | + <plugin> |
| 161 | + <groupId>org.codehaus.mojo</groupId> |
| 162 | + <artifactId>exec-maven-plugin</artifactId> |
| 163 | + <inherited>false</inherited> |
| 164 | + <executions> |
| 165 | + <execution> |
| 166 | + <id>provision-docker-builder-amd</id> |
| 167 | + <phase>initialize</phase> |
| 168 | + <goals> |
| 169 | + <goal>exec</goal> |
| 170 | + </goals> |
| 171 | + <configuration> |
| 172 | + <executable>docker</executable> |
| 173 | + <arguments> |
| 174 | + <argument>builder</argument> |
| 175 | + <argument>create</argument> |
| 176 | + <argument>--name=${docker.builder.name}</argument> |
| 177 | + <argument>--bootstrap</argument> |
| 178 | + <argument>--driver=kubernetes</argument> |
| 179 | + <argument>--platform=linux/amd64</argument> |
| 180 | + <argument>--driver-opt="nodeselector=kubernetes.io/arch=amd64","image=docker.io/moby/buildkit:v0.19.0"</argument> |
| 181 | + </arguments> |
| 182 | + </configuration> |
| 183 | + </execution> |
| 184 | + <execution> |
| 185 | + <id>provision-docker-builder-arm</id> |
| 186 | + <phase>initialize</phase> |
| 187 | + <goals> |
| 188 | + <goal>exec</goal> |
| 189 | + </goals> |
| 190 | + <configuration> |
| 191 | + <executable>docker</executable> |
| 192 | + <arguments> |
| 193 | + <argument>builder</argument> |
| 194 | + <argument>create</argument> |
| 195 | + <argument>--name=${docker.builder.name}</argument> |
| 196 | + <argument>--bootstrap</argument> |
| 197 | + <argument>--append</argument> |
| 198 | + <argument>--driver=kubernetes</argument> |
| 199 | + <argument>--platform=linux/arm64</argument> |
| 200 | + <argument>--driver-opt="nodeselector=kubernetes.io/arch=arm64","image=docker.io/moby/buildkit:v0.19.0"</argument> |
| 201 | + </arguments> |
| 202 | + </configuration> |
| 203 | + </execution> |
| 204 | + </executions> |
| 205 | + </plugin> |
| 206 | + </plugins> |
| 207 | + <pluginManagement> |
| 208 | + <plugins> |
| 209 | + <plugin> |
| 210 | + <groupId>${group.fabric8.plugin}</groupId> |
| 211 | + <artifactId>docker-maven-plugin</artifactId> |
| 212 | + <executions> |
| 213 | + <execution> |
| 214 | + <id>default-push</id> |
| 215 | + <phase>deploy</phase> |
| 216 | + <goals> |
| 217 | + <goal>push</goal> |
| 218 | + </goals> |
| 219 | + <configuration> |
| 220 | + <images> |
| 221 | + <image> |
| 222 | + <build> |
| 223 | + <buildx> |
| 224 | + <builderName>${docker.builder.name}</builderName> |
| 225 | + <dockerStateDir>${docker.builder.stateDir}</dockerStateDir> |
| 226 | + </buildx> |
| 227 | + </build> |
| 228 | + </image> |
| 229 | + </images> |
| 230 | + </configuration> |
| 231 | + </execution> |
| 232 | + </executions> |
| 233 | + </plugin> |
| 234 | + </plugins> |
| 235 | + </pluginManagement> |
| 236 | + </build> |
| 237 | + </profile> |
151 | 238 | </profiles>
|
152 | 239 | </project>
|
0 commit comments