blob: ab360bbd7ea02a415c918495a75b28f7885521fe [file] [log] [blame]
Eric Ball3f0cec32024-10-10 17:16:03 -07001#!/usr/bin/env bash
2
3# Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
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# get-onf-make-patch.sh - Pull the patch of onf-make that triggered the job
18# for testing
19
20ONF_MAKE_SUBDIR="lf/onf-make"
21PROJECT="${TEST_PROJECT:-}"
22REPO="https://gerrit.opencord.org/$PROJECT"
23
24cd $WORKSPACE
25git clone "$REPO" "$PROJECT"
26cd "$PROJECT"
27git submodule update --init
28
29REPO="https://gerrit.opencord.org/onf-make"
30
31pushd "$ONF_MAKE_SUBDIR"
32git fetch "$REPO" "$GERRIT_REFSPEC" && git checkout FETCH_HEAD
33popd