Skip to content

Commit e311086

Browse files
authored
Makefile,*: cleanup and refactoring, support reproducible tests locally (#4023)
1 parent 718cc37 commit e311086

33 files changed

+364
-694
lines changed

.gitignore

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
# Folders
2-
vendor
3-
_obj
4-
_test
5-
_output
6-
.kube
72
.idea
83

9-
# Created by https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
4+
# Build artifacts
5+
/build
6+
/dist
7+
/tools/bin
8+
9+
# Website
10+
website/public/
11+
website/resources/
12+
website/node_modules/
13+
website/tech-doc-hugo
14+
15+
# samples bin
16+
testdata/go/memcached-operator/bin/*
17+
18+
19+
*\.DS_Store
20+
21+
# Created by https://www.toptal.com/developers/gitignore/api/go,vim,emacs,visualstudiocode
22+
# Edit at https://www.toptal.com/developers/gitignore?templates=go,vim,emacs,visualstudiocode
1023

1124
### Emacs ###
1225
# -*- mode: gitignore; -*-
@@ -55,6 +68,10 @@ flycheck_*.el
5568
# directory configuration
5669
.dir-locals.el
5770

71+
# network security
72+
/network-security.data
73+
74+
5875
### Go ###
5976
# Binaries for programs and plugins
6077
*.exe
@@ -63,7 +80,7 @@ flycheck_*.el
6380
*.so
6481
*.dylib
6582

66-
# Test binary, build with `go test -c`
83+
# Test binary, built with `go test -c`
6784
*.test
6885

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

8098
# Session
8199
Session.vim
100+
Sessionx.vim
82101

83102
# Temporary
84103
.netrwhist
@@ -89,31 +108,15 @@ tags
89108

90109
### VisualStudioCode ###
91110
.vscode/*
92-
93-
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
94-
95-
# Build artifacts
96-
/build
97-
test/ansible-operator/ansible-operator
98-
test/helm-operator/helm-operator
99-
images/scorecard-proxy/scorecard-proxy
100-
images/scorecard-test/scorecard-test
101-
images/scorecard-test-kuttl/scorecard-test-kuttl
102-
103-
# Test artifacts
104-
internal/ansible/runner/testdata/valid.yaml
105-
/bin
106-
internal/scorecard/examples/custom-scorecard-tests/go.sum
107-
108-
# Website
109-
website/public/
110-
website/resources/
111-
website/node_modules/
112-
website/tech-doc-hugo
113-
114-
# samples bin
115-
testdata/go/memcached-operator/bin/*
116-
117-
118-
*\.DS_Store
119-
111+
!.vscode/settings.json
112+
!.vscode/tasks.json
113+
!.vscode/launch.json
114+
!.vscode/extensions.json
115+
*.code-workspace
116+
117+
### VisualStudioCode Patch ###
118+
# Ignore all local history of files
119+
.history
120+
.ionide
121+
122+
# End of https://www.toptal.com/developers/gitignore/api/go,vim,emacs,visualstudiocode

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
run:
2+
timeout: 5m
13
linters:
24
enable:
35
- nakedret

.travis.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
os: linux
2-
branches:
3-
except:
4-
- release-4.2
5-
- release-4.3
6-
72
language: go
83
go_import_path: github.com/operator-framework/operator-sdk
9-
10-
# go modules require xenial for mercurial TLS 1.2 support
114
dist: xenial
125

136
# Python 3.6 is the default Python when language: python.
@@ -39,18 +32,12 @@ x_base_steps:
3932
# Base go, ansbile, and helm job
4033
- &test
4134
env:
42-
- CLUSTER=k8s
4335
# before_install for jobs that require go builds and do not run for doc-only changes
4436
before_install:
4537
# hack/ci/check-doc-only-update.sh needs to be sourced so
4638
# that it can properly exit the test early with success
4739
- source hack/ci/check-doc-only-update.sh
48-
- travis_retry make tidy
4940
- git fetch origin --unshallow --tags
50-
install:
51-
- make install
52-
- make setup-k8s
53-
- export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
5441
after_success:
5542
- echo "Tests passed"
5643
after_failure:
@@ -63,9 +50,7 @@ x_base_steps:
6350
# Base deploy job
6451
- &deploy
6552
before_install:
66-
- travis_retry make tidy
6753
- git fetch origin --unshallow --tags
68-
install: make install
6954
after_success:
7055
- echo "Image build succeeded, and docker image tagged and pushed to repository"
7156
after_failure:
@@ -124,15 +109,13 @@ jobs:
124109
- pip3 install --upgrade setuptools pip
125110
- pip install --user ansible~=2.9.13
126111
script:
127-
- make test-e2e-ansible
128-
- make test-e2e-ansible-molecule
112+
- make test-e2e-ansible test-e2e-ansible-molecule
129113

130114
# Test subcommands
131115
- <<: *test
132116
name: Subcommands and Integration on Kubernetes
133117
script:
134-
- make test-subcommand
135-
- make test-integration
118+
- make test-e2e-integration
136119

137120
# Build and test go
138121
- <<: *test

0 commit comments

Comments
 (0)