Skip to content

Commit

Permalink
Merge pull request #408 from camunda/407-build-docker-image-with-maven
Browse files Browse the repository at this point in the history
Build docker image with Maven
  • Loading branch information
remcowesterhoud authored Jun 20, 2022
2 parents 623e553 + e3050d1 commit 9158097
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Build
id: build
run: mvn -B -U -pl "-:zeebe-process-test-qa-testcontainers" "-Dsurefire.rerunFailingTestsCount=5" clean install
run: mvn -B -U -pl "-:zeebe-process-test-qa-testcontainers" -P !localBuild "-Dsurefire.rerunFailingTestsCount=5" clean install

- name: Archive Test Results
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
cache: maven

- name: Package
run: mvn -B -U clean package -DskipTests
run: mvn -B -U -P !localBuild clean package -DskipTests

- name: Build engine docker container
run: |
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
id: build
run: |
rm .mvn/jvm.config
mvn -B -U -pl ":zeebe-process-test-qa-testcontainers" -am "-Dsurefire.rerunFailingTestsCount=5" install -DskipChecks
mvn -B -U -pl ":zeebe-process-test-qa-testcontainers" -P !localBuild -am "-Dsurefire.rerunFailingTestsCount=5" install -DskipChecks
- name: Archive Test Results
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Build jar
run: |
mvn clean package -DskipTests -pl :zeebe-process-test-engine-agent -am
mvn clean package -DskipTests -P !localBuild -pl :zeebe-process-test-engine-agent -am
# We build a docker image with a specific tag. There are 2 possible scenarios here.
# 1. The workflow is triggered manually or by a change on the main branch. The tag should be 'latest'.
Expand Down
34 changes: 34 additions & 0 deletions engine-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,38 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>localBuild</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<to>
<image>camunda/zeebe-process-test-engine</image>
<tags>${project.version}</tags>
</to>
</configuration>
<executions>
<execution>
<id>build-local</id>
<goals>
<goal>dockerBuild</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 9158097

Please sign in to comment.