Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prow testing + common build process #41

Merged
merged 60 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0535c0d
Initial commit from kubernetes-template-project
spiffxp Jan 16, 2019
b41cac3
Add files from github.com/pohly/csi-build-rules
spiffxp Jan 16, 2019
d23a16c
Port over information from kubernetes/org
spiffxp Jan 16, 2019
a113647
build.make: initial content
pohly Jan 21, 2019
51e16be
RELEASE.md: clarify release process
pohly Jan 21, 2019
c876547
README.md: update repo name, add initial setup step
pohly Jan 21, 2019
b32dd01
Merge pull request #1 from pohly/master
k8s-ci-robot Jan 21, 2019
f49080e
README.md: fix repo URL for initial setup
pohly Jan 22, 2019
520a04a
Merge pull request #2 from pohly/repo-fix
k8s-ci-robot Jan 22, 2019
73db459
verify-subtree.sh: ensure that there are no local commits
pohly Jan 23, 2019
9132a01
test: split up into individual targets, run all
pohly Jan 23, 2019
f28c6b6
test: verify that 'release-tools' subtree is clean
pohly Jan 23, 2019
3041b8a
Merge pull request #3 from pohly/verify-subtree
k8s-ci-robot Jan 23, 2019
154e33d
build.make: clarify usage of "make V=1"
pohly Jan 24, 2019
147892c
build.make: support suppressing checks
pohly Jan 24, 2019
09436b9
build.make: fix pushing of "canary" image from master branch
pohly Jan 25, 2019
b0336b5
build.make: more readable "make test" output
pohly Jan 25, 2019
be8a440
Merge pull request #4 from pohly/canary-fix
k8s-ci-robot Jan 25, 2019
33d58fd
Merge pull request #5 from pohly/test-enhancements
k8s-ci-robot Jan 25, 2019
cc564f9
verify-subtree.sh: relax check and ignore old content
pohly Mar 6, 2019
849db0a
Merge pull request #8 from pohly/subtree-check-relax
k8s-ci-robot Mar 6, 2019
94fc1e3
build.make: avoid unit-testing E2E test suite
pohly Mar 15, 2019
fb13c51
verify-shellcheck.sh: import from Kubernetes
pohly Mar 15, 2019
e6db50d
check vendor directory
pohly Mar 27, 2019
34010e7
Merge pull request #10 from pohly/vendor-check
k8s-ci-robot Mar 27, 2019
104a1ac
build.make: avoid unit-testing E2E test suite
pohly Mar 15, 2019
3b6af7b
Merge pull request #12 from pohly/local-e2e-suite
k8s-ci-robot Mar 29, 2019
b2d25d4
verify-shellcheck.sh: make it usable in csi-release-tools
pohly Mar 15, 2019
6c7ba1b
build.make: integrate shellcheck into "make test"
pohly Mar 26, 2019
55212ff
initial Prow test job
pohly Mar 15, 2019
2069a0a
Merge pull request #11 from pohly/verify-shellcheck
k8s-ci-robot Apr 2, 2019
0a0fd49
prow.sh: comment clarification
pohly Apr 2, 2019
429581c
prow.sh: pull Go version from travis.yml
pohly Apr 2, 2019
29545bb
prow.sh: take Go version from Kubernetes source
pohly Apr 3, 2019
741319b
prow.sh: improve building Kubernetes from source
pohly Apr 3, 2019
6602d38
prow.sh: different E2E suite depending on Kubernetes version
pohly Apr 3, 2019
d87eccb
prow.sh: switch back to upstream csi-driver-host-path
pohly Apr 3, 2019
95ae9de
Merge pull request #9 from pohly/prow
k8s-ci-robot Apr 3, 2019
f501443
prow.sh: AllAlpha=true for unknown Kubernetes versions
pohly Apr 5, 2019
31dfaf3
prow.sh: fix running of just "alpha" tests
pohly Apr 8, 2019
f3d1d2d
prow.sh: fix hostpath driver version check
pohly Apr 8, 2019
aa45a1c
prow.sh: more efficient execution of individual tests
pohly Apr 8, 2019
9b0d9cd
build.make: skip shellcheck if Docker is not available
pohly Apr 8, 2019
546d550
prow.sh: debug failing KinD cluster creation
pohly Apr 8, 2019
cda2fc5
prow.sh: avoid AllAlpha=true
pohly Apr 8, 2019
6617773
Merge pull request #13 from pohly/prow
k8s-ci-robot Apr 9, 2019
7aaac22
prow.sh: remove AllAlpha=all, part II
pohly Apr 10, 2019
c60f382
Merge pull request #14 from pohly/prow
k8s-ci-robot Apr 10, 2019
bb5336c
.prow.sh: enable Prow testing
pohly Apr 11, 2019
6d0e445
Add 'release-tools/' from commit 'c60f3823c09a501b1cc12b97b20eb05cec9…
pohly Apr 11, 2019
ff9bce4
Replace 'return' to 'exit' to fix shellcheck error
pengzhisun Apr 11, 2019
232c56a
build: use csi-release-tools
pohly Apr 11, 2019
0c2677e
Merge pull request #15 from pengzhisun/master
k8s-ci-robot Apr 11, 2019
a7a1f8c
Merge commit '0c2677e8fecad9bf904fca32b0319068d3eaa186' into prow
pohly Apr 11, 2019
0b10f6a
prow.sh: update csi-driver-host-path
pohly Apr 11, 2019
bcac1c1
Merge pull request #16 from pohly/prow
k8s-ci-robot Apr 11, 2019
b6bc04f
Merge commit 'bcac1c1fb6d791fe54a84716a5fdcccd0987a351' into prow
pohly Apr 11, 2019
0fafc66
prow.sh: skip sanity testing if component doesn't support it
pohly Apr 11, 2019
88dc9a4
Merge pull request #17 from pohly/prow
k8s-ci-robot Apr 11, 2019
7ff82fe
Merge commit '88dc9a47e5aa627fc28179087d8ee1caeb40ecac' into prow
pohly Apr 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 1 addition & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,49 +1 @@
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib

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

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736
.glide/

# OSX leaves these everywhere on SMB shares
._*

# OSX trash
.DS_Store

# Eclipse files
.classpath
.project
.settings/**

# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
.idea/
*.iml

# Vscode files
.vscode

# Emacs save files
*~
\#*\#
.\#*

# Vim-related files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist

# Ignore vi backup files
*~
# Ignore patches.
*.patch
/bin
5 changes: 5 additions & 0 deletions .prow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

. release-tools/prow.sh

main
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
37 changes: 3 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

REGISTRY_NAME = quay.io/k8scsi
IMAGE_VERSION = canary
IMAGE_NAME=livenessprobe
IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(IMAGE_VERSION)
CMDS=livenessprobe
all: build

.PHONY: all liveness clean test

ifdef V
TESTARGS = -v -args -alsologtostderr -v 5
else
TESTARGS =
endif

all: livenessprobe

livenessprobe:
mkdir -p bin
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o ./bin/livenessprobe ./cmd/livenessprobe

macos-livenessprobe:
mkdir -p bin
CGO_ENABLED=0 GOOS=darwin go build -a -ldflags '-extldflags "-static"' -o ./bin/livenessprobe.osx ./cmd/livenessprobe

livenessprobe-container: livenessprobe
docker build -t $(IMAGE_TAG) -f ./Dockerfile .

push: livenessprobe-container
docker push $(IMAGE_TAG)

clean:
rm -rf bin

test:
go test `go list ./... | grep -v 'vendor'` $(TESTARGS)
go vet `go list ./... | grep -v vendor`
include release-tools/build.make
7 changes: 7 additions & 0 deletions release-tools/.prow.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash -e
#
# This is for testing csi-release-tools itself in Prow. All other
# repos use prow.sh for that, but as csi-release-tools isn't a normal
# repo with some Go code in it, it has a custom Prow test script.

./verify-shellcheck.sh "$(pwd)"
31 changes: 31 additions & 0 deletions release-tools/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Contributing Guidelines

Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://github.com/kubernetes/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt:

_As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._

## Getting Started

We have full documentation on how to get started contributing here:

<!---
If your repo has certain guidelines for contribution, put them here ahead of the general k8s resources
-->

- [Contributor License Agreement](https://git.k8s.io/community/CLA.md) Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests
- [Kubernetes Contributor Guide](http://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](http://git.k8s.io/community/contributors/guide#contributing)
- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet.md) - Common resources for existing developers

## Mentorship

- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!

<!---
Custom Information - if you're copying this template for the first time you can add custom content here, for example:

## Contact Information

- [Slack channel](https://kubernetes.slack.com/messages/kubernetes-users) - Replace `kubernetes-users` with your slack channel string, this will send users directly to your channel.
- [Mailing list](URL)

-->
201 changes: 201 additions & 0 deletions release-tools/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

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.
11 changes: 11 additions & 0 deletions release-tools/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md

approvers:
- saad-ali
- msau42
- pohly

reviewers:
- saad-ali
- msau42
- pohly
Loading