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
e5100279
Commit
e5100279
authored
Dec 07, 2015
by
Tamer Tas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename githash to build_version and version to release_version
parent
810181fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
36 deletions
+39
-36
releasing.md
docs/devel/releasing.md
+18
-16
e2e.sh
hack/jenkins/e2e.sh
+13
-13
cut-official-release.sh
release/cut-official-release.sh
+8
-7
No files found.
docs/devel/releasing.md
View file @
e5100279
...
@@ -92,22 +92,24 @@ release from HEAD of the branch, (because you have to do some version-rev
...
@@ -92,22 +92,24 @@ release from HEAD of the branch, (because you have to do some version-rev
commits,) so choose the latest build on the release branch. (Remember, that
commits,) so choose the latest build on the release branch. (Remember, that
branch should be frozen.)
branch should be frozen.)
Once you find some greens, you can find the
git
hash for a build by looking at
Once you find some greens, you can find the
build
hash for a build by looking at
the Full Console Output and searching for
`
githash
=`
. You should see a line:
the Full Console Output and searching for
`
build_version
=`
. You should see a line:
```
console
```
console
githash
=v1.2.0-alpha.2.164+b44c7d79d6c9bb
build_version
=v1.2.0-alpha.2.164+b44c7d79d6c9bb
```
```
Or, if you're cutting from a release branch (i.e. doing an official release),
Or, if you're cutting from a release branch (i.e. doing an official release),
```
console
```
console
githash
=v1.1.0-beta.567+d79d6c9bbb44c7
build_version
=v1.1.0-beta.567+d79d6c9bbb44c7
```
```
Please note that
`build_version`
was called
`githash`
versions prior to v1.2.
Because Jenkins builds frequently, if you're looking between jobs
Because Jenkins builds frequently, if you're looking between jobs
(e.g.
`kubernetes-e2e-gke-ci`
and
`kubernetes-e2e-gce`
), there may be no single
(e.g.
`kubernetes-e2e-gke-ci`
and
`kubernetes-e2e-gce`
), there may be no single
`
githash
`
that's been run on both jobs. In that case, take the a green
`
build_version
`
that's been run on both jobs. In that case, take the a green
`kubernetes-e2e-gce`
build (but please check that it corresponds to a temporally
`kubernetes-e2e-gce`
build (but please check that it corresponds to a temporally
similar build that's green on
`kubernetes-e2e-gke-ci`
). Lastly, if you're having
similar build that's green on
`kubernetes-e2e-gke-ci`
). Lastly, if you're having
trouble understanding why the GKE continuous integration clusters are failing
trouble understanding why the GKE continuous integration clusters are failing
...
@@ -117,10 +119,10 @@ oncall.
...
@@ -117,10 +119,10 @@ oncall.
Before proceeding to the next step:
Before proceeding to the next step:
```
sh
```
sh
export
GITHASH
=
v1.2.0-alpha.2.164+b44c7d79d6c9bb
export
BUILD_VERSION
=
v1.2.0-alpha.2.164+b44c7d79d6c9bb
```
```
Where
`v1.2.0-alpha.2.164+b44c7d79d6c9bb`
is the
git
hash you decided on. This
Where
`v1.2.0-alpha.2.164+b44c7d79d6c9bb`
is the
build
hash you decided on. This
will become your release point.
will become your release point.
### Cutting/branching the release
### Cutting/branching the release
...
@@ -136,15 +138,15 @@ or `git checkout upstream/master` from an existing repo.
...
@@ -136,15 +138,15 @@ or `git checkout upstream/master` from an existing repo.
Decide what version you're cutting and export it:
Decide what version you're cutting and export it:
-
alpha release:
`export
VER
="vX.Y.0-alpha.W"`
;
-
alpha release:
`export
RELEASE_VERSION
="vX.Y.0-alpha.W"`
;
-
beta release:
`export
VER
="vX.Y.Z-beta.W"`
;
-
beta release:
`export
RELEASE_VERSION
="vX.Y.Z-beta.W"`
;
-
official release:
`export
VER
="vX.Y.Z"`
;
-
official release:
`export
RELEASE_VERSION
="vX.Y.Z"`
;
-
new release series:
`export
VER
="vX.Y"`
.
-
new release series:
`export
RELEASE_VERSION
="vX.Y"`
.
Then, run
Then, run
```
console
```
console
./release/cut-official-release.sh "$
{
VER
}
" "
${
GITHASH
}
"
./release/cut-official-release.sh "$
{
RELEASE_VERSION
}
" "
${
BUILD_VERSION
}
"
```
```
This will do a dry run of the release. It will give you instructions at the
This will do a dry run of the release. It will give you instructions at the
...
@@ -152,7 +154,7 @@ end for `pushd`ing into the dry-run directory and having a look around.
...
@@ -152,7 +154,7 @@ end for `pushd`ing into the dry-run directory and having a look around.
`pushd`
into the directory and make sure everythig looks as you expect:
`pushd`
into the directory and make sure everythig looks as you expect:
```
console
```
console
git log "$
{
VER
}
" # do you see the commit you expect?
git log "$
{
RELEASE_VERSION
}
" # do you see the commit you expect?
make release
make release
./cluster/kubectl.sh version -c
./cluster/kubectl.sh version -c
```
```
...
@@ -161,7 +163,7 @@ If you're satisfied with the result of the script, go back to `upstream/master`
...
@@ -161,7 +163,7 @@ If you're satisfied with the result of the script, go back to `upstream/master`
run
run
```
console
```
console
./release/cut-official-release.sh "$
{
VER
}
" "
${
GITHASH
}
" --no-dry-run
./release/cut-official-release.sh "$
{
RELEASE_VERSION
}
" "
${
BUILD_VERSION
}
" --no-dry-run
```
```
and follow the instructions.
and follow the instructions.
...
@@ -185,10 +187,10 @@ notes, (see #17444 for more info).
...
@@ -185,10 +187,10 @@ notes, (see #17444 for more info).
-
Only publish a beta release if it's a standalone pre-release. (We create
-
Only publish a beta release if it's a standalone pre-release. (We create
beta tags after we do official releases to maintain proper semantic
beta tags after we do official releases to maintain proper semantic
versioning,
*we don't publish these beta releases*
.) Use
versioning,
*we don't publish these beta releases*
.) Use
`./hack/cherry_pick_list.sh ${
VER
}`
to get release notes for such a
`./hack/cherry_pick_list.sh ${
RELEASE_VERSION
}`
to get release notes for such a
release.
release.
-
Official release:
-
Official release:
-
From your clone of upstream/master, run
`./hack/cherry_pick_list.sh ${
VER
}`
-
From your clone of upstream/master, run
`./hack/cherry_pick_list.sh ${
RELEASE_VERSION
}`
to get the release notes for the patch release you just created. Feel free
to get the release notes for the patch release you just created. Feel free
to prune anything internal, but typically for patch releases we tend to
to prune anything internal, but typically for patch releases we tend to
include everything in the release notes.
include everything in the release notes.
...
...
hack/jenkins/e2e.sh
View file @
e5100279
...
@@ -1276,32 +1276,32 @@ if [[ "${E2E_UP,,}" == "true" || "${JENKINS_FORCE_GET_TARS:-}" =~ ^[yY]$ ]]; the
...
@@ -1276,32 +1276,32 @@ if [[ "${E2E_UP,,}" == "true" || "${JENKINS_FORCE_GET_TARS:-}" =~ ^[yY]$ ]]; the
# "release/v0.19.1"
# "release/v0.19.1"
IFS
=
'/'
read
-a
varr
<<<
"
${
JENKINS_EXPLICIT_VERSION
}
"
IFS
=
'/'
read
-a
varr
<<<
"
${
JENKINS_EXPLICIT_VERSION
}
"
bucket
=
"
${
varr
[0]
}
"
bucket
=
"
${
varr
[0]
}
"
githash
=
"
${
varr
[1]
}
"
build_version
=
"
${
varr
[1]
}
"
echo
"Using explicit version
$bucket
/
$
githash
"
echo
"Using explicit version
$bucket
/
$
build_version
"
elif
[[
${
JENKINS_USE_SERVER_VERSION
:-}
=
~ ^[yY]
$
]]
;
then
elif
[[
${
JENKINS_USE_SERVER_VERSION
:-}
=
~ ^[yY]
$
]]
;
then
# for GKE we can use server default version.
# for GKE we can use server default version.
bucket
=
"release"
bucket
=
"release"
msg
=
$(
gcloud
${
CMD_GROUP
}
container get-server-config
--project
=
${
PROJECT
}
--zone
=
${
ZONE
}
|
grep
defaultClusterVersion
)
msg
=
$(
gcloud
${
CMD_GROUP
}
container get-server-config
--project
=
${
PROJECT
}
--zone
=
${
ZONE
}
|
grep
defaultClusterVersion
)
# msg will look like "defaultClusterVersion: 1.0.1". Strip
# msg will look like "defaultClusterVersion: 1.0.1". Strip
# everything up to, including ": "
# everything up to, including ": "
githash
=
"v
${
msg
##*
:
}
"
build_version
=
"v
${
msg
##*
:
}
"
echo
"Using server version
$bucket
/
$
githash
"
echo
"Using server version
$bucket
/
$
build_version
"
else
# use JENKINS_PUBLISHED_VERSION
else
# use JENKINS_PUBLISHED_VERSION
# Use a published version like "ci/latest" (default),
# Use a published version like "ci/latest" (default),
# "release/latest", "release/latest-1", or "release/stable"
# "release/latest", "release/latest-1", or "release/stable"
IFS
=
'/'
read
-a
varr
<<<
"
${
JENKINS_PUBLISHED_VERSION
}
"
IFS
=
'/'
read
-a
varr
<<<
"
${
JENKINS_PUBLISHED_VERSION
}
"
bucket
=
"
${
varr
[0]
}
"
bucket
=
"
${
varr
[0]
}
"
githash
=
$(
gsutil
cat
gs://kubernetes-release/
${
JENKINS_PUBLISHED_VERSION
}
.txt
)
build_version
=
$(
gsutil
cat
gs://kubernetes-release/
${
JENKINS_PUBLISHED_VERSION
}
.txt
)
echo
"Using published version
$bucket
/
$
githash
(from
${
JENKINS_PUBLISHED_VERSION
}
)"
echo
"Using published version
$bucket
/
$
build_version
(from
${
JENKINS_PUBLISHED_VERSION
}
)"
fi
fi
# At this point, we want to have the following vars set:
# At this point, we want to have the following vars set:
# - bucket
# - bucket
# -
githash
# -
build_version
gsutil
-m
cp
gs://kubernetes-release/
${
bucket
}
/
${
githash
}
/kubernetes.tar.gz gs://kubernetes-release/
${
bucket
}
/
${
githash
}
/kubernetes-test.tar.gz
.
gsutil
-m
cp
gs://kubernetes-release/
${
bucket
}
/
${
build_version
}
/kubernetes.tar.gz gs://kubernetes-release/
${
bucket
}
/
${
build_version
}
/kubernetes-test.tar.gz
.
# Set by GKE-CI to change the CLUSTER_API_VERSION to the git version
# Set by GKE-CI to change the CLUSTER_API_VERSION to the git version
if
[[
!
-z
${
E2E_SET_CLUSTER_API_VERSION
:-}
]]
;
then
if
[[
!
-z
${
E2E_SET_CLUSTER_API_VERSION
:-}
]]
;
then
export
CLUSTER_API_VERSION
=
$(
echo
${
githash
}
|
cut
-c
2-
)
export
CLUSTER_API_VERSION
=
$(
echo
${
build_version
}
|
cut
-c
2-
)
fi
fi
fi
fi
...
@@ -1392,10 +1392,10 @@ fi
...
@@ -1392,10 +1392,10 @@ fi
# with a nonzero error code if it was only tests that failed.
# with a nonzero error code if it was only tests that failed.
if
[[
"
${
E2E_TEST
,,
}
"
==
"true"
]]
;
then
if
[[
"
${
E2E_TEST
,,
}
"
==
"true"
]]
;
then
go run ./hack/e2e.go
${
E2E_OPT
}
-v
--test
--test_args
=
"
${
GINKGO_TEST_ARGS
}
"
&&
exitcode
=
0
||
exitcode
=
$?
go run ./hack/e2e.go
${
E2E_OPT
}
-v
--test
--test_args
=
"
${
GINKGO_TEST_ARGS
}
"
&&
exitcode
=
0
||
exitcode
=
$?
if
[[
"
${
E2E_PUBLISH_GREEN_VERSION
:-}
"
==
"true"
&&
${
exitcode
}
==
0
&&
-n
${
githash
:-}
]]
;
then
if
[[
"
${
E2E_PUBLISH_GREEN_VERSION
:-}
"
==
"true"
&&
${
exitcode
}
==
0
&&
-n
${
build_version
:-}
]]
;
then
echo
"publish
githash to ci/latest-green.txt:
${
githash
}
"
echo
"publish
build_version to ci/latest-green.txt:
${
build_version
}
"
echo
"
${
githash
}
"
>
${
WORKSPACE
}
/githash
.txt
echo
"
${
build_version
}
"
>
${
WORKSPACE
}
/build_version
.txt
gsutil
cp
${
WORKSPACE
}
/
githash
.txt gs://kubernetes-release/ci/latest-green.txt
gsutil
cp
${
WORKSPACE
}
/
build_version
.txt gs://kubernetes-release/ci/latest-green.txt
fi
fi
fi
fi
...
...
release/cut-official-release.sh
View file @
e5100279
...
@@ -29,8 +29,7 @@ function main() {
...
@@ -29,8 +29,7 @@ function main() {
exit
1
exit
1
fi
fi
local
-r
new_version
=
${
1
-
}
local
-r
new_version
=
${
1
-
}
# TODO(ihmccreery) Stop calling it githash; it's not a githash.
local
-r
build_version
=
${
2
-
}
local
-r
githash
=
${
2
-
}
DRY_RUN
=
true
DRY_RUN
=
true
if
[[
"
${
3
-
}
"
==
"--no-dry-run"
]]
;
then
if
[[
"
${
3
-
}
"
==
"--no-dry-run"
]]
;
then
echo
"!!! This NOT is a dry run."
echo
"!!! This NOT is a dry run."
...
@@ -73,13 +72,13 @@ function main() {
...
@@ -73,13 +72,13 @@ function main() {
exit
1
exit
1
fi
fi
# Get the git commit from the
githash
and verify it
# Get the git commit from the
build_version
and verify it
local
-r
git_commit_regex
=
"^[0-9a-f]{7}$"
local
-r
git_commit_regex
=
"^[0-9a-f]{7}$"
local
-r
git_commit
=
$(
echo
"
${
githash
}
"
|
awk
-F
'+'
'{print $2}'
|
head
-c7
)
local
-r
git_commit
=
$(
echo
"
${
build_version
}
"
|
awk
-F
'+'
'{print $2}'
|
head
-c7
)
if
!
[[
"
${
git_commit
}
"
=
~
$git_commit_regex
]]
;
then
if
!
[[
"
${
git_commit
}
"
=
~
$git_commit_regex
]]
;
then
usage
usage
echo
echo
echo
"!!! You specified an invalid
githash '
${
githash
}
'."
echo
"!!! You specified an invalid
build_version '
${
build_version
}
'."
echo
"!!! Tried to extract commit, got
${
git_commit
}
."
echo
"!!! Tried to extract commit, got
${
git_commit
}
."
exit
1
exit
1
fi
fi
...
@@ -189,9 +188,11 @@ EOM
...
@@ -189,9 +188,11 @@ EOM
}
}
function
usage
()
{
function
usage
()
{
echo
"Usage:
${
0
}
<
version> <githash
> [--no-dry-run]"
echo
"Usage:
${
0
}
<
release_version> <build_version
> [--no-dry-run]"
echo
echo
echo
"See docs/devel/releasing.md for more info."
echo
"<release_version> is the version you want to release,"
echo
"<build_version> is the version of the build you want to mark as <release-version>."
echo
"Please see docs/devel/releasing.md for more info."
}
}
function
check-prereqs
()
{
function
check-prereqs
()
{
...
...
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