aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml11
-rw-r--r--docker/mts/Dockerfile25
-rw-r--r--xtesting/core/mts.py8
3 files changed, 30 insertions, 14 deletions
diff --git a/.travis.yml b/.travis.yml
index 09b87e7b..b7d13291 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -65,11 +65,18 @@ jobs:
- REPO="${DOCKER_USERNAME}"
- arch="arm64"
- amd64_dirs=""
- - arm64_dirs=docker/mts
+ - arm64_dirs="docker/mts"
- arm_dirs=""
+ - script: sudo -E bash build.sh
+ env:
+ - REPO="${DOCKER_USERNAME}"
+ - arch="arm64"
+ - amd64_dirs=""
+ - arm64_dirs=""
+ - arm_dirs="docker/mts"
- stage: publish xtesting-mts manifests
script: >
sudo manifest-tool push from-args \
- --platforms linux/amd64,linux/arm64 \
+ --platforms linux/amd64,linux/arm,linux/arm64 \
--template ${DOCKER_USERNAME}/xtesting-mts:ARCH-latest \
--target ${DOCKER_USERNAME}/xtesting-mts:latest
diff --git a/docker/mts/Dockerfile b/docker/mts/Dockerfile
index e7c3d5e4..1c0afcb7 100644
--- a/docker/mts/Dockerfile
+++ b/docker/mts/Dockerfile
@@ -8,17 +8,18 @@ ENV NGN_JAVA_HOME=${JAVA_HOME}/bin
ENV MAVEN_OPTS=$MAVEN_OPTS
COPY mts-installer.properties /src/mts-installer.properties
-RUN apk --no-cache add --update openjdk8-jre && \
- apk --no-cache add --virtual .build-deps --update \
- openjdk8 maven git && \
- git init /src/git-mts && \
- (cd /src/git-mts && \
- git fetch --tags https://github.com/ericsson-mts/mts $MTS_TAG && \
- git checkout FETCH_HEAD && \
- echo ${NGN_JAVA_HOME} > src/main/bin/java_home.release && \
- mvn versions:set -DnewVersion=${MTS_TAG} && mvn package && mvn install && \
- java -jar target/mts-${MTS_TAG}-installer.jar -options /src/mts-installer.properties) && \
- rm -rf /root/.m2/ ${APP_FOLDER}/tutorial /src/mts-installer.properties /src/git-mts && \
- apk del .build-deps
+RUN case $(uname -m) in x86_64|aarch64) \
+ apk --no-cache add --update openjdk8-jre && \
+ apk --no-cache add --virtual .build-deps --update \
+ openjdk8 maven git && \
+ git init /src/git-mts && \
+ (cd /src/git-mts && \
+ git fetch --tags https://github.com/ericsson-mts/mts $MTS_TAG && \
+ git checkout FETCH_HEAD && \
+ echo ${NGN_JAVA_HOME} > src/main/bin/java_home.release && \
+ mvn versions:set -DnewVersion=${MTS_TAG} && mvn package && mvn install && \
+ java -jar target/mts-${MTS_TAG}-installer.jar -options /src/mts-installer.properties) && \
+ rm -rf /root/.m2/ ${APP_FOLDER}/tutorial /src/mts-installer.properties /src/git-mts && \
+ apk del .build-deps;; esac
COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml
CMD ["run_tests", "-t", "all"]
diff --git a/xtesting/core/mts.py b/xtesting/core/mts.py
index ec6766d2..d6865a61 100644
--- a/xtesting/core/mts.py
+++ b/xtesting/core/mts.py
@@ -40,6 +40,14 @@ class MTSLauncher(testcase.TestCase):
__logger = logging.getLogger(__name__)
mts_install_dir = "/opt/mts"
+ def check_requirements(self):
+ """Check if startCmd.sh is in /opt/mts/bin"""
+ if not os.path.exists(
+ os.path.join(self.mts_install_dir, 'bin/startCmd.sh')):
+ self.__logger.warning(
+ "mts is not available for arm for the time being")
+ self.is_skipped = True
+
def __init__(self, **kwargs):
super(MTSLauncher, self).__init__(**kwargs)
self.result_file = "{}/{}.log".format(self.res_dir, self.case_name)