Skip to content

Commit

Permalink
Makefile,*: cleanup and refactoring, support reproducible tests local…
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanford authored Oct 19, 2020
1 parent 718cc37 commit e311086
Show file tree
Hide file tree
Showing 33 changed files with 364 additions and 694 deletions.
73 changes: 38 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
# Folders
vendor
_obj
_test
_output
.kube
.idea

# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
# Build artifacts
/build
/dist
/tools/bin

# Website
website/public/
website/resources/
website/node_modules/
website/tech-doc-hugo

# samples bin
testdata/go/memcached-operator/bin/*


*\.DS_Store

# Created by https://www.toptal.com/developers/gitignore/api/go,vim,emacs,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=go,vim,emacs,visualstudiocode

### Emacs ###
# -*- mode: gitignore; -*-
Expand Down Expand Up @@ -55,6 +68,10 @@ flycheck_*.el
# directory configuration
.dir-locals.el

# network security
/network-security.data


### Go ###
# Binaries for programs and plugins
*.exe
Expand All @@ -63,7 +80,7 @@ flycheck_*.el
*.so
*.dylib

# Test binary, build with `go test -c`
# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
Expand All @@ -72,13 +89,15 @@ flycheck_*.el
### Vim ###
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
Expand All @@ -89,31 +108,15 @@ tags

### VisualStudioCode ###
.vscode/*

# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode

# Build artifacts
/build
test/ansible-operator/ansible-operator
test/helm-operator/helm-operator
images/scorecard-proxy/scorecard-proxy
images/scorecard-test/scorecard-test
images/scorecard-test-kuttl/scorecard-test-kuttl

# Test artifacts
internal/ansible/runner/testdata/valid.yaml
/bin
internal/scorecard/examples/custom-scorecard-tests/go.sum

# Website
website/public/
website/resources/
website/node_modules/
website/tech-doc-hugo

# samples bin
testdata/go/memcached-operator/bin/*


*\.DS_Store

!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/go,vim,emacs,visualstudiocode
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
run:
timeout: 5m
linters:
enable:
- nakedret
Expand Down
21 changes: 2 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
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.
Expand Down Expand Up @@ -39,18 +32,12 @@ 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
- git fetch origin --unshallow --tags
install:
- make install
- make setup-k8s
- export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
after_success:
- echo "Tests passed"
after_failure:
Expand All @@ -63,9 +50,7 @@ x_base_steps:
# Base deploy job
- &deploy
before_install:
- travis_retry make tidy
- git fetch origin --unshallow --tags
install: make install
after_success:
- echo "Image build succeeded, and docker image tagged and pushed to repository"
after_failure:
Expand Down Expand Up @@ -124,15 +109,13 @@ jobs:
- pip3 install --upgrade setuptools pip
- pip install --user ansible~=2.9.13
script:
- make test-e2e-ansible
- make test-e2e-ansible-molecule
- make test-e2e-ansible test-e2e-ansible-molecule

# Test subcommands
- <<: *test
name: Subcommands and Integration on Kubernetes
script:
- make test-subcommand
- make test-integration
- make test-e2e-integration

# Build and test go
- <<: *test
Expand Down
Loading

0 comments on commit e311086

Please sign in to comment.