mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-22 06:54:30 +01:00
dedup script
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
61
.github/workflows/dedup-jobs.yaml
vendored
Normal file
61
.github/workflows/dedup-jobs.yaml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
on:
|
||||
push
|
||||
|
||||
jobs:
|
||||
get-artifact-list:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: get the list
|
||||
run: |
|
||||
git clone https://github.com/kata-containers/packaging kata-packaging
|
||||
pushd kata-packaging
|
||||
tag=`echo $GITHUB_REF | cut -d/ -f3-`
|
||||
git checkout master
|
||||
popd
|
||||
./kata-packaging/artifact-list.sh > artifact-list.txt
|
||||
cat artifact-list.txt
|
||||
- name: save-artifact-list
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: artifact-list
|
||||
path: artifact-list.txt
|
||||
build-kernel:
|
||||
runs-on: ubuntu-16.04
|
||||
needs: get-artifact-list
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: get-artifact-list
|
||||
uses: actions/download-artifact@master
|
||||
with:
|
||||
name: artifact-list
|
||||
- name: build-kernel
|
||||
run: |
|
||||
if grep -q "install_kernel" ./artifact-list/artifact-list.txt; then
|
||||
ls -la $GITHUB_WORKSPACE
|
||||
.github/workflows/generate-artifact-tarball.sh "install_kernel" $GITHUB_REF
|
||||
# install kernel dependencies
|
||||
sudo apt-get update && sudo apt install -y flex bison libelf-dev bc iptables
|
||||
export GOPATH=$HOME/go
|
||||
go get github.com/kata-containers/packaging || true
|
||||
pushd $GOPATH/src/github.com/kata-containers/packaging/release >>/dev/null
|
||||
# Get versions information
|
||||
tag=`echo $GITHUB_REF | cut -d/ -f3-`
|
||||
git checkout $tag
|
||||
pushd ../obs-packaging
|
||||
./gen_versions_txt.sh $tag
|
||||
popd
|
||||
# Build the kernel:
|
||||
source ./kata-deploy-binaries.sh
|
||||
install_kernel
|
||||
echo ::set-env name=artifact-built::true
|
||||
popd >>/dev/null
|
||||
mv $HOME/go/src/github.com/kata-containers/packaging/release/kata-kernel.tar.gz .
|
||||
else
|
||||
echo ::set-env name=artifact-built::false
|
||||
fi
|
||||
- name: store-artifacts
|
||||
if: env.artifact-built == 'true'
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: kata-artifacts
|
||||
path: kata-kernel.tar.gz
|
||||
34
.github/workflows/generate-artifact-tarball.sh
vendored
Executable file
34
.github/workflows/generate-artifact-tarball.sh
vendored
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
[ -z "${DEBUG}" ] || set -x
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
|
||||
main() {
|
||||
artifact=${1:-}
|
||||
if [ -n "${artifact}" ]; then
|
||||
"Scripts needs artifact name to build"
|
||||
exit 1
|
||||
fi
|
||||
info "artifact name: ${artifact}"
|
||||
|
||||
github_ref=${2:-}
|
||||
if [ -n "${github_ref}" ]; then
|
||||
"Scripts needs githun reference to build"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tag=`echo ${github_ref} | cut -d/ -f3-`
|
||||
export GOPATH=$HOME/go
|
||||
|
||||
echo tag: "tag"
|
||||
echo artifact "artifact_name"
|
||||
}
|
||||
|
||||
main $@
|
||||
2
.github/workflows/kata-deploy.yaml
vendored
2
.github/workflows/kata-deploy.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
on: push
|
||||
#on: push
|
||||
|
||||
name: Build, Test, and Publish kata-deploy
|
||||
|
||||
|
||||
8
.github/workflows/main.yaml
vendored
8
.github/workflows/main.yaml
vendored
@@ -1,7 +1,7 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
#on:
|
||||
# push:
|
||||
# tags:
|
||||
# - '*'
|
||||
|
||||
jobs:
|
||||
get-artifact-list:
|
||||
|
||||
Reference in New Issue
Block a user