Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
ci: azure: honor depends-on
Browse files Browse the repository at this point in the history
- Run depends-on for packaging CI.
- Change were yq is installed

Depends-on: github.com/kata-containers/runtime#1996

Fixes: #683

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Aug 21, 2019
1 parent 0ec23be commit 2d162a5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .ci/azure/pipelines/obs-packaging-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ jobs:
sudo apt-get install -y git
git config --global user.email "azure-pipeline@kata.io"
git config --global user.name "azure-pipeline"
.ci/packaging/setup.sh
displayName: 'Setup'
env:
CI: true
branch: $(system.pullRequest.targetBranch)
GITHUB_PR: $(system.pullRequest.pullRequestNumber)
- bash: |
# This is set by azure, but we use the same variable
Expand Down
19 changes: 19 additions & 0 deletions .ci/packaging/setup.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ get_from_kata_deps() {
else
versions_file="versions-${branch}.yaml"
fi

#make sure yq is installed
install_yq >&2

if [ ! -e "${versions_file}" ]; then
yaml_url="https://raw.githubusercontent.com/kata-containers/runtime/${branch}/versions.yaml"
echo "versions file (${versions_file}) does not exist" >&2
echo "Download from ${yaml_url}" >&2
#make sure yq is installed
install_yq >&2
curl --silent -o "${versions_file}" "$yaml_url"
fi
result=$("${GOPATH}/bin/yq" read "$versions_file" "$dependency")
Expand Down

0 comments on commit 2d162a5

Please sign in to comment.