Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-14600313 - Replace local docker image with EC2 instance to fix pipeline #533

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
254 changes: 129 additions & 125 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
<scope>provided</scope>
</dependency>


<!-- Test Dependencies -->
<dependency>
<groupId>org.apache.activemq</groupId>
Expand Down Expand Up @@ -282,9 +281,9 @@
</goals>
<configuration>
<portNames>
<portName>activemq.listener.port</portName>
<!-- <portName>activemq.listener.port</portName>-->
<portName>activemq.ssl.listener.port</portName>
<portName>activemq.web_console.port</portName>
<!-- <portName>activemq.web_console.port</portName>-->
<portName>connection.lost.port</portName>
<portName>connection.broken.port</portName>
<portName>toxiproxy.port</portName>
Expand Down Expand Up @@ -408,128 +407,128 @@
</plugins>
</build>

<profiles>
<profile>
<id>docker</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
<configuration>
<images>
<image>
<name>mule-activemq-ssl</name>
<alias>activemq</alias>
<build>
<dockerFileDir>${project.basedir}/src/test/docker/tls</dockerFileDir>
</build>
<run>
<ulimits>
<ulimit>
<name>nofile</name>
<hard>10240</hard>
<soft>10240</soft>
</ulimit>
</ulimits>
<ports>
<port>${activemq.listener.port}:61616</port>
<port>${activemq.ssl.listener.port}:61617</port>
<port>${activemq.web_console.port}:8161</port>
</ports>
<log>
<enabled>true</enabled>
</log>
<wait>
<log>ActiveMQ Jolokia REST API available</log>
<time>500000</time>
</wait>
</run>
</image>
<image>
<name>shopify/toxiproxy</name>
<alias>toxiproxy</alias>
<run>
<ports>
<port>${toxiproxy.port}:8474</port>
<port>${connection.lost.port}:${connection.lost.port}</port>
<port>${connection.broken.port}:${connection.broken.port}</port>
</ports>
<links>
<link>activemq</link>
</links>
</run>
</image>
</images>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>2.0.7</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
<configuration>
<showLogs>true</showLogs>
<logStdout>true</logStdout>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>clean</phase>
<goals>
<goal>stop</goal>
<goal>remove</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>docker-windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<docker.skip>true</docker.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<skipTestsWhichRequireDocker>true</skipTestsWhichRequireDocker>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!-- <profiles>-->
<!-- <profile>-->
<!-- <id>docker</id>-->
<!-- <activation>-->
<!-- <activeByDefault>true</activeByDefault>-->
<!-- </activation>-->
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>io.fabric8</groupId>-->
<!-- <artifactId>docker-maven-plugin</artifactId>-->
<!-- <version>${docker.maven.plugin.version}</version>-->
<!-- <configuration>-->
<!-- <images>-->
<!-- <image>-->
<!-- <name>mule-activemq-ssl</name>-->
<!-- <alias>activemq</alias>-->
<!-- <build>-->
<!-- <dockerFileDir>${project.basedir}/src/test/docker/tls</dockerFileDir>-->
<!-- </build>-->
<!-- <run>-->
<!-- <ulimits>-->
<!-- <ulimit>-->
<!-- <name>nofile</name>-->
<!-- <hard>10240</hard>-->
<!-- <soft>10240</soft>-->
<!-- </ulimit>-->
<!-- </ulimits>-->
<!-- <ports>-->
<!-- <port>${activemq.listener.port}:61616</port>-->
<!-- <port>${activemq.ssl.listener.port}:61617</port>-->
<!-- <port>${activemq.web_console.port}:8161</port>-->
<!-- </ports>-->
<!-- <log>-->
<!-- <enabled>true</enabled>-->
<!-- </log>-->
<!-- <wait>-->
<!-- <log>ActiveMQ Jolokia REST API available</log>-->
<!-- <time>500000</time>-->
<!-- </wait>-->
<!-- </run>-->
<!-- </image>-->
<!-- <image>-->
<!-- <name>shopify/toxiproxy</name>-->
<!-- <alias>toxiproxy</alias>-->
<!-- <run>-->
<!-- <ports>-->
<!-- <port>${toxiproxy.port}:8474</port>-->
<!-- <port>${connection.lost.port}:${connection.lost.port}</port>-->
<!-- <port>${connection.broken.port}:${connection.broken.port}</port>-->
<!-- </ports>-->
<!-- <links>-->
<!-- <link>activemq</link>-->
<!-- </links>-->
<!-- </run>-->
<!-- </image>-->
<!-- </images>-->
<!-- <verbose>true</verbose>-->
<!-- </configuration>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>slf4j-api</artifactId>-->
<!-- <version>2.0.7</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>jcl-over-slf4j</artifactId>-->
<!-- <version>2.0.7</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>start</id>-->
<!-- <phase>pre-integration-test</phase>-->
<!-- <goals>-->
<!-- <goal>build</goal>-->
<!-- <goal>start</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <showLogs>true</showLogs>-->
<!-- <logStdout>true</logStdout>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- <id>stop</id>-->
<!-- <phase>clean</phase>-->
<!-- <goals>-->
<!-- <goal>stop</goal>-->
<!-- <goal>remove</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<!-- </profile>-->
<!-- <profile>-->
<!-- <id>docker-windows</id>-->
<!-- <activation>-->
<!-- <os>-->
<!-- <family>windows</family>-->
<!-- </os>-->
<!-- </activation>-->
<!-- <properties>-->
<!-- <docker.skip>true</docker.skip>-->
<!-- </properties>-->
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-surefire-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <systemPropertyVariables>-->
<!-- <skipTestsWhichRequireDocker>true</skipTestsWhichRequireDocker>-->
<!-- </systemPropertyVariables>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
<!-- </profile>-->
<!-- </profiles>-->


<distributionManagement>
Expand All @@ -553,6 +552,11 @@
<name>Mule Repository</name>
<url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
</repository>
<repository>
<id>ext-releases</id>
<name>Mule External Libraries Repository</name>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/ext-releases</url>
</repository>
</repositories>

<pluginRepositories>
Expand Down
2 changes: 1 addition & 1 deletion src/test/munit/activemq-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd">

<global-property name="munit.disable.lazy.connections" value="false"/>

<configuration-properties file="activemq.properties" />
<jms:config name="config">
<jms:active-mq-connection >
<jms:factory-configuration maxRedelivery="${max.redelivery}" trustAllPackages="true"/>
Expand Down
4 changes: 2 additions & 2 deletions src/test/munit/common/common-flows.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd
http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">

<configuration-properties file="activemq.properties" />
<http:request-config name="HTTP_Request_configuration" basePath="/api/jolokia/exec">
<http:request-connection host="localhost" port="${activemq.web_console.port}">
<http:request-connection host="${activemq.host}" port="${activemq.web_console.port}">
<http:authentication >
<http:basic-authentication username="admin" password="admin" />
</http:authentication>
Expand Down
6 changes: 3 additions & 3 deletions src/test/munit/xa/activemq-xa-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/
<jms:caching-strategy >
<jms:no-caching />
</jms:caching-strategy>
<jms:factory-configuration brokerUrl="tcp://0.0.0.0:${activemq.listener.port}" enable-xa="true" maxRedelivery="5" trustAllPackages="true"/>
<jms:factory-configuration brokerUrl="tcp://${activemq.host}:${activemq.listener.port}" enable-xa="true" maxRedelivery="5" trustAllPackages="true"/>
</jms:active-mq-connection>
</jms:config>

Expand All @@ -39,7 +39,7 @@ http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/
<jms:caching-strategy >
<jms:no-caching />
</jms:caching-strategy>
<jms:factory-configuration brokerUrl="tcp://0.0.0.0:${connection.lost.port}" enable-xa="true" maxRedelivery="-1" trustAllPackages="true"/>
<jms:factory-configuration brokerUrl="tcp://${activemq.host}:${connection.lost.port}" enable-xa="true" maxRedelivery="-1" trustAllPackages="true"/>
</jms:active-mq-connection>
</jms:config>

Expand All @@ -52,7 +52,7 @@ http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/
<jms:no-caching />
</jms:caching-strategy>
<jms:xa-connection-pool minPoolSize="5" maxPoolSize="10" />
<jms:factory-configuration brokerUrl="tcp://0.0.0.0:${activemq.listener.port}" enable-xa="true" maxRedelivery="1" trustAllPackages="true"/>
<jms:factory-configuration brokerUrl="tcp://${activemq.host}:${activemq.listener.port}" enable-xa="true" maxRedelivery="1" trustAllPackages="true"/>
</jms:active-mq-connection>
</jms:config>
</mule>
3 changes: 3 additions & 0 deletions src/test/resources/activemq.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
activemq.host=54.204.209.199
activemq.web_console.port=8161
activemq.listener.port=61616