Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions hack/lib/golang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,7 @@ EOF
local go_version
IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)"
local minimum_go_version
# Temporarily build with 1.14 to simplify transition to 1.15
minimum_go_version=go1.14.4
minimum_go_version=go1.15.0
if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then
kube::log::usage_from_stdin <<EOF
Detected go version: ${go_version[*]}.
Expand Down
2 changes: 1 addition & 1 deletion openshift-hack/images/hyperkube/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-openshift-4.6 AS builder
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6 AS builder
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
RUN make WHAT='cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-scheduler cmd/kubelet cmd/watch-termination' && \
Expand Down
2 changes: 1 addition & 1 deletion openshift-hack/images/tests/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.14 AS builder
FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.6 AS builder
WORKDIR /go/src/k8s.io/kubernetes
COPY . .
RUN make WHAT=openshift-hack/e2e/k8s-e2e.test; \
Expand Down
2 changes: 1 addition & 1 deletion openshift-hack/lib/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

readonly OS_GO_PACKAGE=github.com/openshift/origin

readonly OS_BUILD_ENV_GOLANG="${OS_BUILD_ENV_GOLANG:-1.14}"
readonly OS_BUILD_ENV_GOLANG="${OS_BUILD_ENV_GOLANG:-1.15}"
readonly OS_BUILD_ENV_IMAGE="${OS_BUILD_ENV_IMAGE:-openshift/origin-release:golang-${OS_BUILD_ENV_GOLANG}}"
readonly OS_REQUIRED_GO_VERSION="go${OS_BUILD_ENV_GOLANG}"
readonly OS_GLIDE_MINOR_VERSION="13"
Expand Down
58 changes: 0 additions & 58 deletions openshift-hack/lib/deps.sh
Original file line number Diff line number Diff line change
@@ -1,63 +1,5 @@
#!/usr/bin/env bash

# os::deps::path_with_recent_bash returns a path that includes a
# recent bash (~ 5.x).
#
# Globals:
# None
# Arguments:
# None
# Returns:
# A path that includes a recent bash.
function os::deps::path_with_recent_bash() {
local path_with_bash="${PATH}"
local bash_version
bash_version="$( bash --version | head -n 1 | awk '{print $4}' )"
if [[ ! "${bash_version}" =~ 5.* ]]; then
recent_bash_path="${TMPDIR:-/tmp}/recent-bash"
mkdir -p "${recent_bash_path}"
if [[ ! -f "${recent_bash_path}/bash" ]]; then
pushd "${recent_bash_path}" > /dev/null || exit 1
curl -LO https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz
tar xf bash-5.0.tar.gz
pushd bash-5.0 > /dev/null || exit 1
./configure > configure.log
make > make.log
cp bash ../
popd > /dev/null || exit 1
popd > /dev/null || exit 1
fi
path_with_bash="${recent_bash_path}:${path_with_bash}"
fi
echo "${path_with_bash}"
}
readonly -f os::deps::path_with_recent_bash

# os::deps::protoc returns a path that includes protoc.
#
# Globals:
# None
# Arguments:
# None
# Returns:
# The path that includes protoc.
function os::deps::path_with_protoc() {
local path="${PATH}"
if ! which protoc &> /dev/null; then
local protoc_path="${TMPDIR:-/tmp}/protoc"
mkdir -p "${protoc_path}"
if [[ ! -f "${protoc_path}/bin/protoc" ]]; then
pushd "${protoc_path}" > /dev/null || exit 1
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protoc-3.12.3-linux-x86_64.zip
unzip protoc-3.12.3-linux-x86_64.zip
popd > /dev/null || exit 1
fi
path="${PATH}:${protoc_path}/bin"
fi
echo "${path}"
}
readonly -f os::deps::path_with_protoc

# os::deps::path_with_shellcheck returns a path that includes shellcheck.
#
# Globals:
Expand Down
8 changes: 0 additions & 8 deletions openshift-hack/test-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@
# shellcheck source=openshift-hack/lib/init.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib/init.sh"

# Upstream testing requires recent bash (>= 4.3). If the system bash
# is not recent (e.g openshift ci and macos), download and compile a
# newer bash and make it available in the path.
PATH="$( os::deps::path_with_recent_bash )"
export PATH

/usr/bin/env bash --version

ARTIFACTS="${ARTIFACTS:-/tmp/artifacts}"
mkdir -p "${ARTIFACTS}"

Expand Down
7 changes: 0 additions & 7 deletions openshift-hack/test-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@
# shellcheck source=openshift-hack/lib/init.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib/init.sh"

# Upstream testing requires recent bash (>= 4.3). If the system bash
# is not recent (e.g openshift ci and macos), download and compile a
# newer bash and make it available in the path.
PATH="$( os::deps::path_with_recent_bash )"

/usr/bin/env bash --version

./hack/install-etcd.sh
PATH="${OS_ROOT}/third_party/etcd:${PATH}"

Expand Down
13 changes: 0 additions & 13 deletions openshift-hack/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
# shellcheck source=openshift-hack/lib/init.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib/init.sh"

# Upstream verify requires recent bash (>= 4.3). If the system bash is
# not recent (e.g openshift ci and macos), download and compile a
# newer bash and make it available in the path.
PATH="$( os::deps::path_with_recent_bash )"

/usr/bin/env bash --version

# Upstream verify requires protoc (>= 3.0.0). If not present, download
# a recent version and make it available in the path.
PATH="$( os::deps::path_with_protoc )"

/usr/bin/env protoc --version

# Required for openapi verification
PATH="$(pwd)/third_party/etcd:${PATH}"

Expand Down
2 changes: 1 addition & 1 deletion openshift.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%global gopath %{_datadir}/gocode
%global import_path k8s.io/kubernetes

%global golang_version 1.14
%global golang_version 1.15

%{!?commit:
# DO NOT MODIFY: the value on the line below is sed-like replaced by openshift/doozer
Expand Down