feat: destination_registry parameter for save

This commit is contained in:
Giles Bradshaw 2020-10-24 12:13:30 +01:00
parent 9a5228e4be
commit 2342b9a6fc
1 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,7 @@ function(config)
'registry_domain',
'registry_port',
'registry_password',
'destination_registry'
],
script +: [
login,
@ -50,12 +51,12 @@ function(config)
out: std.strReplace(def.save, '/', '_'),
}
),
'echo "docker load %(out)s.tar" >> /%(root)s/.images/%(name)s/load.sh' % (
'echo "docker load < %(out)s.tar" >> /%(root)s/.images/%(name)s/load.sh' % (
config + {
out: std.strReplace(def.save, '/', '_'),
}
),
'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s /%(root)s/DOLLAR1/%(pull)s" >> /%(root)s/.images/%(name)s/load.sh' % (
'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s $${DESTINATION_REGISTRY}/%(root)s/%(name)s/%(pull)s" >> /%(root)s/.images/%(name)s/load.sh' % (
config +
{
pull: def.save,
@ -77,6 +78,7 @@ function(config)
'registry_domain',
'registry_port',
'registry_password',
'destination_registry',
],
script +: [
login,
@ -93,7 +95,7 @@ function(config)
out: std.strReplace(def, '/', '_'),
}
),
'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s /%(root)s/DOLLAR1/%(pull)s" >> /%(root)s/.images/%(name)s/built/load.sh' % (
'echo "docker tag $${REGISTRY_DOMAIN}:$${REGISTRY_PORT}/%(root)s/%(name)s/%(pull)s ${DESINATION_REGISTRY}/%(root)s/%(name)s/%(pull)s" >> /%(root)s/.images/%(name)s/built/load.sh' % (
config +
{
pull: def,