Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
184779b5
Commit
184779b5
authored
Feb 09, 2016
by
Joe Finney
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19903 from spxtr/describe-build
Upload useful Jenkins build information to GCS.
parents
22ebb977
6ee9f13f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
131 additions
and
0 deletions
+131
-0
e2e-runner.sh
hack/jenkins/e2e-runner.sh
+5
-0
global.yaml
hack/jenkins/job-configs/global.yaml
+27
-0
kubernetes-build.yaml
hack/jenkins/job-configs/kubernetes-build.yaml
+1
-0
kubernetes-test-go.yaml
hack/jenkins/job-configs/kubernetes-test-go.yaml
+1
-0
upload-finished.sh
hack/jenkins/upload-finished.sh
+42
-0
upload-started.sh
hack/jenkins/upload-started.sh
+55
-0
No files found.
hack/jenkins/e2e-runner.sh
View file @
184779b5
...
...
@@ -115,6 +115,11 @@ fi
cd
kubernetes
# Upload build start time and k8s version to GCS, but not on PR Jenkins.
if
[[
!
"
${
JOB_NAME
}
"
=
~
-pull-
]]
;
then
bash <
(
curl
-fsS
--retry
3
"https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-started.sh"
)
fi
# Have cmd/e2e run by goe2e.sh generate JUnit report in ${WORKSPACE}/junit*.xml
ARTIFACTS
=
${
WORKSPACE
}
/_artifacts
mkdir
-p
${
ARTIFACTS
}
...
...
hack/jenkins/job-configs/global.yaml
View file @
184779b5
...
...
@@ -29,6 +29,33 @@
else
curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-to-gcs.sh" | bash -
fi
-
shell
:
|
curl -fsS --retry 3 "https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-finished.sh" > upload-finished.sh
chmod +x upload-finished.sh
-
conditional-step
:
condition-kind
:
current-status
condition-worst
:
SUCCESS
condition-best
:
SUCCESS
steps
:
-
shell
:
'
./upload-finished.sh
SUCCESS'
-
conditional-step
:
condition-kind
:
current-status
condition-worst
:
UNSTABLE
condition-best
:
UNSTABLE
steps
:
-
shell
:
'
./upload-finished.sh
UNSTABLE'
-
conditional-step
:
condition-kind
:
current-status
condition-worst
:
FAILURE
condition-best
:
FAILURE
steps
:
-
shell
:
'
./upload-finished.sh
FAILURE'
-
conditional-step
:
condition-kind
:
current-status
condition-worst
:
ABORTED
condition-best
:
ABORTED
steps
:
-
shell
:
'
./upload-finished.sh
ABORTED'
script-only-if-succeeded
:
False
script-only-if-failed
:
False
...
...
hack/jenkins/job-configs/kubernetes-build.yaml
View file @
184779b5
...
...
@@ -5,6 +5,7 @@
logrotate
:
numToKeep
:
200
builders
:
-
shell
:
'
bash
<(curl
-fsS
--retry
3
"https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-started.sh")'
-
shell
:
'
./hack/jenkins/build.sh'
properties
:
-
mail-watcher
...
...
hack/jenkins/job-configs/kubernetes-test-go.yaml
View file @
184779b5
...
...
@@ -7,6 +7,7 @@
numToKeep
:
200
node
:
unittest
builders
:
-
shell
:
'
bash
<(curl
-fsS
--retry
3
"https://raw.githubusercontent.com/kubernetes/kubernetes/master/hack/jenkins/upload-started.sh")'
-
shell
:
'
./hack/jenkins/gotest-dockerized.sh'
publishers
:
-
claim-build
...
...
hack/jenkins/upload-finished.sh
0 → 100755
View file @
184779b5
#!/bin/bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# 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.
# This is meant to be run at the end of every Jenkins job.
#
# Pass in the result of the build in $1. This will upload that, along with the
# current time, to GCS.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
if
[[
$#
-ne
1
]]
;
then
echo
"Usage: hack/jenkins/upload-finished.sh RESULT"
>
&2
exit
1
fi
readonly
result
=
"
$1
"
readonly
timestamp
=
$(
date
+%s
)
readonly
location
=
"gs://kubernetes-jenkins/logs/
${
JOB_NAME
}
/
${
BUILD_NUMBER
}
/finished.json"
echo
"Uploading build result to:
${
location
}
"
gsutil
-q
cp
-a
"public-read"
<
(
echo
"{"
echo
"
\"
result
\"
:
\"
${
result
}
\"
,"
echo
"
\"
timestamp
\"
:
${
timestamp
}
"
echo
"}"
)
"
${
location
}
"
hack/jenkins/upload-started.sh
0 → 100755
View file @
184779b5
#!/bin/bash
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# 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.
# This is meant to be run at the start of every Jenkins job.
#
# Discovers the local kubernetes version and uploads it, along with
# the current time, to GCS.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
version
=
""
readonly
timestamp
=
$(
date
+%s
)
readonly
location
=
"gs://kubernetes-jenkins/logs/
${
JOB_NAME
}
/
${
BUILD_NUMBER
}
/started.json"
# Try to discover the kubernetes version.
if
[[
-e
"version"
]]
;
then
version
=
$(
cat
"version"
)
elif
[[
-e
"hack/lib/version.sh"
]]
;
then
version
=
$(
export
KUBE_ROOT
=
"."
source
"hack/lib/version.sh"
kube::version::get_version_vars
echo
"
${
KUBE_GIT_VERSION
-
}
"
)
fi
if
[[
-n
"
${
version
}
"
]]
;
then
echo
"Found Kubernetes version:
${
version
}
"
else
echo
"Could not find Kubernetes version"
fi
echo
"Uploading version to:
${
location
}
"
gsutil
-q
cp
-a
"public-read"
<
(
echo
"{"
echo
"
\"
version
\"
:
\"
${
version
}
\"
,"
echo
"
\"
timestamp
\"
:
${
timestamp
}
"
echo
"}"
)
"
${
location
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment