Merge branch 'master' into master
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
downloads
|
downloads
|
||||||
|
.git
|
||||||
10
manifests/README.md
Normal file
10
manifests/README.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Fat manifests
|
||||||
|
=============
|
||||||
|
|
||||||
|
These are the fat manifests used by Docker Hub to handle images with multiple CPU architectures.
|
||||||
|
|
||||||
|
They are used in conjunction with [manifest-tool](https://github.com/estesp/manifest-tool), for example:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
manifest-tool push from-spec manifest-latest.yaml
|
||||||
|
```
|
||||||
29
manifests/manifest-9-cd.yaml
Normal file
29
manifests/manifest-9-cd.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# © Copyright IBM Corporation 2018
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
image: ibmcom/mq:9-cd
|
||||||
|
manifests:
|
||||||
|
- image: ibmcom/mq:9.0.5.0-x86_64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-ppc64le
|
||||||
|
platform:
|
||||||
|
architecture: ppc64le
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-s390x
|
||||||
|
platform:
|
||||||
|
architecture: s390x
|
||||||
|
os: linux
|
||||||
|
|
||||||
29
manifests/manifest-9.yaml
Normal file
29
manifests/manifest-9.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# © Copyright IBM Corporation 2018
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
image: ibmcom/mq:9
|
||||||
|
manifests:
|
||||||
|
- image: ibmcom/mq:9.0.5.0-x86_64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-ppc64le
|
||||||
|
platform:
|
||||||
|
architecture: ppc64le
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-s390x
|
||||||
|
platform:
|
||||||
|
architecture: s390x
|
||||||
|
os: linux
|
||||||
|
|
||||||
29
manifests/manifest-cd.yaml
Normal file
29
manifests/manifest-cd.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# © Copyright IBM Corporation 2018
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
image: ibmcom/mq:cd
|
||||||
|
manifests:
|
||||||
|
- image: ibmcom/mq:9.0.5.0-x86_64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-ppc64le
|
||||||
|
platform:
|
||||||
|
architecture: ppc64le
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-s390x
|
||||||
|
platform:
|
||||||
|
architecture: s390x
|
||||||
|
os: linux
|
||||||
|
|
||||||
29
manifests/manifest-latest.yaml
Normal file
29
manifests/manifest-latest.yaml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# © Copyright IBM Corporation 2018
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
image: ibmcom/mq:latest
|
||||||
|
manifests:
|
||||||
|
- image: ibmcom/mq:9.0.5.0-x86_64
|
||||||
|
platform:
|
||||||
|
architecture: amd64
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-ppc64le
|
||||||
|
platform:
|
||||||
|
architecture: ppc64le
|
||||||
|
os: linux
|
||||||
|
- image: ibmcom/mq:9.0.5.0-s390x
|
||||||
|
platform:
|
||||||
|
architecture: s390x
|
||||||
|
os: linux
|
||||||
|
|
||||||
@@ -51,23 +51,22 @@ func waitForWebReady(t *testing.T, cli *client.Client, ID string, tlsConfig *tls
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
url := fmt.Sprintf("https://localhost:%s/ibmmq/rest/v1/admin/installation", getPort(t, cli, ID, 9443))
|
url := fmt.Sprintf("https://localhost:%s/ibmmq/rest/v1/admin/installation", getPort(t, cli, ID, 9443))
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
select {
|
||||||
|
case <-time.After(1 * time.Second):
|
||||||
req, err := http.NewRequest("GET", url, nil)
|
req, err := http.NewRequest("GET", url, nil)
|
||||||
req.SetBasicAuth("admin", devAdminPassword)
|
req.SetBasicAuth("admin", devAdminPassword)
|
||||||
resp, err := httpClient.Do(req)
|
resp, err := httpClient.Do(req.WithContext(ctx))
|
||||||
if err == nil && resp.StatusCode == http.StatusOK {
|
if err == nil && resp.StatusCode == http.StatusOK {
|
||||||
t.Log("MQ web server is ready")
|
t.Log("MQ web server is ready")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// conn, err := tls.Dial("tcp", a, &config)
|
case <-ctx.Done():
|
||||||
// if err == nil {
|
t.Fatal("Timed out waiting for web server to become ready")
|
||||||
// conn.Close()
|
}
|
||||||
// // Extra sleep to allow web apps to start
|
|
||||||
// time.Sleep(5 * time.Second)
|
|
||||||
// t.Log("MQ web server is ready")
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
time.Sleep(1 * time.Second)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -389,12 +389,20 @@ func execContainer(t *testing.T, cli *client.Client, ID string, user string, cmd
|
|||||||
}
|
}
|
||||||
|
|
||||||
func waitForReady(t *testing.T, cli *client.Client, ID string) {
|
func waitForReady(t *testing.T, cli *client.Client, ID string) {
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
select {
|
||||||
|
case <-time.After(1 * time.Second):
|
||||||
rc, _ := execContainer(t, cli, ID, "mqm", []string{"chkmqready"})
|
rc, _ := execContainer(t, cli, ID, "mqm", []string{"chkmqready"})
|
||||||
if rc == 0 {
|
if rc == 0 {
|
||||||
t.Log("MQ is ready")
|
t.Log("MQ is ready")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
case <-ctx.Done():
|
||||||
|
t.Fatal("Timed out waiting for container to become ready")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,26 +13,24 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Application build environment (Gradle)
|
# Application build environment (Maven)
|
||||||
###############################################################################
|
###############################################################################
|
||||||
FROM gradle as builder
|
FROM maven:3-ibmjava as builder
|
||||||
ENV GRADLE_OPTS="-Dorg.gradle.daemon=false"
|
COPY pom.xml /usr/src/mymaven/
|
||||||
# Change where Gradle stores its cache, so that it's not under a volume
|
WORKDIR /usr/src/mymaven
|
||||||
# (and therefore gets cached by Docker)
|
|
||||||
ENV GRADLE_USER_HOME=/home/gradle/gradle
|
|
||||||
RUN mkdir -p $GRADLE_USER_HOME
|
|
||||||
COPY --chown=gradle build.gradle /app/
|
|
||||||
WORKDIR /app
|
|
||||||
# Download dependencies separately, so Docker caches them
|
# Download dependencies separately, so Docker caches them
|
||||||
RUN gradle download
|
RUN mvn dependency:go-offline install
|
||||||
# Copy source
|
# Copy source
|
||||||
COPY --chown=gradle src /app/src
|
COPY src /usr/src/mymaven/src
|
||||||
# Run the main build
|
# Run the main build
|
||||||
RUN gradle install
|
RUN mvn --offline install
|
||||||
|
# Print a list of all the files (useful for debugging)
|
||||||
|
RUN find /usr/src/mymaven
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# Application runtime (JRE only, no build environment)
|
# Application runtime (JRE only, no build environment)
|
||||||
###############################################################################
|
###############################################################################
|
||||||
FROM ibmjava:sfj
|
FROM ibmjava:sfj
|
||||||
COPY --from=builder /app/lib/*.jar /opt/app/
|
COPY --from=builder /usr/src/mymaven/target/*.jar /opt/app/
|
||||||
|
COPY --from=builder /usr/src/mymaven/target/lib/*.jar /opt/app/
|
||||||
ENTRYPOINT ["java", "-classpath", "/opt/app/*", "org.junit.platform.console.ConsoleLauncher", "-p", "com.ibm.mqcontainer.test", "--details", "verbose"]
|
ENTRYPOINT ["java", "-classpath", "/opt/app/*", "org.junit.platform.console.ConsoleLauncher", "-p", "com.ibm.mqcontainer.test", "--details", "verbose"]
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
// © Copyright IBM Corporation 2018
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile group: 'com.ibm.mq', name: 'com.ibm.mq.allclient', version: '9.0.5.0'
|
|
||||||
compile "org.junit.jupiter:junit-jupiter-api:5.0.3"
|
|
||||||
runtime "org.junit.jupiter:junit-jupiter-engine:5.0.3"
|
|
||||||
runtime "org.junit.platform:junit-platform-console-standalone:1.0.3"
|
|
||||||
}
|
|
||||||
|
|
||||||
task download(type: Exec) {
|
|
||||||
configurations.runtime.files
|
|
||||||
commandLine 'echo', 'Downloaded all dependencies'
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy all dependencies to the lib directory
|
|
||||||
task install(type: Copy) {
|
|
||||||
dependsOn build
|
|
||||||
from configurations.runtime
|
|
||||||
from jar
|
|
||||||
into "${project.projectDir}/lib"
|
|
||||||
}
|
|
||||||
69
test/messaging/pom.xml
Normal file
69
test/messaging/pom.xml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
<!--
|
||||||
|
© Copyright IBM Corporation 2018
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>com.ibm.mq.container</groupId>
|
||||||
|
<artifactId>test-messaging</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>dev</version>
|
||||||
|
<name>test-messaging</name>
|
||||||
|
<url>http://maven.apache.org</url>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ibm.mq</groupId>
|
||||||
|
<artifactId>com.ibm.mq.allclient</artifactId>
|
||||||
|
<version>9.0.5.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
|
<version>5.2.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-engine</artifactId>
|
||||||
|
<version>5.2.0</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.platform</groupId>
|
||||||
|
<artifactId>junit-platform-console-standalone</artifactId>
|
||||||
|
<version>1.2.0</version>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>install</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
Reference in New Issue
Block a user