Send both ubuntu versions to Robot VM
[demo.git] / heat / ONAP / manifest-to-env.sh
1 #!/bin/bash
2 #==================LICENSE_START==========================================
3 #
4 # Copyright (c) 2017 Huawei Technologies Co., Ltd.
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #        http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 #==================LICENSE_END============================================
18
19 # USAGE: Pipe in docker-manifest.csv from the integration repo.  This
20 # script converts it into a series of environment variable settings
21 # that can then be used with envsubst to set the docker versions in
22 # onap_openstack_template.env.
23 #
24 # EXAMPLE:
25 #   source <(./manifest-to-env.sh  < ~/Projects/onap/integration/version-manifest/src/main/resources/docker-manifest.csv)
26 #   envsubst < onap_openstack_template.env > onap_openstack.env
27
28 sed '1d' | awk -F , '{ v=$1; gsub(".*[./]","",$1); gsub("-","_",$1); print "export "  toupper($1) "_DOCKER=" $2 " # " v }'