summaryrefslogtreecommitdiffstats
path: root/puppet/deploy-artifacts.sh
blob: 4e1ad89fe34d1c6a91da719a60c26b4b61249fed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash

TMP_DATA=$(mktemp -d)
function cleanup {
  rm -Rf "$TMP_DATA"
}
trap cleanup EXIT

if [ -n "$artifact_urls" ]; then
  for URL in $(echo $artifact_urls | sed -e "s| |\n|g" | sort -u); do
    curl --globoff -o $TMP_DATA/file_data "$URL"
    if file -b $TMP_DATA/file_data | grep RPM &>/dev/null; then
      yum install -y $TMP_DATA/file_data
    elif file -b $TMP_DATA/file_data | grep 'gzip compressed data' &>/dev/null; then
      pushd /
      tar xvzf $TMP_DATA/file_data
      popd
    else
      echo "ERROR: Unsupported file format."
      exit 1
    fi
    rm $TMP_DATA/file_data
  done
else
  echo "No artifact_urls was set. Skipping..."
fi
n>: 'Yardstick' mailing_list: type: 'mailman2' url: 'opnfv-tech-discuss@lists.opnfv.org' tag: '[yardstick]' realtime_discussion: type: irc server: 'freenode.net' channel: '#opnfv-yardstick' meetings: - type: 'gotomeeting+irc' agenda: 'https://wiki.opnfv.org/display/yardstick/Yardstick+Meetings' url: 'https://global.gotomeeting.com/join/819733085' server: 'freenode.net' channel: '#opnfv-yardstick' repeats: 'weekly' time: '08:30 UTC' repositories: - 'yardstick' committers: - <<: *opnfv_yardstick_ptl - name: 'Kubi' email: 'jean.gaoliang@huawei.com' company: 'huawei.com' id: 'kubi' - name: 'Jing Lu' email: 'lvjing5@huawei.com' company: 'huawei.com' id: 'JingLu5' - name: 'zhihui wu' email: 'wu.zhihui1@zte.com.cn' company: 'zte.com.cn' id: 'wu.zhihui' - name: 'Trevor Cooper' email: 'trevor.cooper@intel.com' company: 'intel.com' id: 'trev' - name: 'Jack Chan' email: 'chenjiankun1@huawei.com' company: 'huawei.com' id: 'chenjiankun' - name: 'Emma Foley' email: 'emma.l.foley@intel.com' company: 'intel.com' id: 'elfoley' - name: 'Rodolfo Alonso Hernandez' email: 'rodolfo.alonso.hernandez@intel.com' company: 'intel.com' id: 'rodolfo.ah' - name: 'Kanglin Yin' email: '14_ykl@tongji.edu.cn' company: 'tongji.edu.cn' id: 'tjuyinkanglin' - name: 'Abhijit Sinha' email: 'abhijit.sinha@intel.com' company: 'intel.com' id: 'abhijitsinha' - name: 'Ross Brattain' email: 'ross.b.brattain@intel.com' id: 'rbbratta' company: 'intel.com' tsc: # yamllint disable rule:line-length approval: 'http//meetbot.opnfv.org/meetings/' # yamllint enable rule:line-length