blob: fd432636a73d035f88e8891ac37fd10c24c26192 [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:-}"
Eric Ballf89cdba2025-08-26 16:12:55 -070022REPO="https://gerrit.lfbroadband.org/$PROJECT"
Eric Ball3f0cec32024-10-10 17:16:03 -070023
24cd $WORKSPACE
25git clone "$REPO" "$PROJECT"
26cd "$PROJECT"
27git submodule update --init
28
Eric Ballf89cdba2025-08-26 16:12:55 -070029REPO="https://gerrit.lfbroadband.org/onf-make"
Eric Ball3f0cec32024-10-10 17:16:03 -070030
31pushd "$ONF_MAKE_SUBDIR"
32git fetch "$REPO" "$GERRIT_REFSPEC" && git checkout FETCH_HEAD
33popd