docker build: Update saltstack repo URL, locale 60/70360/1 master
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 18 Jun 2020 13:54:25 +0000 (15:54 +0200)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 18 Jun 2020 14:37:02 +0000 (16:37 +0200)
Change-Id: If0d2c175bb8786a8c509619988c353b66da85b62
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
ci/build.sh
mcp/patches/docker/0006-Use-archive.repo.saltstack.com-repos.patch [new file with mode: 0644]

index b24ac5b..3da6705 100755 (executable)
@@ -42,6 +42,9 @@ source "${DEPLOY_DIR}/lib_jump_common.sh"
 [ ! "${TERM:-unknown}" = 'unknown' ] || export TERM=vt220
 [ "${CACHE_INVALIDATE}" = 0 ] || CACHE_INVALIDATE=$(date +%s)
 
+export LC_ALL=en_US.utf-8
+export LANG=en_US.utf-8
+
 #
 # END of variables to customize
 ##############################################################################
@@ -93,6 +96,8 @@ env PIPENV_HIDE_EMOJIS=1 python3 -m pipenv run \
     --dist-rel=bionic \
     --opnfv-tag="${DOCKER_TAG}" \
     --salt="${SALT_VERSION}" \
+    --build-arg-extra " \
+        CACHE_INVALIDATE=\"${CACHE_INVALIDATE}\"" \
     ${DOCKER_PUSH}
 
 popd > /dev/null
diff --git a/mcp/patches/docker/0006-Use-archive.repo.saltstack.com-repos.patch b/mcp/patches/docker/0006-Use-archive.repo.saltstack.com-repos.patch
new file mode 100644 (file)
index 0000000..1889e3a
--- /dev/null
@@ -0,0 +1,42 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2019 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Thu, 18 Jun 2020 16:33:35 +0200
+Subject: [PATCH] Use archive.repo.saltstack.com repos
+
+Saltstack packages for 2017.7 have been archives, use the appropiate
+repository URL.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ DockerMake.yml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/DockerMake.yml b/DockerMake.yml
+index a23541c..5910613 100644
+--- a/DockerMake.yml
++++ b/DockerMake.yml
+@@ -109,7 +109,7 @@ maas:
+       && mv /etc/maas /etc/ssh /var/lib/opnfv/etc/ \
+       && mv /var/lib/opnfv/maas-region-controller.postinst /var/lib/dpkg/info/ \
+       && python -m pip install -U jinja2==2.11.0 \
+-      && curl -qL https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | $SUDO sh -s -- -A cfg01 ${SALT_BOOTSTRAP_OPTS} \
++      && curl -qL https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | $SUDO sh -s -- -A cfg01 -R archive.repo.saltstack.com ${SALT_BOOTSTRAP_OPTS} \
+       && eval ${LAYER_CLEANUP}
+     ENTRYPOINT ["/bin/bash", "-c", "/entrypoint.sh && exec /lib/systemd/systemd"]
+
+@@ -127,7 +127,7 @@ salt:
+     RUN echo "Layer salt" \
+       && eval ${LAYER_PKGUPDT} \
+       && mkdir -p /var/run/salt /var/cache/salt /var/log/salt /etc/salt/pki/master/minions /srv/salt/formula /srv/salt/env \
+-      && curl -qL https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | $SUDO sh -s --  ${SALT_BOOTSTRAP_PKGS} -M -A localhost ${SALT_BOOTSTRAP_OPTS} \
++      && curl -qL https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | $SUDO sh -s --  ${SALT_BOOTSTRAP_PKGS} -R archive.repo.saltstack.com -M -A localhost ${SALT_BOOTSTRAP_OPTS} \
+       && if ! getent passwd salt > /dev/null;then useradd --system salt; fi \
+       && chown -R salt:salt /etc/salt /var/cache/salt /var/log/salt /var/run/salt \
+       && eval ${LAYER_CLEANUP}