Fix using distribRevision parameter in extraRepo config Yaml
DistribReviosion was hardcoded by mistake, however it was parametrized
in function.
Also add ability to operate with repo_key gpg
Change-Id: I700628393be698711d8f83fa959dd897d4528e3d
diff --git a/src/com/mirantis/mk/SaltModelTesting.groovy b/src/com/mirantis/mk/SaltModelTesting.groovy
index 226ec61..aeb7874 100644
--- a/src/com/mirantis/mk/SaltModelTesting.groovy
+++ b/src/com/mirantis/mk/SaltModelTesting.groovy
@@ -45,16 +45,15 @@
]
def dockerOptsFinal = (dockerBaseOpts + dockerExtraOpts).join(' ')
- def defaultExtraReposYaml = '''
+ def defaultExtraReposYaml = """
---
-distribRevision: 'nightly'
aprConfD: |-
APT::Get::AllowUnauthenticated 'true';
APT::Get::Install-Suggests 'false';
APT::Get::Install-Recommends 'false';
repo:
mcp_saltstack:
- source: "deb [arch=amd64] http://mirror.mirantis.com/SUB_DISTRIB_REVISION/saltstack-2017.7/xenial xenial main"
+ source: "deb [arch=amd64] http://mirror.mirantis.com/${distribRevision}/saltstack-2017.7/xenial xenial main"
pinning: |-
Package: libsodium18
Pin: release o=SaltStack
@@ -64,14 +63,17 @@
Pin: release o=SaltStack
Pin-Priority: 1100
mcp_extra:
- source: "deb [arch=amd64] http://mirror.mirantis.com/SUB_DISTRIB_REVISION/extra/xenial xenial main"
+ source: "deb [arch=amd64] http://mirror.mirantis.com/${distribRevision}/extra/xenial xenial main"
+ mcp_saltformulas:
+ source: "deb http://apt.mcp.mirantis.net:8085/xenial ${distribRevision} salt salt-latest"
+ repo_key: "http://apt.mcp.mirantis.net:8085/public.gpg"
ubuntu:
- source: "deb [arch=amd64] http://mirror.mirantis.com/SUB_DISTRIB_REVISION/ubuntu xenial main restricted universe"
+ source: "deb [arch=amd64] http://mirror.mirantis.com/${distribRevision}/ubuntu xenial main restricted universe"
ubuntu-upd:
- source: "deb [arch=amd64] http://mirror.mirantis.com/SUB_DISTRIB_REVISION/ubuntu xenial-updates main restricted universe"
+ source: "deb [arch=amd64] http://mirror.mirantis.com/${distribRevision}/ubuntu xenial-updates main restricted universe"
ubuntu-sec:
- source: "deb [arch=amd64] http://mirror.mirantis.com/SUB_DISTRIB_REVISION/ubuntu xenial-security main restricted universe"
-'''
+ source: "deb [arch=amd64] http://mirror.mirantis.com/${distribRevision}/ubuntu xenial-security main restricted universe"
+"""
def img = docker.image(dockerImageName)
def extraReposYaml = config.get('extraReposYaml', defaultExtraReposYaml)