Apex: migrate promote jobs to use virtual deploy job
[releng.git] / jjb / releng / releng-release-verify.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018 The Linux Foundation and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 set -xe
11
12 # Activate virtualenv, supressing shellcheck warning
13 # shellcheck source=/dev/null
14 . $WORKSPACE/venv/bin/activate
15 pip install -r releases/scripts/requirements.txt
16
17 STREAM=${STREAM:-'nostream'}
18 RELEASE_FILES=$(git diff HEAD^1 --name-only -- "releases/$STREAM")
19
20 # TODO: The create_branch.py should be refactored so it can be used here
21 # to verify the commit exists that is being added, along with
22 # jjb/<project>
23 for release_file in $RELEASE_FILES; do
24     python releases/scripts/verify_schema.py \
25     -s releases/schema.yaml \
26     -y $release_file
27 done