Skip to content

Commit

Permalink
Merge pull request openshift#182 from tdawson/OSEv3.2.0.19
Browse files Browse the repository at this point in the history
OSEv3.2.0.19
  • Loading branch information
tdawson committed Apr 22, 2016
2 parents 4fec8fb + 929bb12 commit ee59b65
Show file tree
Hide file tree
Showing 28 changed files with 267 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .tito/packages/atomic-openshift
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.0.18 ./
3.2.0.19 ./
16 changes: 12 additions & 4 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,18 @@ os::build::extract_tar() {
local archive_file="$1"
local change_dir="$2"

if [[ -z "${archive_file}" ]]; then
return 0
fi

local tar_flags="--strip-components=1"

# Unpack archive
echo "++ Extracting $(basename ${archive_file})"
if [[ "${archive_file}" == *.zip ]]; then
unzip -o "${archive_file}" -d "${change_dir}"
return 0
fi
if os::build::is_hardlink_supported "${change_dir}" ; then
# Ensure that tar won't try to set an owner when extracting to an
# nfs mount. Setting ownership on an nfs mount is likely to fail
Expand Down Expand Up @@ -571,19 +579,19 @@ os::build::detect_local_release_tars() {
local primary=$(find ${OS_LOCAL_RELEASEPATH} -maxdepth 1 -type f -name openshift-origin-server-*-${platform}* \( -name *.tar.gz -or -name *.zip \))
if [[ $(echo "${primary}" | wc -l) -ne 1 || -z "${primary}" ]]; then
echo "There should be exactly one ${platform} server tar in $OS_LOCAL_RELEASEPATH"
return 2
[[ -z "${WARN-}" ]] && return 2
fi

local client=$(find ${OS_LOCAL_RELEASEPATH} -maxdepth 1 -type f -name openshift-origin-client-tools-*-${platform}* \( -name *.tar.gz -or -name *.zip \))
if [[ $(echo "${client}" | wc -l) -ne 1 || -z "${primary}" ]]; then
if [[ $(echo "${client}" | wc -l) -ne 1 || -z "${client}" ]]; then
echo "There should be exactly one ${platform} client tar in $OS_LOCAL_RELEASEPATH"
return 2
[[ -n "${WARN-}" ]] || return 2
fi

local image=$(find ${OS_LOCAL_RELEASEPATH} -maxdepth 1 -type f -name openshift-origin-image*-${platform}* \( -name *.tar.gz -or -name *.zip \))
if [[ $(echo "${image}" | wc -l) -ne 1 || -z "${image}" ]]; then
echo "There should be exactly one ${platform} image tar in $OS_LOCAL_RELEASEPATH"
return 2
[[ -n "${WARN-}" ]] || return 2
fi

export OS_PRIMARY_RELEASE_TAR="${primary}"
Expand Down
12 changes: 6 additions & 6 deletions hack/extract-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ source "${OS_ROOT}/hack/common.sh"
# Go to the top of the tree.
cd "${OS_ROOT}"

# Copy the linux release archives release back to the local _output/local/bin/linux/amd64 directory.
# TODO: support different OS's?
# Copy the release archives release back to the local _output/local/bin/... directories.
# NOTE: On Mac and Windows you must pass WARN=1 in order to extract the output.
os::build::detect_local_release_tars $(os::build::host_platform_friendly)

mkdir -p "${OS_OUTPUT_BINPATH}/linux/amd64"
os::build::extract_tar "${OS_PRIMARY_RELEASE_TAR}" "${OS_OUTPUT_BINPATH}/linux/amd64"
os::build::extract_tar "${OS_CLIENT_RELEASE_TAR}" "${OS_OUTPUT_BINPATH}/linux/amd64"
os::build::extract_tar "${OS_IMAGE_RELEASE_TAR}" "${OS_OUTPUT_BINPATH}/linux/amd64"
mkdir -p "${OS_OUTPUT_BINPATH}/$(os::build::host_platform)"
os::build::extract_tar "${OS_PRIMARY_RELEASE_TAR}" "${OS_OUTPUT_BINPATH}/$(os::build::host_platform)"
os::build::extract_tar "${OS_CLIENT_RELEASE_TAR}" "${OS_OUTPUT_BINPATH}/$(os::build::host_platform)"
os::build::extract_tar "${OS_IMAGE_RELEASE_TAR}" "${OS_OUTPUT_BINPATH}/$(os::build::host_platform)"

os::build::make_openshift_binary_symlinks
22 changes: 19 additions & 3 deletions origin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
# %commit and %ldflags are intended to be set by tito custom builders provided
# in the .tito/lib directory. The values in this spec file will not be kept up to date.
%{!?commit:
%global commit 1837ea02fc1712349335101de2e678e077a35132
%global commit 320f70f1d0043d88bdea241e5146190c3501d546
}
%global shortcommit %(c=%{commit}; echo ${c:0:7})
# ldflags from hack/common.sh os::build:ldflags
%{!?ldflags:
%global ldflags -X github.com/openshift/origin/pkg/version.majorFromGit 3 -X github.com/openshift/origin/pkg/version.minorFromGit 2+ -X github.com/openshift/origin/pkg/version.versionFromGit v3.2.0.17-30-g1837ea0 -X github.com/openshift/origin/pkg/version.commitFromGit 1837ea0 -X k8s.io/kubernetes/pkg/version.gitCommit 1837ea0 -X k8s.io/kubernetes/pkg/version.gitVersion v1.2.0-36-g4a3f9c5
%global ldflags -X github.com/openshift/origin/pkg/version.majorFromGit 3 -X github.com/openshift/origin/pkg/version.minorFromGit 2+ -X github.com/openshift/origin/pkg/version.versionFromGit v3.2.0.18-17-g320f70f -X github.com/openshift/origin/pkg/version.commitFromGit 320f70f -X k8s.io/kubernetes/pkg/version.gitCommit 320f70f -X k8s.io/kubernetes/pkg/version.gitVersion v1.2.0-36-g4a3f9c5
}

%if 0%{?fedora} || 0%{?epel}
Expand All @@ -46,7 +46,7 @@
Name: atomic-openshift
# Version is not kept up to date and is intended to be set by tito custom
# builders provided in the .tito/lib directory of this project
Version: 3.2.0.18
Version: 3.2.0.19
Release: 1%{?dist}
Summary: Open Source Container Management by Red Hat
License: ASL 2.0
Expand Down Expand Up @@ -325,6 +325,7 @@ install -p -m 644 contrib/completions/bash/* %{buildroot}%{_sysconfdir}/bash_com
%{_sysconfdir}/bash_completion.d/atomic-enterprise
%{_sysconfdir}/bash_completion.d/oadm
%{_sysconfdir}/bash_completion.d/openshift
%defattr(0700,-,-)
%dir %config(noreplace) %{_sysconfdir}/origin
%ghost %dir %config(noreplace) %{_sysconfdir}/origin
%ghost %config(noreplace) %{_sysconfdir}/origin/.config_managed
Expand All @@ -350,6 +351,7 @@ fi
%files master
%{_unitdir}/%{name}-master.service
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-master
%defattr(0700,-,-)
%config(noreplace) %{_sysconfdir}/origin/master
%ghost %config(noreplace) %{_sysconfdir}/origin/admin.crt
%ghost %config(noreplace) %{_sysconfdir}/origin/admin.key
Expand Down Expand Up @@ -404,7 +406,9 @@ fi
%files node
%{_unitdir}/%{name}-node.service
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-node
%defattr(0700,-,-)
%config(noreplace) %{_sysconfdir}/origin/node
%ghost %config(noreplace) %{_sysconfdir}/origin/node/node-config.yaml
%ghost %config(noreplace) %{_sysconfdir}/origin/.config_managed

%post node
Expand Down Expand Up @@ -481,6 +485,18 @@ fi


%changelog
* Fri Apr 22 2016 Troy Dawson <tdawson@redhat.com> 3.2.0.19
- Support extracting release binaries on other platforms (ccoleman@redhat.com)
- When Kube and Origin version are the same, skip test (ccoleman@redhat.com)
- All image references should be using full semantic version
(ccoleman@redhat.com)
- Simplified and extended jobs tests (maszulik@redhat.com)
- debug for ext test failures on jenkins (gmontero@redhat.com)
- Fix branding in html title for oauth pages (jforrest@redhat.com)
- force pull fixes / debug (gmontero@redhat.com)
- Make /etc/origin /etc/origin/master /etc/origin/node 0700
(sdodson@redhat.com)

* Wed Apr 20 2016 Troy Dawson <tdawson@redhat.com> 3.2.0.18
- Revert "Retry import to the docker hub on 401" (ccoleman@redhat.com)
- debug for failures on jenkins (gmontero@redhat.com)
Expand Down
6 changes: 4 additions & 2 deletions pkg/cmd/util/variable/variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ func Versions(key string) (string, bool) {
return s, true
case "version":
s := OverrideVersion.GitVersion
seg := strings.SplitN(s, "-", 2)
return seg[0], true
if strings.HasSuffix(s, "-dirty") {
s = strings.TrimSuffix(s, "-dirty")
}
return s, true
default:
return "", false
}
Expand Down
4 changes: 3 additions & 1 deletion test/cmd/basicresources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ os::cmd::expect_success_and_text 'oc version' "kubernetes ${KUBE_GIT_VERSION}"
os::cmd::expect_success_and_text 'openshift version' "openshift ${OS_GIT_VERSION_TO_MICRO}"
os::cmd::expect_success_and_text 'openshift version' "kubernetes ${KUBE_GIT_VERSION}"
os::cmd::expect_success_and_text 'curl -k ${API_SCHEME}://${API_HOST}:${API_PORT}/version' "${KUBE_GIT_VERSION}"
os::cmd::expect_success_and_not_text 'curl -k ${API_SCHEME}://${API_HOST}:${API_PORT}/version' "${OS_GIT_VERSION_TO_MICRO}"
if [[ "${KUBE_GIT_VERSION_TO_MICRO}" != "${OS_GIT_VERSION_TO_MICRO}" ]]; then
os::cmd::expect_success_and_not_text 'curl -k ${API_SCHEME}://${API_HOST}:${API_PORT}/version' "${OS_GIT_VERSION_TO_MICRO}"
fi
# variants I know I have to worry about
# 1. oc (kube and openshift resources)
# 2. openshift kubectl (kube and openshift resources)
Expand Down
3 changes: 3 additions & 0 deletions test/extended/builds/docker_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ var _ = g.Describe("[builds][quota][Slow] docker build with a quota", func() {
g.By("expecting the build is in Failed phase")
// note that success and fail functions are intentionally reversed because we want to wait for failure.
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), "docker-build-quota-1", exutil.CheckBuildFailedFn, exutil.CheckBuildSuccessFn)
if err != nil {
exutil.DumpBuildLogs("docker-build-quota", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the build logs to contain the correct cgroups values")
Expand Down
9 changes: 9 additions & 0 deletions test/extended/builds/dockerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ USER 1001
buildName := "origin-base-1"
g.By("expecting the Dockerfile build is in Complete phase")
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), buildName, exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
//debug for failures on jenkins
if err != nil {
exutil.DumpBuildLogs("origin-base", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())
o.Expect(err).NotTo(o.HaveOccurred())

g.By("getting the build Docker image reference from ImageStream")
Expand All @@ -72,6 +77,10 @@ USER 1001
buildName := "centos-1"
g.By("expecting the Dockerfile build is in Complete phase")
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), buildName, exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
//debug for failures on jenkins
if err != nil {
exutil.DumpBuildLogs("centos", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

g.By("getting the built Docker image reference from ImageStream")
Expand Down
13 changes: 9 additions & 4 deletions test/extended/builds/forcepull.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
buildPrefixTC = "ruby-sample-build-tc"
buildNameTC = buildPrefixTC + "-1"

corruptor = "docker.io/openshift/origin-base"
corruptor = "docker.io/openshift/origin-deployer"

varSubSrc = "SERVICE_REGISTRY_IP"

Expand All @@ -46,7 +46,8 @@ func doTest(bldPrefix, bldName, debugStr string, same bool, oc *exutil.CLI) {

// kick off the app/lang build and verify the builder image accordingly
exutil.StartBuild(bldPrefix, oc)
exutil.WaitForBuild(debugStr, bldName, oc)
err := exutil.WaitForBuild(debugStr, bldPrefix, bldName, oc)

if same {
exutil.VerifyImagesSame(fullImageName, corruptor, debugStr)
} else {
Expand All @@ -56,7 +57,7 @@ func doTest(bldPrefix, bldName, debugStr string, same bool, oc *exutil.CLI) {
// reset corrupted tagging for next test
exutil.ResetImage(resetData)
// dump tags/hexids for debug
_, err := exutil.DumpAndReturnTagging(tags)
_, err = exutil.DumpAndReturnTagging(tags)
o.Expect(err).NotTo(o.HaveOccurred())
}

Expand All @@ -83,14 +84,17 @@ var _ = g.Describe("[LocalNode][builds] forcePull should affect pulling builder
g.By("refresh corruptor, prep forcepull builder")
exutil.PullImage(corruptor, dockerClient.AuthConfiguration{})

exutil.DumpImage(corruptor)

// create the image streams and build configs for a test case specific builders
setupPath := exutil.FixturePath("fixtures", "forcepull-setup.json")
err := exutil.CreateResource(setupPath, oc)

// kick off the build for the new builder image just for force pull so we can corrupt them without conflicting with
// any other tests potentially running in parallel
exutil.StartBuild(bldrPrefix, oc)
exutil.WaitForBuild("bldr build: ", bldrPrefix+"-1", oc)
err = exutil.WaitForBuild("bldr build: ", bldrPrefix, bldrPrefix+"-1", oc)
o.Expect(err).NotTo(o.HaveOccurred())

serviceIP, err := oc.Run("get").Args("svc", "docker-registry", "-n", "default", "--config", exutil.KubeConfigPath()).Template("{{.spec.clusterIP}}").Output()
o.Expect(err).NotTo(o.HaveOccurred())
Expand All @@ -106,6 +110,7 @@ var _ = g.Describe("[LocalNode][builds] forcePull should affect pulling builder
fullImageName = authCfg.ServerAddress + "/" + oc.Namespace() + "/" + bldr
err = exutil.PullImage(fullImageName, *authCfg)
o.Expect(err).NotTo(o.HaveOccurred())
exutil.DumpImage(fullImageName)

//update the build configs in the json for the app/lang builds to point to the builder images in the internal docker registry
// and then create the build config resources
Expand Down
3 changes: 3 additions & 0 deletions test/extended/builds/gitauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ var _ = g.Describe("[builds][Slow] can use private repositories as build input",

g.By(fmt.Sprintf("expecting build %s to complete successfully", buildName))
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), buildName, exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
if err != nil {
exutil.DumpBuildLogs(buildConfigName, oc)
}
o.Expect(err).NotTo(o.HaveOccurred())
}

Expand Down
3 changes: 3 additions & 0 deletions test/extended/builds/image_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ var _ = g.Describe("[builds][Slow] build can have Docker image source", func() {
o.Expect(err).NotTo(o.HaveOccurred())
g.By("expecting the builds to complete successfully")
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), "imagesourcebuild-1", exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
if err != nil {
exutil.DumpBuildLogs("imagesourcebuild", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the pod to deploy successfully")
Expand Down
14 changes: 2 additions & 12 deletions test/extended/builds/s2i_dropcaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ var _ = g.Describe("[builds][Slow] Capabilities should be dropped for s2i builde
"--wait").Execute()
// debug for failures on jenkins
if err != nil {
bldOuput, derr := oc.Run("logs").Args("-f", "bc/rootable-ruby").Output()
if derr == nil {
fmt.Fprintf(g.GinkgoWriter, "\n\n build logs : %s\n\n", bldOuput)
} else {
fmt.Fprintf(g.GinkgoWriter, "\n\n got error on bld logs %v\n\n", err)
}
exutil.DumpBuildLogs("rootable-ruby", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

Expand All @@ -55,12 +50,7 @@ var _ = g.Describe("[builds][Slow] Capabilities should be dropped for s2i builde
err = oc.Run("start-build").Args("root-access-build", "--wait").Execute()
// debug for failures on jenkins
if err == nil {
bldOuput, derr := oc.Run("logs").Args("-f", "bc/root-access-build").Output()
if derr == nil {
fmt.Fprintf(g.GinkgoWriter, "\n\n build logs : %s\n\n", bldOuput)
} else {
fmt.Fprintf(g.GinkgoWriter, "\n\n got error on bld logs %v\n\n", err)
}
exutil.DumpBuildLogs("root-access-build", oc)
}
o.Expect(err).To(o.HaveOccurred())

Expand Down
3 changes: 3 additions & 0 deletions test/extended/builds/s2i_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ var _ = g.Describe("[builds][Slow] source-to-image build with environment file i

g.By("expecting the build is in Complete phase")
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), buildName, exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
if err != nil {
exutil.DumpBuildLogs("test", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

g.By("getting the Docker image reference from ImageStream")
Expand Down
3 changes: 3 additions & 0 deletions test/extended/builds/s2i_incremental.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ var _ = g.Describe("[builds][Slow] incremental source-to-image build", func() {

g.By("expecting the build is in Complete phase")
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), buildName, exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
if err != nil {
exutil.DumpBuildLogs("initial-build", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

g.By("starting a test build using the image produced by the last build")
Expand Down
3 changes: 3 additions & 0 deletions test/extended/builds/s2i_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ var _ = g.Describe("[builds][Conformance] s2i build with a quota", func() {

g.By("expecting the build is in Complete phase")
err = exutil.WaitForABuild(oc.REST().Builds(oc.Namespace()), "s2i-build-quota-1", exutil.CheckBuildSuccessFn, exutil.CheckBuildFailedFn)
if err != nil {
exutil.DumpBuildLogs("s2i-build-quota", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the build logs to contain the correct cgroups values")
Expand Down
6 changes: 6 additions & 0 deletions test/extended/fixtures/forcepull-setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
"strategy": {
"type": "Docker",
"dockerStrategy": {
"env": [
{
"name": "BUILD_LOGLEVEL",
"value": "5"
}
]
}
},
"output":{
Expand Down
Loading

0 comments on commit ee59b65

Please sign in to comment.