0871af69af30bfb0b9a32555fe6859abd2c3ada9
[ci-management.git] / jjb / csit / include-raw-csit-device-semiweekly.sh
1 #!/usr/bin/env bash
2
3 # Copyright (c) 2018 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 set -exuo pipefail
17
18 cd "${WORKSPACE}"
19 git clone https://gerrit.fd.io/r/csit --depth=1 --no-single-branch --no-checkout
20 pushd "${WORKSPACE}/csit"
21 if [[ -n "${CSIT_REF-}" ]]; then
22     git fetch --depth=1 https://gerrit.fd.io/r/csit "${CSIT_REF}"
23     git checkout FETCH_HEAD
24 else
25     git checkout HEAD
26 fi
27 popd
28 csit_entry_dir="${WORKSPACE}/csit/resources/libraries/bash/entry"
29 source "${csit_entry_dir}/with_oper_for_vpp.sh" "bootstrap_vpp_device.sh"