From 57ca459d9b260fac65c6236de75a650adb1f04f4 Mon Sep 17 00:00:00 2001 From: Shubham Bajpai Date: Mon, 8 Mar 2021 18:09:58 +0530 Subject: [PATCH] chore(build): remove travis.yml file (#261) Signed-off-by: shubham --- .travis.yml | 93 ----------------------------------------------------- Makefile | 4 +-- README.md | 4 +-- build/push | 20 ++++++------ 4 files changed, 14 insertions(+), 107 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 249a3ca9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright © 2020 The OpenEBS Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -dist: bionic - -language: go - -go: - - 1.14.7 - -env: - global: - - ARCH=$(go env GOARCH) - - CHANGE_MINIKUBE_NONE_USER=true - - MINIKUBE_WANTUPDATENOTIFICATION=false - - MINIKUBE_WANTREPORTERRORPROMPT=false - - MINIKUBE_HOME=$HOME - - CHANGE_MINIKUBE_NONE_USER=true - - KUBECONFIG=$HOME/.kube/config - - RELEASE_TAG="$TRAVIS_TAG" - - BRANCH="$TRAVIS_BRANCH" - -sudo: required - -services: - - docker - -jobs: - include: - - os: linux - arch: amd64 - -addons: - apt: - update: true - -before_install: -- sudo apt-get -qq -y install conntrack - -install: - - if [ "$TRAVIS_BUILD_DIR" != "$GOPATH/src/github.com/openebs/cstor-operators" ]; then - mkdir -p $GOPATH/src/github.com/openebs/; - mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/openebs; - cd $GOPATH/src/github.com/openebs/cstor-operators; - fi - - make deps - -before_script: # TODO add golangci yaml config - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0 - - if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then - curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.18.1/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/; - curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.8.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/; - mkdir -p $HOME/.kube $HOME/.minikube; - touch $KUBECONFIG; - sudo minikube start --profile=minikube --vm-driver=none --kubernetes-version=v1.18.1; - minikube update-context --profile=minikube; - sudo chown -R "travis:" /home/travis/.minikube/; - eval "$(minikube docker-env --profile=minikube)" && export DOCKER_CLI='docker'; - JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done; - fi - -script: - - make test - - if [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then - make all.amd64 || exit 1; - fi - # Install openebs-operators, cstor-csi, ndm-operators and other - # dependencies. - - ./ci/sanity/install.sh - # Run the sanity integration test for cstor-operators - - ./ci/sanity/sanity.sh - -after_success: - - make deploy-images - -notifications: - email: - recipients: - - ashutosh.kumar@mayadata.io - - kiran.mova@mayadata.io - - prateek.pandey@mayadata.io - - shubham.bajpai@mayadata.io diff --git a/Makefile b/Makefile index 7f7b13c9..18571630 100644 --- a/Makefile +++ b/Makefile @@ -69,11 +69,11 @@ ifeq (${IMAGE_TAG}, ) export IMAGE_TAG endif -ifeq (${TRAVIS_TAG}, ) +ifeq (${RELEASE_TAG}, ) BASE_TAG = ci export BASE_TAG else - BASE_TAG = $(TRAVIS_TAG:v%=%) + BASE_TAG = $(RELEASE_TAG:v%=%) export BASE_TAG endif diff --git a/README.md b/README.md index ad2bbf3a..b4ca9044 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # cstor-operators -[![Go](https://github.com/openebs/cstor-operators/workflows/Go/badge.svg)](https://github.com/openebs/cstor-operators/actions) -[![Build Status](https://travis-ci.org/openebs/cstor-operators.svg?branch=master)](https://travis-ci.org/openebs/cstor-operators) +[![Go Report](https://goreportcard.com/badge/github.com/openebs/cstor-operators)](https://goreportcard.com/report/github.com/openebs/cstor-operators) +[![Build Status](https://github.com/openebs/cstor-operators/actions/workflows/build.yml/badge.svg)](https://github.com/openebs/cstor-operators/actions/workflows/build.yml) [![Slack](https://img.shields.io/badge/JOIN-SLACK-blue)](https://kubernetes.slack.com/messages/openebs/) OpenEBS Logo diff --git a/build/push b/build/push index 58538cb6..a9a4d174 100755 --- a/build/push +++ b/build/push @@ -59,11 +59,11 @@ BUILD_ID=$(git describe --tags --always) # Determine the current branch CURRENT_BRANCH="" -if [ -z ${TRAVIS_BRANCH} ]; +if [ -z ${BRANCH} ]; then CURRENT_BRANCH=$(git branch | grep \* | cut -d ' ' -f2) else - CURRENT_BRANCH=${TRAVIS_BRANCH} + CURRENT_BRANCH=${BRANCH} fi #Depending on the branch where builds are generated, @@ -107,12 +107,12 @@ then # This unique/build image will be pushed to corresponding ci repo. TagAndPushImage "${DIMAGE}-ci" "${BUILD_TAG}" - if [ ! -z "${TRAVIS_TAG}" ] ; + if [ ! -z "${RELEASE_TAG}" ] ; then # Push with different tags if tagged as a release - # When github is tagged with a release, then Travis will - # set the release tag in env TRAVIS_TAG - TagAndPushImage "${DIMAGE}" "${TRAVIS_TAG}" + # When github is tagged with a release, then github actions release workflow will + # set the release tag in env RELEASE_TAG + TagAndPushImage "${DIMAGE}" "${RELEASE_TAG}" TagAndPushImage "${DIMAGE}" "latest" fi; else @@ -127,12 +127,12 @@ then # Push CI tagged image - :ci or :branch-ci TagAndPushImage "quay.io/${DIMAGE}" "${CI_TAG}" - if [ ! -z "${TRAVIS_TAG}" ] ; + if [ ! -z "${RELEASE_TAG}" ] ; then # Push with different tags if tagged as a release - # When github is tagged with a release, then Travis will - # set the release tag in env TRAVIS_TAG - TagAndPushImage "quay.io/${DIMAGE}" "${TRAVIS_TAG}" + # When github is tagged with a release, then github actions release workflow will + # set the release tag in env RELEASE_TAG + TagAndPushImage "quay.io/${DIMAGE}" "${RELEASE_TAG}" TagAndPushImage "quay.io/${DIMAGE}" "latest" fi; else