From 17b7761c89379134218ae46dd28be5ed5b45e722 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Mon, 6 Nov 2017 07:50:08 -0800 Subject: [PATCH] .ci: Remove travis CI This commit removes Travis CI from virtcontainers CI, and it adds the coveralls code coverage to the Jenkins script. Signed-off-by: Sebastien Boeuf --- .ci/jenkins_job_build.sh | 13 +++++++++++++ .ci/run.sh | 7 ++++--- .travis.yml | 30 ------------------------------ 3 files changed, 17 insertions(+), 33 deletions(-) delete mode 100644 .travis.yml diff --git a/.ci/jenkins_job_build.sh b/.ci/jenkins_job_build.sh index 0aa21be1..8a83d63d 100755 --- a/.ci/jenkins_job_build.sh +++ b/.ci/jenkins_job_build.sh @@ -24,6 +24,13 @@ export GOPATH=${HOME}/go export PATH=${GOPATH}/bin:/usr/local/go/bin:/usr/sbin:${PATH} export CI=true +# Download and build goveralls binary in case we need to submit the code +# coverage. +if [ ${COVERALLS_REPO_TOKEN} ] +then + go get github.com/mattn/goveralls +fi + # Get the repository and move HEAD to the appropriate commit. go get ${vc_repo} || true cd "${GOPATH}/src/${vc_repo}" @@ -37,3 +44,9 @@ fi # Setup environment and run the tests sudo -E PATH=$PATH bash .ci/setup.sh sudo -E PATH=$PATH bash .ci/run.sh + +# Publish the code coverage if needed. +if [ ${COVERALLS_REPO_TOKEN} ] +then + sudo -E PATH=${PATH} bash -c "${GOPATH}/bin/goveralls -repotoken=${COVERALLS_REPO_TOKEN} -coverprofile=profile.cov" +fi diff --git a/.ci/run.sh b/.ci/run.sh index 9c4f21b5..dbbae18c 100755 --- a/.ci/run.sh +++ b/.ci/run.sh @@ -1,3 +1,5 @@ +#!/bin/bash +# # Copyright (c) 2017 Intel Corporation # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,8 +15,6 @@ # limitations under the License. # -#!/bin/bash - set -e export CI=true @@ -28,5 +28,6 @@ sudo -E PATH=$PATH sh -c "go test -bench=CreateStartStopDeletePodQemuHypervisorN sudo -E PATH=$PATH sh -c "go test -bench=CreateStartStopDeletePodQemuHypervisorHyperstartAgentNetworkCNI -benchtime=60s" -cd "${GOPATH}/src/${tests_repo}" +pushd "${GOPATH}/src/${tests_repo}" .ci/run.sh +popd diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7f018ad0..00000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: go -sudo: required -go: -- 1.7 -- 1.8 -- tip -go_import_path: github.com/containers/virtcontainers - -env: -- COVERALLS_TOKEN=3NUr5Z9zvjIoGRlKi6WIA3Q9em3x22rZp - -services: -- docker - -install: -- go env -- sudo env "PATH=$PATH" bash $GOPATH/src/github.com/containers/virtcontainers/utils/virtcontainers-setup.sh -- make -- sudo make install - -script: -- make check - -after_success: -- go get github.com/mattn/goveralls -- "$GOPATH/bin/goveralls -service=travis-ci -coverprofile=profile.cov" - -notifications: - slack: - secure: ZZrkxKslIWyb4hoTfsKNNPayP1RVNMMm0z2HiYLE/hFXSg8kY01cnPMHUsVya//qw1J/t8O0jCByM7/nQrXEYPhKuU4cBt+hniZu8UL7aG4aBiTpimz5AlQ9mZA2DsnWkAGbYX0NZx1K8avD0jl4hzJFap4SAS+ZRLQun7QgzDu7VlAiu1YXEjjN1c22sFJzYJc+7Sl3r3KdLbsjAGWcJeOoiJRHJlWyxUyi8Z9MQfZnb2/tjChqZxi6f3HWDD2X2YReMhxUDcEuuntj0HHFXZnWsdDZOQgzB5jfnhR73fGwoEA3A7mswToF9NZbY57jbadQ5cO/1WguZD4sCIrtmuWbrvgwHMmyJUnhrh9t3S6J4aNu+cj8HV3eMddHOiEpi1/wb2lOXVBhltrynardGsLmy8gIGKo22yjovViwdtjF9vrcBqbzMGMK/bWLaprS3/TQ0VgHh3cgF/NiiVG9CULr8P9Zp8SMM0iu91pIzqw2BiunmczJ7L+bmKpDUvA1wMoyFHzKArfr0l2jAHJC5ptbNlZg3hIDI4xff633nnEWvHUK0j5tgz0aafqpW8NudO8FzgKXGvNHBoTRsbzGup9KIVECsl+J5rSW5gV9fNL4GB+J7H+xj0j7JNrACy2ept/Wi9UyosdN1On6NFiw5ucf71MJeaiS5g+xZqdrIuo=