CI support for IBM Z (#3716)

This commit is contained in:
Zheng Xiao Mei
2020-08-12 07:47:43 +08:00
committed by GitHub
parent fccf092627
commit 19514c1fb5
5 changed files with 74 additions and 59 deletions

View File

@@ -79,7 +79,9 @@ oc annotate istag/nodejs:latest tags=builder -n openshift --overwrite
oc import-image java:8 --namespace=openshift --from=registry.redhat.io/redhat-openjdk-18/openjdk18-openshift --confirm
sleep 5
oc annotate istag/java:8 --namespace=openshift tags=builder --overwrite
oc apply -n openshift -f https://raw.githubusercontent.com/openshift/library/master/arch/s390x/official/ruby/imagestreams/ruby-rhel7.json
oc import-image java:latest --namespace=openshift --from=registry.redhat.io/redhat-openjdk-18/openjdk18-openshift --confirm
oc annotate istag/java:latest --namespace=openshift tags=builder --overwrite
oc import-image ruby --from=registry.redhat.io/ubi8/ruby-26 -n openshift --confirm
sleep 5
oc annotate istag/ruby:latest --namespace=openshift tags=builder --overwrite
oc import-image wildfly --confirm \--from docker.io/clefos/wildfly-120-centos7:latest --insecure -n openshift

View File

@@ -36,19 +36,13 @@ oc whoami
if [ "${ARCH}" == "s390x" ]; then
# Integration tests
make test-generic
make test-cmd-link-unlink
make test-cmd-pref-config
make test-cmd-watch
make test-cmd-debug
make test-integration
make test-cmd-login-logout
make test-cmd-project
make test-cmd-app
make test-cmd-storage
make test-cmd-push
make test-cmd-watch
# E2e tests
make test-e2e-beta
make test-e2e-java
make test-e2e-source
elif [ "${ARCH}" == "ppc64le" ]; then
# Integration tests
make test-generic

View File

@@ -3,6 +3,7 @@ package e2escenarios
import (
"os"
"path/filepath"
"runtime"
"time"
. "github.com/onsi/ginkgo"
@@ -37,8 +38,14 @@ var _ = Describe("odo java e2e tests", func() {
// contains a minimal javalin app
const jarGitRepo = "https://github.com/geoand/javalin-helloworld"
// Test Java
Context("odo component creation", func() {
// Test wildfly
Context("odo wildfly component creation ", func() {
JustBeforeEach(func() {
if runtime.GOARCH == "s390x" {
Skip("Skipping test because there is no supported wildfly builder image.")
}
})
It("Should be able to deploy a git repo that contains a wildfly application without wait flag", func() {
helper.CmdShouldPass("odo", "create", "wildfly", "wo-wait-javaee-git-test", "--project",
project, "--ref", "master", "--git", warGitRepo, "--context", context)
@@ -54,7 +61,9 @@ var _ = Describe("odo java e2e tests", func() {
// Delete the component
helper.CmdShouldPass("odo", "delete", "wo-wait-javaee-git-test", "-f", "--context", context)
})
})
// Test Java
Context("odo component creation", func() {
It("Should be able to deploy a .war file using wildfly", func() {
helper.CopyExample(filepath.Join("binary", "java", "wildfly"), context)
helper.CmdShouldPass("odo", "create", "wildfly", "javaee-war-test", "--project",
@@ -104,7 +113,7 @@ var _ = Describe("odo java e2e tests", func() {
routeURL := helper.DetermineRouteURL(context)
// Ping said URL
helper.HttpWaitFor(routeURL, "HTTP Booster", 90, 1)
helper.HttpWaitFor(routeURL, "HTTP Booster", 300, 1)
// Delete the component
helper.CmdShouldPass("odo", "delete", "sb-jar-test", "-f", "--context", context)

View File

@@ -3,6 +3,7 @@ package e2escenarios
import (
"os"
"path/filepath"
"runtime"
"time"
. "github.com/onsi/ginkgo"
@@ -29,6 +30,59 @@ var _ = Describe("odo source e2e tests", func() {
os.Unsetenv("GLOBALODOCONFIG")
})
Context("odo component creation from source", func() {
JustBeforeEach(func() {
if runtime.GOARCH == "s390x" {
Skip("Skipping test because there is no supported builder image.")
}
})
It("Should be able to deploy a wildfly source application", func() {
helper.CopyExample(filepath.Join("source", "wildfly"), context)
helper.CmdShouldPass("odo", "create", "wildfly", "wildfly-app", "--project",
project, "--context", context)
// Push changes
helper.CmdShouldPass("odo", "push", "--context", context)
cmpList := helper.CmdShouldPass("odo", "list", "--context", context)
Expect(cmpList).To(ContainSubstring("wildfly-app"))
// Create a URL
helper.CmdShouldPass("odo", "url", "create", "--port", "8080", "--context", context)
helper.CmdShouldPass("odo", "push", "--context", context)
routeURL := helper.DetermineRouteURL(context)
// Ping said URL
helper.HttpWaitFor(routeURL, "Insult", 30, 1)
// Delete the component
helper.CmdShouldPass("odo", "app", "delete", "app", "--project", project, "-f")
})
It("Should be able to deploy a dotnet source application", func() {
oc.ImportDotnet20IS(project)
helper.CopyExample(filepath.Join("source", "dotnet"), context)
helper.CmdShouldPass("odo", "create", "dotnet:2.0", "dotnet-app", "--project",
project, "--context", context)
// Push changes
helper.CmdShouldPass("odo", "push", "--context", context)
cmpList := helper.CmdShouldPass("odo", "list", "--context", context)
Expect(cmpList).To(ContainSubstring("dotnet-app"))
// Create a URL
helper.CmdShouldPass("odo", "url", "create", "--port", "8080", "--context", context)
helper.CmdShouldPass("odo", "push", "--context", context)
routeURL := helper.DetermineRouteURL(context)
// Ping said URL
helper.HttpWaitFor(routeURL, "dotnet", 30, 1)
// Delete the component
helper.CmdShouldPass("odo", "app", "delete", "app", "--project", project, "-f")
})
})
Context("odo component creation", func() {
It("Should be able to deploy a python source application", func() {
@@ -76,28 +130,6 @@ var _ = Describe("odo source e2e tests", func() {
helper.CmdShouldPass("odo", "app", "delete", "app", "--project", project, "-f")
})
It("Should be able to deploy a wildfly source application", func() {
helper.CopyExample(filepath.Join("source", "wildfly"), context)
helper.CmdShouldPass("odo", "create", "wildfly", "wildfly-app", "--project",
project, "--context", context)
// Push changes
helper.CmdShouldPass("odo", "push", "--context", context)
cmpList := helper.CmdShouldPass("odo", "list", "--context", context)
Expect(cmpList).To(ContainSubstring("wildfly-app"))
// Create a URL
helper.CmdShouldPass("odo", "url", "create", "--port", "8080", "--context", context)
helper.CmdShouldPass("odo", "push", "--context", context)
routeURL := helper.DetermineRouteURL(context)
// Ping said URL
helper.HttpWaitFor(routeURL, "Insult", 30, 1)
// Delete the component
helper.CmdShouldPass("odo", "app", "delete", "app", "--project", project, "-f")
})
It("Should be able to deploy a nodejs source application", func() {
helper.CopyExample(filepath.Join("source", "nodejs"), context)
helper.CmdShouldPass("odo", "create", "nodejs", "nodejs-app", "--project",
@@ -120,27 +152,5 @@ var _ = Describe("odo source e2e tests", func() {
helper.CmdShouldPass("odo", "app", "delete", "app", "--project", project, "-f")
})
It("Should be able to deploy a dotnet source application", func() {
oc.ImportDotnet20IS(project)
helper.CopyExample(filepath.Join("source", "dotnet"), context)
helper.CmdShouldPass("odo", "create", "dotnet:2.0", "dotnet-app", "--project",
project, "--context", context)
// Push changes
helper.CmdShouldPass("odo", "push", "--context", context)
cmpList := helper.CmdShouldPass("odo", "list", "--context", context)
Expect(cmpList).To(ContainSubstring("dotnet-app"))
// Create a URL
helper.CmdShouldPass("odo", "url", "create", "--port", "8080", "--context", context)
helper.CmdShouldPass("odo", "push", "--context", context)
routeURL := helper.DetermineRouteURL(context)
// Ping said URL
helper.HttpWaitFor(routeURL, "dotnet", 30, 1)
// Delete the component
helper.CmdShouldPass("odo", "app", "delete", "app", "--project", project, "-f")
})
})
})

View File

@@ -785,7 +785,7 @@ func componentTests(args ...string) {
routeURL := helper.DetermineRouteURL(symLinkPath)
// Ping said URL
helper.HttpWaitFor(routeURL, "HTTP Booster", 90, 1)
helper.HttpWaitFor(routeURL, "HTTP Booster", 300, 1)
// Delete the component
helper.CmdShouldPass("odo", append(args, "delete", "sb-jar-test", "-f", "--context", symLinkPath)...)