mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-28 12:31:04 +00:00
Merge pull request #408 from stevenhorsman/remove-outdated-ci
Remove outdated ci
This commit is contained in:
commit
105226b4aa
25
.ci/lib.sh
25
.ci/lib.sh
@ -1,25 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) 2019 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
export tests_repo="${tests_repo:-github.com/kata-containers/tests}"
|
|
||||||
export tests_repo_dir="$GOPATH/src/$tests_repo"
|
|
||||||
|
|
||||||
clone_tests_repo()
|
|
||||||
{
|
|
||||||
# KATA_CI_NO_NETWORK is (has to be) ignored if there is
|
|
||||||
# no existing clone.
|
|
||||||
if [ -d "$tests_repo_dir" -a -n "$KATA_CI_NO_NETWORK" ]
|
|
||||||
then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
go get -d -u "$tests_repo" || true
|
|
||||||
}
|
|
||||||
|
|
||||||
run_static_checks()
|
|
||||||
{
|
|
||||||
clone_tests_repo
|
|
||||||
bash "$tests_repo_dir/.ci/static-checks.sh" "github.com/kata-containers/community"
|
|
||||||
}
|
|
11
.ci/run.sh
11
.ci/run.sh
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (c) 2019 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# No explicit tests currently
|
|
||||||
true
|
|
17
.ci/setup.sh
17
.ci/setup.sh
@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (c) 2019 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cidir=$(dirname "$0")
|
|
||||||
source "${cidir}/lib.sh"
|
|
||||||
|
|
||||||
clone_tests_repo
|
|
||||||
|
|
||||||
pushd "${tests_repo_dir}"
|
|
||||||
.ci/setup.sh
|
|
||||||
popd
|
|
@ -1,12 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 Intel Corporation
|
# Copyright (c) 2024 IBM Corporation
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cidir=$(dirname "$0")
|
export kata_repo="${kata_repo:-github.com/kata-containers/kata-containers}"
|
||||||
source "${cidir}/lib.sh"
|
export kata_repo_dir="$GOPATH/src/$kata_repo"
|
||||||
|
export kata_default_branch="${kata_default_branch:-main}"
|
||||||
|
|
||||||
|
|
||||||
|
clone_kata_repo() {
|
||||||
|
if [ ! -d "${kata_repo_dir}" ]; then
|
||||||
|
mkdir -p "${kata_repo_dir}"
|
||||||
|
git clone "https://${kata_repo}.git" "${kata_repo_dir}"
|
||||||
|
pushd "${kata_repo_dir}" || exit
|
||||||
|
# Checkout to default branch
|
||||||
|
git checkout "${kata_default_branch}"
|
||||||
|
popd || exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
run_static_checks()
|
||||||
|
{
|
||||||
|
clone_kata_repo
|
||||||
|
INSTALL_IN_GOPATH=false bash "${kata_repo_dir}/ci/install_yq.sh"
|
||||||
|
bash "${kata_repo_dir}/tests/install_go.sh" -f -p
|
||||||
|
bash "${kata_repo_dir}/tests/static-checks.sh" "github.com/kata-containers/community"
|
||||||
|
}
|
||||||
|
|
||||||
run_static_checks
|
run_static_checks
|
||||||
|
55
.github/workflows/add-issues-to-project.yaml
vendored
55
.github/workflows/add-issues-to-project.yaml
vendored
@ -1,55 +0,0 @@
|
|||||||
# Copyright (c) 2020 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
name: Add newly created issues to the backlog project
|
|
||||||
|
|
||||||
on:
|
|
||||||
issues:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
add-new-issues-to-backlog:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Install hub
|
|
||||||
run: |
|
|
||||||
HUB_ARCH="amd64"
|
|
||||||
HUB_VER=$(curl -sL "https://api.github.com/repos/github/hub/releases/latest" |\
|
|
||||||
jq -r .tag_name | sed 's/^v//')
|
|
||||||
curl -sL \
|
|
||||||
"https://github.com/github/hub/releases/download/v${HUB_VER}/hub-linux-${HUB_ARCH}-${HUB_VER}.tgz" |\
|
|
||||||
tar xz --strip-components=2 --wildcards '*/bin/hub' && \
|
|
||||||
sudo install hub /usr/local/bin
|
|
||||||
|
|
||||||
- name: Install hub extension script
|
|
||||||
run: |
|
|
||||||
# Clone into a temporary directory to avoid overwriting
|
|
||||||
# any existing github directory.
|
|
||||||
pushd $(mktemp -d) &>/dev/null
|
|
||||||
git clone --single-branch --depth 1 "https://github.com/kata-containers/.github" && cd .github/scripts
|
|
||||||
sudo install hub-util.sh /usr/local/bin
|
|
||||||
popd &>/dev/null
|
|
||||||
|
|
||||||
- name: Checkout code to allow hub to communicate with the project
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Add issue to issue backlog
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.KATA_GITHUB_ACTIONS_TOKEN }}
|
|
||||||
run: |
|
|
||||||
issue=${{ github.event.issue.number }}
|
|
||||||
|
|
||||||
project_name="Issue backlog"
|
|
||||||
project_type="org"
|
|
||||||
project_column="To do"
|
|
||||||
|
|
||||||
hub-util.sh \
|
|
||||||
add-issue \
|
|
||||||
"$issue" \
|
|
||||||
"$project_name" \
|
|
||||||
"$project_type" \
|
|
||||||
"$project_column"
|
|
54
.github/workflows/main.yml
vendored
54
.github/workflows/main.yml
vendored
@ -1,42 +1,22 @@
|
|||||||
on: ["pull_request"]
|
on: ["pull_request"]
|
||||||
name: Static checks
|
name: Static checks
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
static-checks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
GO111MODULE: off
|
GOPATH: ${{ github.workspace }}
|
||||||
TRAVIS: "true"
|
|
||||||
TRAVIS_BRANCH: ${{ github.base_ref }}
|
|
||||||
TRAVIS_PULL_REQUEST_BRANCH: ${{ github.head_ref }}
|
|
||||||
TRAVIS_PULL_REQUEST_SHA : ${{ github.event.pull_request.head.sha }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
- name: Checkout code
|
||||||
uses: actions/setup-go@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
go-version: 1.19.3
|
fetch-depth: 0
|
||||||
- name: Setup GOPATH
|
path: ./src/github.com/${{ github.repository }}
|
||||||
run: |
|
|
||||||
gopath_org=$(go env GOPATH)/src/github.com/kata-containers/
|
- name: Install system dependencies
|
||||||
mkdir -p ${gopath_org}
|
run: |
|
||||||
ln -s ${PWD} ${gopath_org}
|
sudo apt-get -y install moreutils hunspell hunspell-en-gb hunspell-en-us pandoc
|
||||||
echo "TRAVIS_BRANCH: ${TRAVIS_BRANCH}"
|
|
||||||
echo "TRAVIS_PULL_REQUEST_BRANCH: ${TRAVIS_PULL_REQUEST_BRANCH}"
|
- name: Running static checks
|
||||||
echo "TRAVIS_PULL_REQUEST_SHA: ${TRAVIS_PULL_REQUEST_SHA}"
|
run: |
|
||||||
echo "TRAVIS: ${TRAVIS}"
|
export PATH=${GOPATH}/bin:${PATH}
|
||||||
- name: Checkout code
|
./src/github.com/${{ github.repository }}/.ci/static-checks.sh
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup travis references
|
|
||||||
run: |
|
|
||||||
echo "TRAVIS_BRANCH=${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = \"/\" } ; { print $3 }')}"
|
|
||||||
- name: Setup
|
|
||||||
run: |
|
|
||||||
community_repo=$(go env GOPATH)/src/github.com/kata-containers/community
|
|
||||||
pushd ${community_repo}
|
|
||||||
GOPATH=$(go env GOPATH) .ci/setup.sh
|
|
||||||
- name: Running static checks
|
|
||||||
run: |
|
|
||||||
community_repo=$(go env GOPATH)/src/github.com/kata-containers/community
|
|
||||||
pushd ${community_repo}
|
|
||||||
GOPATH=$(go env GOPATH) .ci/static-checks.sh
|
|
||||||
|
@ -1,78 +0,0 @@
|
|||||||
# Copyright (c) 2020 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
name: Move issues to "In progress" in backlog project when referenced by a PR
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types:
|
|
||||||
- opened
|
|
||||||
- reopened
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
move-linked-issues-to-in-progress:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Install hub
|
|
||||||
run: |
|
|
||||||
HUB_ARCH="amd64"
|
|
||||||
HUB_VER=$(curl -sL "https://api.github.com/repos/github/hub/releases/latest" |\
|
|
||||||
jq -r .tag_name | sed 's/^v//')
|
|
||||||
curl -sL \
|
|
||||||
"https://github.com/github/hub/releases/download/v${HUB_VER}/hub-linux-${HUB_ARCH}-${HUB_VER}.tgz" |\
|
|
||||||
tar xz --strip-components=2 --wildcards '*/bin/hub' && \
|
|
||||||
sudo install hub /usr/local/bin
|
|
||||||
|
|
||||||
- name: Install hub extension script
|
|
||||||
run: |
|
|
||||||
# Clone into a temporary directory to avoid overwriting
|
|
||||||
# any existing github directory.
|
|
||||||
pushd $(mktemp -d) &>/dev/null
|
|
||||||
git clone --single-branch --depth 1 "https://github.com/kata-containers/.github" && cd .github/scripts
|
|
||||||
sudo install hub-util.sh /usr/local/bin
|
|
||||||
popd &>/dev/null
|
|
||||||
|
|
||||||
- name: Checkout code to allow hub to communicate with the project
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Move issue to "In progress"
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.KATA_GITHUB_ACTIONS_TOKEN }}
|
|
||||||
run: |
|
|
||||||
pr=${{ github.event.pull_request.number }}
|
|
||||||
|
|
||||||
linked_issue_urls=$(hub-util.sh \
|
|
||||||
list-issues-for-pr "$pr" |\
|
|
||||||
grep -v "^\#" |\
|
|
||||||
cut -d';' -f3 || true)
|
|
||||||
|
|
||||||
# PR doesn't have any linked issues
|
|
||||||
# (it should, but maybe a new user forgot to add a "Fixes: #XXX" commit).
|
|
||||||
[ -z "$linked_issue_urls" ] && {
|
|
||||||
echo "::error::No linked issues for PR $pr"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
project_name="Issue backlog"
|
|
||||||
project_type="org"
|
|
||||||
project_column="In progress"
|
|
||||||
|
|
||||||
for issue_url in $(echo "$linked_issue_urls")
|
|
||||||
do
|
|
||||||
issue=$(echo "$issue_url"| awk -F\/ '{print $NF}' || true)
|
|
||||||
|
|
||||||
[ -z "$issue" ] && {
|
|
||||||
echo "::error::Cannot determine issue number from $issue_url for PR $pr"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Move the issue to the correct column on the project board
|
|
||||||
hub-util.sh \
|
|
||||||
move-issue \
|
|
||||||
"$issue" \
|
|
||||||
"$project_name" \
|
|
||||||
"$project_type" \
|
|
||||||
"$project_column"
|
|
||||||
done
|
|
Loading…
Reference in New Issue
Block a user