From 8f62b53509ca20fb611e2f60b53a416990768436 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Mon, 4 May 2020 11:34:03 +0900 Subject: [PATCH 1/4] Add Golang 1.14.2 to CI --- .../origin-release/golang-1.14/Dockerfile | 55 +++++++++++++++++++ ...s-paas7-openshift-multiarch-el7-build.repo | 8 +++ .../origin-release/golang-1.14/golang.spec | 21 +++++++ 3 files changed, 84 insertions(+) create mode 100644 projects/origin-release/golang-1.14/Dockerfile create mode 100644 projects/origin-release/golang-1.14/cbs-paas7-openshift-multiarch-el7-build.repo create mode 100644 projects/origin-release/golang-1.14/golang.spec diff --git a/projects/origin-release/golang-1.14/Dockerfile b/projects/origin-release/golang-1.14/Dockerfile new file mode 100644 index 0000000000000..04e71db30253d --- /dev/null +++ b/projects/origin-release/golang-1.14/Dockerfile @@ -0,0 +1,55 @@ +# +# This is the image that controls the standard build environment for releasing OpenShift Origin. +# It is responsible for performing a cross platform build of OpenShift. +# +# The standard name for this image is openshift/origin-release +# +FROM centos:7 + +ENV VERSION=1.14.2 \ + GOCACHE=/go/.cache \ + GOARM=5 \ + GOPATH=/go \ + GOROOT=/usr/local/go \ + GOFLAGS='-mod=vendor' \ + LOGNAME=deadbeef +ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin + +COPY cbs-paas7-openshift-multiarch-el7-build.repo /etc/yum.repos.d/ +RUN yum install -y epel-release && \ + rpm -V epel-release && \ + INSTALL_PKGS="bc bind-utils bsdtar bzr ceph-common createrepo device-mapper device-mapper-persistent-data e2fsprogs ethtool file findutils gcc git glibc-static glib2-devel gpgme gpgme-devel hostname iptables jq krb5-devel libassuan libassuan-devel libseccomp-devel libvirt-devel lsof make mercurial nmap-ncat openssl protobuf-compiler protobuf-devel rsync socat systemd-devel sysvinit-tools tar tito tree util-linux wget which xfsprogs zip goversioninfo" && \ + yum install -y $INSTALL_PKGS && \ + rpm -V $INSTALL_PKGS && \ + yum clean all && \ + touch /os-build-image && \ + git config --system user.name origin-release-container && \ + git config --system user.email origin-release@redhat.com + +ADD *.rpm /tmp/origin-rpm/ +RUN yum install -y /tmp/origin-rpm/*.rpm && \ + yum clean all && \ + curl https://storage.googleapis.com/golang/go$VERSION.linux-$(uname -m | sed 's/x86_64/amd64/g').tar.gz | tar -C /usr/local -xzf - && \ + go get golang.org/x/tools/cmd/cover \ + github.com/Masterminds/glide \ + golang.org/x/tools/cmd/goimports \ + github.com/tools/godep \ + golang.org/x/lint/golint \ + gotest.tools/gotestsum \ + github.com/openshift/release/tools/gotest2junit \ + github.com/openshift/imagebuilder/cmd/imagebuilder && \ + mv $GOPATH/bin/* /usr/bin/ && \ + rm -rf $GOPATH/* $GOPATH/.cache && \ + mkdir $GOPATH/bin && \ + ln -s /usr/bin/imagebuilder $GOPATH/bin/imagebuilder && \ + ln -s /usr/bin/goimports $GOPATH/bin/goimports && \ + curl -L https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 > /usr/bin/dep && \ + chmod +x /usr/bin/dep + # TODO: symlink for backwards compatibility with hack/build-images.sh only, remove + +RUN chmod g+xw -R $GOPATH && \ + chmod g+xw -R $(go env GOROOT) + +WORKDIR /go/src/github.com/openshift/origin +LABEL io.k8s.display-name="OpenShift Origin Release Environment (golang-$VERSION)" \ + io.k8s.description="This is the standard release image for OpenShift Origin and contains the necessary build tools to build the platform." diff --git a/projects/origin-release/golang-1.14/cbs-paas7-openshift-multiarch-el7-build.repo b/projects/origin-release/golang-1.14/cbs-paas7-openshift-multiarch-el7-build.repo new file mode 100644 index 0000000000000..aa32f81b67962 --- /dev/null +++ b/projects/origin-release/golang-1.14/cbs-paas7-openshift-multiarch-el7-build.repo @@ -0,0 +1,8 @@ +[cbs-paas7-openshift-multiarch-el7-build] +name = CBS OpenShift MultiArch Build +baseurl = http://cbs.centos.org/kojifiles/repos/paas7-openshift-multiarch-el7-build/latest/$basearch +enabled = 1 +gpgcheck = 0 +sslverify = 0 +skip_if_unavailable = 1 +includepkgs = golang* protobuf* goversioninfo* openvswitch* diff --git a/projects/origin-release/golang-1.14/golang.spec b/projects/origin-release/golang-1.14/golang.spec new file mode 100644 index 0000000000000..6d25a11f5ec6f --- /dev/null +++ b/projects/origin-release/golang-1.14/golang.spec @@ -0,0 +1,21 @@ +Name: golang +Version: v1.14.0 +Release: 1%{?dist} +Summary: Go install from source +Group: Fake +License: BSD +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +Provides: golang +BuildArch: noarch +%description +%{summary} +%prep +%setup -c -T +%build +%install +%files +%defattr(-,root,root,-) +%changelog +* Mon May 4 2020 Kenjiro Nakayama 0.0-1 +- Initial change +EOF From 3855ce4361b4570237066c52487bf59e128acc40 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Mon, 4 May 2020 11:34:31 +0900 Subject: [PATCH 2/4] update makefile --- projects/origin-release/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/origin-release/Makefile b/projects/origin-release/Makefile index 777e2a3e0bfae..6909cb60a1153 100644 --- a/projects/origin-release/Makefile +++ b/projects/origin-release/Makefile @@ -5,4 +5,5 @@ build: ./fake-rpm.sh golang-1.11 ./fake-rpm.sh golang-1.12 ./fake-rpm.sh golang-1.13 + ./fake-rpm.sh golang-1.14 .PHONY: build From 02f8ea669324e604670f18f6bff3bf0b518b7dd1 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Mon, 4 May 2020 11:35:21 +0900 Subject: [PATCH 3/4] Add rpm --- .../golang-1.14/golang-v1.14.0-1.noarch.rpm | Bin 0 -> 6052 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 projects/origin-release/golang-1.14/golang-v1.14.0-1.noarch.rpm diff --git a/projects/origin-release/golang-1.14/golang-v1.14.0-1.noarch.rpm b/projects/origin-release/golang-1.14/golang-v1.14.0-1.noarch.rpm new file mode 100644 index 0000000000000000000000000000000000000000..ac0cf065f464748cc1305aebf892c7d4254b6ea2 GIT binary patch literal 6052 zcmeHL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bD-4sWkq-S)@ql_+`Wv)25^-4`cMpIc&EhF;#d bcz!`8xu;L{Uw-@BzIP9tfo}#XO&$9OUDuX+ literal 0 HcmV?d00001 From c97d83baa0eff97d05cdb7a8473e329cb2c64e80 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Mon, 4 May 2020 11:51:08 +0900 Subject: [PATCH 4/4] Add golang-1.14 to the pipeline --- projects/origin-release/pipeline.yaml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/projects/origin-release/pipeline.yaml b/projects/origin-release/pipeline.yaml index 303df94c61ce3..bd763647519ac 100644 --- a/projects/origin-release/pipeline.yaml +++ b/projects/origin-release/pipeline.yaml @@ -221,6 +221,36 @@ objects: triggers: - imageChange: {} type: ImageChange +- apiVersion: v1 + kind: BuildConfig + metadata: + labels: + app: origin-release + name: "origin-release-golang-1.14" + spec: + successfulBuildsHistoryLimit: 1 + failedBuildsHistoryLimit: 2 + output: + to: + kind: DockerImage + name: "${PUSH_REPOSITORY}:golang-1.14" + pushSecret: + name: "dockerhub" + source: + git: + ref: "${SOURCE_REF}" + uri: "${SOURCE_URL}" + contextDir: "projects/origin-release/golang-1.14/" + type: Git + strategy: + dockerStrategy: + from: + kind: ImageStreamTag + name: origin-release:base + imageOptimizationPolicy: SkipLayers + triggers: + - imageChange: {} + type: ImageChange - apiVersion: v1 kind: BuildConfig metadata: