1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2018 Mirantis Inc., Enea AB and others.
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Tue, 21 Aug 2018 02:42:35 +0200
11 Subject: [PATCH] OPNFV tag convention alignment
13 * (arch)- prefix Docker tags
14 Hacky implementation that only detects 'arm64', otherwise it will
16 Note that Docker arch notation uses 'arm64' instead of 'aarch64'.
17 * Override Docker tag to align with OPNFV format
18 * use Docker repository: opnfv/fuel
20 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
24 2 files changed, 6 insertions(+), 3 deletions(-)
26 diff --git a/invoke.yml b/invoke.yml
27 index 0bd793e..291f4c7 100644
30 @@ -65,7 +65,7 @@ target:
34 - repository: 'docker.io/epcim/salt'
35 + repository: 'docker.io/opnfv/fuel'
36 # options: '--no-cache'
37 # options: '--bust-cache reclass'
38 # options: '--registry-user epcim'
39 diff --git a/tasks.py b/tasks.py
40 index 59e217d..8afbde9 100644
43 @@ -7,6 +7,7 @@ from shlex import split
44 from string import Template
50 # - WIP - use namespace to expose images/targets as inoke tasks # image = Collection('image')
51 @@ -26,8 +27,9 @@ def all(ctx, dry=False, push=False, dry_targets=False, filter=None, **kwargs):
52 dry=dry, push=push, dry_targets=dry_targets, filter=filter, **kwargs)
55 -def build(ctx, target, require=[], dist='debian', dist_rel='stretch', salt=None, formula_rev=None, push=False, dry=False, dry_targets=False, build_arg_extra='', **kwargs):
56 +def build(ctx, target, require=[], dist='debian', dist_rel='stretch', salt=None, formula_rev=None, opnfv_tag='latest', push=False, dry=False, dry_targets=False, build_arg_extra='', **kwargs):
58 + kwargs['arch'] = 'arm64' if platform.machine() == 'aarch64' else 'amd64'
60 kwargs['dist_rel'] = dist_rel
61 kwargs['dry'] = True if dry_targets or dry else False
62 @@ -37,6 +39,7 @@ def build(ctx, target, require=[], dist='debian', dist_rel='stretch', salt=None,
64 kwargs['target'] = target
65 kwargs['build_arg_extra'] = ' --build-arg '.join([''] + split(build_arg_extra.replace('"', '"\\"')))
66 + kwargs['opnfv_tag'] = opnfv_tag
67 # command formating + update
69 fmt.update(ctx.dockermake)
70 @@ -58,7 +61,7 @@ def build(ctx, target, require=[], dist='debian', dist_rel='stretch', salt=None,
73 ${dry}docker-make -f DockerMake.${dist}.yml -u ${repository}: --name ${target} \
74 - \t-t ${dist}-${dist_rel}${tag} \
75 + \t-t ${arch}-${opnfv_tag} \
76 \t--requires ${requires} \
77 \t--build-arg SALT_VERSION="${salt}" \
78 \t--build-arg SALT_FORMULA_VERSION="${formula_rev}" \