Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-github.com-googleapis-go-genproto
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-github.com-googleapis-go-genproto
Commits
85e46012
Unverified
Commit
85e46012
authored
6 years ago
by
Jean de Klerk
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
internal: add kokoro resources (#122)
parent
09cd0d62
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
internal/kokoro/test.sh
+32
-0
32 additions, 0 deletions
internal/kokoro/test.sh
internal/kokoro/trampoline.sh
+24
-0
24 additions, 0 deletions
internal/kokoro/trampoline.sh
internal/kokoro/vet.sh
+30
-0
30 additions, 0 deletions
internal/kokoro/vet.sh
with
86 additions
and
0 deletions
internal/kokoro/test.sh
0 → 100755
+
32
−
0
View file @
85e46012
#!/bin/bash
# TODO(deklerk) Add integration tests when it's secure to do so. b/64723143
# Fail on any error
set
-eo
pipefail
# Display commands being run
set
-x
# cd to project dir on Kokoro instance
cd
github/gax-go
go version
# Set $GOPATH
export
GOPATH
=
"
$HOME
/go"
export
GENPROTO_HOME
=
$GOPATH
/src/google/go-genproto
export
PATH
=
"
$GOPATH
/bin:
$PATH
"
mkdir
-p
$GENPROTO_HOME
# Move code into $GOPATH and get dependencies
git clone
.
$GENPROTO_HOME
cd
$GENPROTO_HOME
try3
()
{
eval
"
$*
"
||
eval
"
$*
"
||
eval
"
$*
"
;
}
try3 go get
-v
-t
./...
./internal/kokoro/vet.sh
# Run tests and tee output to log file, to be pushed to GCS as artifact.
go
test
-race
-v
./... 2>&1 |
tee
$KOKORO_ARTIFACTS_DIR
/
$KOKORO_GERRIT_CHANGE_NUMBER
.txt
This diff is collapsed.
Click to expand it.
internal/kokoro/trampoline.sh
0 → 100644
+
24
−
0
View file @
85e46012
#!/bin/bash
# Copyright 2018 Google Inc.
#
# 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.
set
-eo
pipefail
# Always run the cleanup script, regardless of the success of bouncing into
# the container.
function
cleanup
()
{
chmod
+x
${
KOKORO_GFILE_DIR
}
/trampoline_cleanup.sh
${
KOKORO_GFILE_DIR
}
/trampoline_cleanup.sh
echo
"cleanup"
;
}
trap
cleanup EXIT
python3
"
${
KOKORO_GFILE_DIR
}
/trampoline_v1.py"
This diff is collapsed.
Click to expand it.
internal/kokoro/vet.sh
0 → 100755
+
30
−
0
View file @
85e46012
#!/bin/bash
# Fail on any error
set
-eo
pipefail
# Display commands being run
set
-x
# Only run the linter on go1.11, since it needs type aliases (and we only care about its output once).
# TODO(deklerk) We should pass an environment variable from kokoro to decide this logic instead.
if
[[
`
go version
`
!=
*
"go1.11"
*
]]
;
then
exit
0
fi
pwd
try3
()
{
eval
"
$*
"
||
eval
"
$*
"
||
eval
"
$*
"
;
}
try3 go get
-u
\
golang.org/x/lint/golint
\
golang.org/x/tools/cmd/goimports
\
golang.org/x/lint/golint
\
honnef.co/go/tools/cmd/staticcheck
# Look at all .go files (ignoring .pb.go files) and make sure they have a Copyright. Fail if any don't.
git ls-files
"*[^.pb].go"
| xargs
grep
-L
"
\(
Copyright [0-9]
\{
4,
\}\)
"
2>&1 |
tee
/dev/stderr |
(!
read
)
gofmt
-s
-d
-l
.
2>&1 |
tee
/dev/stderr |
(!
read
)
goimports
-l
.
2>&1 |
tee
/dev/stderr |
(!
read
)
# No need to golint / staticcheck when it's just proto-generated files
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment