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

ci: Add initial CI scripts #23

Merged
merged 3 commits into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .ci/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
#
# Copyright (c) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

set -o errexit
set -o nounset
set -o pipefail

# This script will execute packaging tests suite
# TODO: Add steps needed to build packages
true
12 changes: 12 additions & 0 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

set -o errexit
set -o nounset
set -o pipefail

echo "Setup script for packaging"
14 changes: 14 additions & 0 deletions .ci/static-checks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

set -o errexit
set -o nounset
set -o pipefail

# This script should run any static analysis check
# It is called by the CI setup
true
13 changes: 13 additions & 0 deletions .ci/teardown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

set -o errexit
set -o nounset
set -o pipefail

# TODO: Add teardown steps as need
true
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#

MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
.PHONY: test test-release-tools

test: test-release-tools

test-release-tools:
@$(MK_DIR)/release/tag_repos_test.sh
3 changes: 2 additions & 1 deletion release/tag_repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ tag_repos() {

info "Creating tag ${kata_version} in all repos"
for repo in "${repos[@]}"; do
git clone --quiet "git@github.com:${OWNER}/${repo}.git"
git clone --quiet "https://github.com/${OWNER}/${repo}.git"
pushd "${repo}"
git remote set-url --push origin "git@github.com:${OWNER}/${repo}.git"
git fetch origin --tags
if git rev-parse -q --verify "refs/tags/${kata_version}"; then
info "$repo already has tag "
Expand Down
22 changes: 22 additions & 0 deletions release/tag_repos_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#

set -o errexit
set -o nounset
set -o pipefail

echo "Check tag_repos.sh show help"
./release/tag_repos.sh | grep Usage

echo "Check tag_repos.sh -h option"
./release/tag_repos.sh -h | grep Usage

echo "Check tag_repos.sh status"
./release/tag_repos.sh status | grep runtime

echo "Check tag_repos.sh create tags but not push"
./release/tag_repos.sh tag | grep "tags not pushed"