Moved arch checking code in common build.sh script used by both:
- rpm build: remote-installer.spec
- jenkins docker build: build-container.sh
Signed-off-by: Alexandru Antone <Alexandru.Antone@enea.com>
Change-Id: Icbfb05ddc8bad8c050b8f406f328ca28b6bfb411
Name: remote-installer
Version: %{_version}
Name: remote-installer
Version: %{_version}
Summary: Contains components for the remote-installer
Group: %{_platform_group}
License: %{_platform_licence}
Summary: Contains components for the remote-installer
Group: %{_platform_group}
License: %{_platform_licence}
-BASEIMAGE_TAG='centos:7.6.1810'
-
-# For aarch64 use the closest available upstream version
-if [ "%{_arch}" = "aarch64" ]; then
- BASEIMAGE_TAG='centos@sha256:df89b0a0b42916b5b31b334fd52d3e396c226ad97dfe772848bdd6b00fb42bf0'
-fi
-
-scripts/build.sh -t "${BASEIMAGE_TAG}"
# Here hould be some registry but it should be handled by a Jenkis job
docker image save remote-installer >remote-installer-image.tar
# Here hould be some registry but it should be handled by a Jenkis job
docker image save remote-installer >remote-installer-image.tar
#!/bin/bash
# Copyright 2019 Nokia
#!/bin/bash
# Copyright 2019 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
TAR_IMAGE="remote-installer.tar"
DOCKERFILE='docker-build/remote-installer/Dockerfile'
TAR_IMAGE="remote-installer.tar"
DOCKERFILE='docker-build/remote-installer/Dockerfile'
+BASEIMAGE_TAG='centos:7.6.1810'
+
+# For aarch64 use the closest available upstream version
+if [ "$(uname -m)" = "aarch64" ]; then
+ BASEIMAGE_TAG='centos@sha256:df89b0a0b42916b5b31b334fd52d3e396c226ad97dfe772848bdd6b00fb42bf0'
+fi
+
+
- echo -e "$(basename "$0") [-hs] -t <tag>"
+ echo -e "$(basename "$0") [-hs]"
echo -e " -h display this help"
echo -e " -s save image as tar to $TAR_IMAGE"
echo -e " -h display this help"
echo -e " -s save image as tar to $TAR_IMAGE"
- echo -e " -t <tag> specify docker base image tag"
echo
echo -e "Proxy configuration is taken from environment variables"
echo -e "http_proxy, https_proxy and no_proxy"
}
echo
echo -e "Proxy configuration is taken from environment variables"
echo -e "http_proxy, https_proxy and no_proxy"
}
-while getopts "hst:" arg; do
+while getopts "hs" arg; do
- t)
- BASEIMAGE_TAG="$OPTARG"
- ;;