1 Star 0 Fork 3

durant_zhao/operator-sdk

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 8.11 KB
一键复制 编辑 原始数据 按行查看 历史
os: linux
branches:
except:
- release-4.2
- release-4.3
language: go
go_import_path: github.com/operator-framework/operator-sdk
# go modules require xenial for mercurial TLS 1.2 support
dist: xenial
# Python 3.6 is the default Python when language: python.
# But when not language: python, Python 3 can not be used by default.
# There is pip (/usr/bin/pip), but not pip3.
# Because of it the global env is required.
env:
global:
- PATH=/opt/python/3.6.7/bin:$PATH
# Install python3 and utilities dependencies
addons:
apt:
packages:
- "python3"
- "python3-pip"
cache:
directories:
- $HOME/.cache/go-build
go:
- 1.13.x
# The `x_base_steps` top-level key is unknown to travis,
# so we can use it to create a bunch of common build step
# YAML anchors which we use in our build jobs.
x_base_steps:
# Base go, ansbile, and helm job
- &test
env:
- CLUSTER=k8s
# before_install for jobs that require go builds and do not run for doc-only changes
before_install:
# hack/ci/check-doc-only-update.sh needs to be sourced so
# that it can properly exit the test early with success
- source hack/ci/check-doc-only-update.sh
- travis_retry make tidy
install:
- make install
- make setup-k8s
- export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
after_success:
- echo "Tests passed"
after_failure:
- echo "Tests failed"
- kubectl get all --all-namespaces
- kubectl get events --all-namespaces --field-selector=type=Warning
services:
- docker
# Base deploy job
- &deploy
before_install:
- travis_retry make tidy
install: make install
before_script:
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch --unshallow --tags
after_success:
- echo "Image build succeeded, and docker image tagged and pushed to repository"
after_failure:
- echo "Image build, docker image tagging, or docker image pushing to repository failed"
services:
- docker
# Manifest list deploy job
- &manifest-deploy
before_script:
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
- git fetch --unshallow --tags
# TODO: remove the chmod command when docker-ce on travis is upgraded to 18.09.0+.
# We need /etc/docker to be accessible to non-root users.
# See https://github.com/moby/moby/pull/37847.
- sudo chmod 0755 /etc/docker
after_success:
- echo "Manifest list push to registry succeeded"
after_failure:
- echo "Manifest list creation or push to registry failed"
services:
- docker
stages:
- check
- test
- name: deploy
if: type != pull_request AND ( tag IS present OR branch = master OR commit_message =~ /\[travis deploy\]/ )
- name: deploy-manifest-multiarch
if: type != pull_request AND ( tag IS present OR branch = master OR commit_message =~ /\[travis deploy\]/ )
jobs:
include:
## Project check stage jobs ##
# Run the sanity tests
- stage: check
name: Sanity Tests
script:
- make test-sanity
# Run website checks
- name: Doc Checks
script:
- make test-links
## Operator test stage jobs ##
# Build and test ansible and test ansible using molecule
- stage: test
<<: *test
name: Ansible on Kubernetes
before_script:
- pip3 install --upgrade setuptools pip
- pip install --user ansible
script:
- make test-e2e-ansible
- make test-e2e-ansible-molecule
# Test subcommands
- <<: *test
name: Subcommands and Integration on Kubernetes
script:
- make test-subcommand
- make test-integration
# Build and test go
- <<: *test
name: Go on Kubernetes
before_script:
- (cd / && go get github.com/mattn/goveralls)
script:
- make test-unit
- make test-e2e-go
after_success:
- $GOPATH/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken=$COVERALLS_TOKEN
# Build and test helm
- <<: *test
name: Helm on Kubernetes
script: make test-e2e-helm
## Image deploy/push stage jobs ##
# Build and deploy arm64 ansible-operator docker image
- stage: deploy
<<: *deploy
name: Docker image for ansible-operator (arm64)
arch: arm64
script:
- make image-build-ansible
- make image-push-ansible
# Build and deploy amd64 ansible-operator docker image
- <<: *deploy
name: Docker image for ansible-operator (amd64)
arch: amd64
script:
- make image-build-ansible
- make image-push-ansible
# Build and deploy ppc64le ansible-operator docker image
- <<: *deploy
name: Docker image for ansible-operator (ppc64le)
arch: ppc64le
script:
- make image-build-ansible
- make image-push-ansible
# Build and deploy s390x ansible-operator docker image
- <<: *deploy
name: Docker image for ansible-operator (s390x)
arch: s390x
script:
- make image-build-ansible
- make image-push-ansible
# Build and deploy arm64 helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (arm64)
arch: arm64
script:
- make image-build-helm
- make image-push-helm
# Build and deploy amd64 helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (amd64)
arch: amd64
script:
- make image-build-helm
- make image-push-helm
# Build and deploy ppc64le helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (ppc64le)
arch: ppc64le
script:
- make image-build-helm
- make image-push-helm
# Build and deploy s390x helm-operator docker image
- <<: *deploy
name: Docker image for helm-operator (s390x)
arch: s390x
script:
- make image-build-helm
- make image-push-helm
# Build and deploy arm64 scorecard-test docker image
- <<: *deploy
name: Docker image for scorecard-test (arm64)
arch: arm64
script:
- make image-build-scorecard-test
- make image-push-scorecard-test
# Build and deploy amd64 scorecard-test docker image
- <<: *deploy
name: Docker image for scorecard-test (amd64)
arch: amd64
script:
- make image-build-scorecard-test
- make image-push-scorecard-test
# Build and deploy ppc64le scorecard-test docker image
- <<: *deploy
name: Docker image for scorecard-test (ppc64le)
arch: ppc64le
script:
- make image-build-scorecard-test
- make image-push-scorecard-test
# Build and deploy s390x scorecard-test docker image
- <<: *deploy
name: Docker image for scorecard-test (s390x)
arch: s390x
script:
- make image-build-scorecard-test
- make image-push-scorecard-test
# Build and deploy amd64 scorecard-test-kuttl docker image
- <<: *deploy
name: Docker image for scorecard-test-kuttl (amd64)
arch: amd64
script:
- make image-build-scorecard-test-kuttl
- make image-push-scorecard-test-kuttl
# Build and deploy ansible multi-arch manifest list
- stage: deploy-manifest-multiarch
<<: *manifest-deploy
name: Manifest list for ansible-operator
script:
- make image-push-ansible-multiarch
# Build and deploy helm multi-arch manifest list
- <<: *manifest-deploy
name: Manifest list for helm-operator
script:
- make image-push-helm-multiarch
# Build and deploy scorecard-test multi-arch manifest list
- <<: *manifest-deploy
name: Manifest list for scorecard-test
script:
- make image-push-scorecard-test-multiarch
# Build and deploy scorecard-test-kuttl multi-arch manifest list
# only amd64 is supported in base kudobuilder/kuttl image
# which is why we only support amd64 for scorecard-test-kuttl
- <<: *manifest-deploy
name: Manifest list for scorecard-test-kuttl
script:
- make image-push-scorecard-test-kuttl-multiarch
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/durant__zhao/operator-sdk.git
git@gitee.com:durant__zhao/operator-sdk.git
durant__zhao
operator-sdk
operator-sdk
master

搜索帮助