diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-11-16 11:53:30 -0800 |
---|---|---|
committer | Gary Wu <gary.i.wu@huawei.com> | 2017-11-16 12:01:12 -0800 |
commit | 72b3fd6c56f7588195add82f7a83ecf8e3c982e0 (patch) | |
tree | 4aaea5cbd9f61acc06d9a53f0f7683978bc6dbb5 /heat/ONAP/manifest-to-env.sh | |
parent | 6eff578b649bcf82e7302548622e8d7c81d41b9d (diff) |
Script to generate heat env using docker-manifest
Change-Id: I872bde8621453332450a669609dc767047156866
Issue-ID: INT-334
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'heat/ONAP/manifest-to-env.sh')
-rwxr-xr-x | heat/ONAP/manifest-to-env.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/heat/ONAP/manifest-to-env.sh b/heat/ONAP/manifest-to-env.sh new file mode 100755 index 00000000..017b091a --- /dev/null +++ b/heat/ONAP/manifest-to-env.sh @@ -0,0 +1,28 @@ +#!/bin/bash +#==================LICENSE_START========================================== +# +# Copyright (c) 2017 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#==================LICENSE_END============================================ + +# USAGE: Pipe in docker-manifest.csv from the integration repo. This +# script converts it into a series of environment variable settings +# that can then be used with envsubst to set the docker versions in +# onap_openstack_template.env. +# +# EXAMPLE: +# source <(./manifest-to-env.sh < ~/Projects/onap/integration/version-manifest/src/main/resources/docker-manifest.csv) +# envsubst < onap_openstack_template.env > onap_openstack.env + +sed '1d' | awk -F , '{ v=$1; gsub(".*[./]","",$1); gsub("-","_",$1); print "export " toupper($1) "_DOCKER=" $2 " # " v }' |