mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 12:44:39 +00:00
packaging/kernel: Remove old Jenkins pipeline
This Jenkins pipeline is no longer used and it references now archived repos. Fixes: #2422 Signed-off-by: Dan Middleton <dan.middleton@intel.com>
This commit is contained in:
parent
bff73de4d3
commit
c23ffef4eb
@ -1,8 +0,0 @@
|
|||||||
# Jenkins
|
|
||||||
|
|
||||||
Kata Containers uses [Jenkins](https://jenkins.io/)
|
|
||||||
for [its main CI](http://jenkins.katacontainers.io/).
|
|
||||||
|
|
||||||
This directory contains support files for the Jenkins
|
|
||||||
[pipeline](https://jenkins.io/doc/book/pipeline/)
|
|
||||||
[plugin](https://wiki.jenkins.io/display/JENKINS/Pipeline+Plugin).
|
|
@ -1,40 +0,0 @@
|
|||||||
// Copyright (c) 2019 Intel Corporation
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
|
||||||
//
|
|
||||||
pipeline {
|
|
||||||
agent none
|
|
||||||
parameters {
|
|
||||||
string(
|
|
||||||
name: 'BRANCH',
|
|
||||||
defaultValue:"master",
|
|
||||||
description: "Kata Containers Branch"
|
|
||||||
)
|
|
||||||
string(
|
|
||||||
name: 'NEW_VERSION',
|
|
||||||
defaultValue:"",
|
|
||||||
description: "Kata Containers version"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
environment {
|
|
||||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
||||||
BRANCH="${params.BRANCH}"
|
|
||||||
NEW_VERSION="${params.NEW_VERSION}"
|
|
||||||
}
|
|
||||||
stages {
|
|
||||||
stage('Bump repos') {
|
|
||||||
agent { label 'ubuntu-lts-latest-azure' }
|
|
||||||
steps {
|
|
||||||
sh 'git clone https://github.com/kata-containers/packaging.git'
|
|
||||||
withCredentials([string(credentialsId: 'katabuilder-git-bump', variable: 'GITHUB_TOKEN')]) {
|
|
||||||
dir("${WORKSPACE}/packaging/Jenkinsfiles/release_pipeline/") {
|
|
||||||
sh '''
|
|
||||||
./git_credential_cache.sh
|
|
||||||
./bump.sh "${NEW_VERSION}" "${BRANCH}"
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Copyright (c) 2019 Intel Corporation
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
export CI="true"
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
set -o errtrace
|
|
||||||
|
|
||||||
readonly script_name="$(basename "${BASH_SOURCE[0]}")"
|
|
||||||
|
|
||||||
function handle_error() {
|
|
||||||
local exit_code="${?}"
|
|
||||||
local line_number="${1:-}"
|
|
||||||
echo "Failed at $line_number: ${BASH_COMMAND}"
|
|
||||||
exit "${exit_code}"
|
|
||||||
}
|
|
||||||
trap 'handle_error $LINENO' ERR
|
|
||||||
|
|
||||||
die() {
|
|
||||||
echo >&2 "ERROR: $*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
install_go() {
|
|
||||||
echo "Installing go"
|
|
||||||
export GOROOT="/usr/local/go"
|
|
||||||
# shellcheck disable=SC2016
|
|
||||||
echo 'export PATH=$PATH:'"${GOROOT}/bin" | sudo tee -a /etc/profile
|
|
||||||
export PATH="$PATH:${GOROOT}/bin"
|
|
||||||
|
|
||||||
export GOPATH="${WORKSPACE}/go"
|
|
||||||
mkdir -p "${GOPATH}"
|
|
||||||
|
|
||||||
tests_repo="github.com/kata-containers/tests"
|
|
||||||
tests_repo_dir="${GOPATH}/src/${tests_repo}"
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
mkdir -p $(dirname "${tests_repo_dir}")
|
|
||||||
[ -d "${tests_repo_dir}" ] || git clone "https://${tests_repo}.git" "${tests_repo_dir}"
|
|
||||||
"${GOPATH}/src/${tests_repo}/.ci/install_go.sh" -p -f
|
|
||||||
go version
|
|
||||||
}
|
|
||||||
|
|
||||||
install_docker() {
|
|
||||||
echo "Installing docker"
|
|
||||||
sudo -E apt-get --no-install-recommends install -y apt-transport-https apt-utils ca-certificates software-properties-common
|
|
||||||
curl -sL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
||||||
arch=$(dpkg --print-architecture)
|
|
||||||
sudo -E add-apt-repository "deb [arch=${arch}] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
||||||
sudo -E apt-get update
|
|
||||||
sudo -E apt-get --no-install-recommends install -y docker-ce
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_git() {
|
|
||||||
echo "configuring git"
|
|
||||||
git config --global user.email "katabuilder@katacontainers.io"
|
|
||||||
git config --global user.name "katabuilder"
|
|
||||||
export HUB_PROTOCOL=https
|
|
||||||
}
|
|
||||||
|
|
||||||
bump_kata() {
|
|
||||||
new_version=${1:-}
|
|
||||||
branch=${2:-}
|
|
||||||
[ -n "${new_version}" ]
|
|
||||||
[ -n "${branch}" ]
|
|
||||||
readonly packaging_repo="github.com/kata-containers/packaging"
|
|
||||||
readonly packaging_repo_dir="${GOPATH}/src/${packaging_repo}"
|
|
||||||
[ -d "${packaging_repo_dir}" ] || git clone "https://${packaging_repo}.git" "${packaging_repo_dir}"
|
|
||||||
|
|
||||||
cd "${packaging_repo_dir}/release"
|
|
||||||
./update-repository-version.sh -p "$new_version" "$branch"
|
|
||||||
}
|
|
||||||
|
|
||||||
setup() {
|
|
||||||
setup_git
|
|
||||||
install_go
|
|
||||||
install_docker
|
|
||||||
}
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
exit_code="$1"
|
|
||||||
cat <<EOT
|
|
||||||
Usage:
|
|
||||||
${script_name} <args>
|
|
||||||
Args:
|
|
||||||
<new-version> : new version to bump kata
|
|
||||||
<branch> : branch target
|
|
||||||
Example:
|
|
||||||
${script_name} 1.10
|
|
||||||
EOT
|
|
||||||
|
|
||||||
exit "$exit_code"
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
new_version=${1:-}
|
|
||||||
branch=${2:-}
|
|
||||||
[ -n "${new_version}" ] || usage 1
|
|
||||||
[ -n "${branch}" ] || usage 1
|
|
||||||
echo "Start Release ${new_version} for branch ${branch}"
|
|
||||||
setup
|
|
||||||
bump_kata "${new_version}" "${branch}"
|
|
||||||
}
|
|
||||||
|
|
||||||
main $@
|
|
@ -1,58 +0,0 @@
|
|||||||
#!/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
|
|
||||||
|
|
||||||
die() {
|
|
||||||
echo >&2 "ERROR: $*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
init_git_credential_cache() {
|
|
||||||
#This is needed to setup github credentials to do push in a job
|
|
||||||
(
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
set -o errtrace
|
|
||||||
set +x
|
|
||||||
|
|
||||||
readonly token_sh=$(mktemp)
|
|
||||||
readonly agent_clone=$(mktemp -d)
|
|
||||||
finish() {
|
|
||||||
rm -rf "${token_sh}"
|
|
||||||
rm -rf "${agent_clone}"
|
|
||||||
}
|
|
||||||
trap finish EXIT
|
|
||||||
|
|
||||||
chmod 700 "${token_sh}"
|
|
||||||
cat <<EOT >"${token_sh}"
|
|
||||||
#!/bin/bash
|
|
||||||
echo "\$GITHUB_TOKEN"
|
|
||||||
EOT
|
|
||||||
export GIT_ASKPASS=${token_sh}
|
|
||||||
|
|
||||||
#cache credential
|
|
||||||
git config --global credential.helper cache
|
|
||||||
#setup credential
|
|
||||||
git clone https://github.com/katabuilder/agent.git "${agent_clone}"
|
|
||||||
cd "${agent_clone}" || exit 1
|
|
||||||
#this set the credential for first time
|
|
||||||
git push
|
|
||||||
# not needed anymore
|
|
||||||
unset GIT_ASKPASS
|
|
||||||
) >>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
[ -n "$GITHUB_TOKEN" ] || die "GITHUB_TOKEN not set"
|
|
||||||
init_git_credential_cache
|
|
||||||
}
|
|
||||||
|
|
||||||
main $@
|
|
@ -36,10 +36,6 @@ See [the ccloudvm documentation](ccloudvm).
|
|||||||
|
|
||||||
See [the release documentation](release).
|
See [the release documentation](release).
|
||||||
|
|
||||||
## Jenkins files
|
|
||||||
|
|
||||||
See [the Jenkins documentation](Jenkinsfiles).
|
|
||||||
|
|
||||||
## Packaging scripts
|
## Packaging scripts
|
||||||
|
|
||||||
See the [scripts documentation](scripts).
|
See the [scripts documentation](scripts).
|
||||||
|
Loading…
Reference in New Issue
Block a user