mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-10 04:18:26 +00:00
Merge pull request #684 from jcvenegas/depends-on
ci: azure: honor depends-on
This commit is contained in:
commit
94c36df640
@ -24,7 +24,12 @@ jobs:
|
|||||||
sudo apt-get install -y git
|
sudo apt-get install -y git
|
||||||
git config --global user.email "azure-pipeline@kata.io"
|
git config --global user.email "azure-pipeline@kata.io"
|
||||||
git config --global user.name "azure-pipeline"
|
git config --global user.name "azure-pipeline"
|
||||||
|
.ci/packaging/setup.sh
|
||||||
displayName: 'Setup'
|
displayName: 'Setup'
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
branch: $(system.pullRequest.targetBranch)
|
||||||
|
GITHUB_PR: $(system.pullRequest.pullRequestNumber)
|
||||||
|
|
||||||
- bash: |
|
- bash: |
|
||||||
# This is set by azure, but we use the same variable
|
# This is set by azure, but we use the same variable
|
||||||
|
19
.ci/packaging/setup.sh
Executable file
19
.ci/packaging/setup.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Intel Corporation
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
set -o errtrace
|
||||||
|
|
||||||
|
export GOPATH=~/go
|
||||||
|
export kata_repo="github.com/kata-containers/packaging"
|
||||||
|
export pr_number=${GITHUB_PR:-}
|
||||||
|
export pr_branch="PR_${pr_number}"
|
||||||
|
|
||||||
|
go get github.com/kata-containers/tests
|
||||||
|
${GOPATH}/src/github.com/kata-containers/tests/.ci/resolve-kata-dependencies.sh
|
@ -47,12 +47,14 @@ get_from_kata_deps() {
|
|||||||
else
|
else
|
||||||
versions_file="versions-${branch}.yaml"
|
versions_file="versions-${branch}.yaml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#make sure yq is installed
|
||||||
|
install_yq >&2
|
||||||
|
|
||||||
if [ ! -e "${versions_file}" ]; then
|
if [ ! -e "${versions_file}" ]; then
|
||||||
yaml_url="https://raw.githubusercontent.com/kata-containers/runtime/${branch}/versions.yaml"
|
yaml_url="https://raw.githubusercontent.com/kata-containers/runtime/${branch}/versions.yaml"
|
||||||
echo "versions file (${versions_file}) does not exist" >&2
|
echo "versions file (${versions_file}) does not exist" >&2
|
||||||
echo "Download from ${yaml_url}" >&2
|
echo "Download from ${yaml_url}" >&2
|
||||||
#make sure yq is installed
|
|
||||||
install_yq >&2
|
|
||||||
curl --silent -o "${versions_file}" "$yaml_url"
|
curl --silent -o "${versions_file}" "$yaml_url"
|
||||||
fi
|
fi
|
||||||
result=$("${GOPATH}/bin/yq" read "$versions_file" "$dependency")
|
result=$("${GOPATH}/bin/yq" read "$versions_file" "$dependency")
|
||||||
|
Loading…
Reference in New Issue
Block a user