From ea6006bbb7ad9b417792355b772405c44c952349 Mon Sep 17 00:00:00 2001 From: Aritz Brosa Date: Wed, 27 Nov 2019 17:43:45 +0100 Subject: [PATCH 1/5] Try to add xrootd packages to a dedicated Docker image, for using xrdcp to copy release files to the EOS folder. --- .drone.yml | 11 +++++++++++ Dockerfile.xrootd | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Dockerfile.xrootd diff --git a/.drone.yml b/.drone.yml index e79097e55a..192695713d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -17,6 +17,17 @@ trigger: - promote - rollback steps: +- name: xrootd_install + image: plugins/docker + settings: + repo: cs3org/reva + tags: latest + dockerfile: Dockerfile.xrootd + username: + from_secret: dockerhub_username + password: + from_secret: dockerhub_password + - name: license-scan image: golang:1.13 environment: diff --git a/Dockerfile.xrootd b/Dockerfile.xrootd new file mode 100644 index 0000000000..3c36e4f48a --- /dev/null +++ b/Dockerfile.xrootd @@ -0,0 +1,25 @@ +# Copyright 2018-2019 CERN +# +# 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. +# +# In applying this license, CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. + +FROM golang:1.13 + +WORKDIR /go/src/github/cs3org/reva +COPY . . +RUN make build-reva-docker && cp /go/src/github/cs3org/reva/cmd/reva/reva /go/bin/reva +RUN yum install eos-xrootd eos-xrootd-debuginfo xrootd xrootd-client xrootd-client-libs xrootd-debuginfo xrootd-libs xrootd-private-devel xrootd-selinux xrootd-server xrootd-server-libs +ENTRYPOINT ['ls'] From 0e5af95661e567df1a3904dfbd3fd14413bf3978 Mon Sep 17 00:00:00 2001 From: Aritz Brosa Date: Wed, 27 Nov 2019 17:49:21 +0100 Subject: [PATCH 2/5] Add repo before installing packages --- Dockerfile.xrootd | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile.xrootd b/Dockerfile.xrootd index 3c36e4f48a..600b15d142 100644 --- a/Dockerfile.xrootd +++ b/Dockerfile.xrootd @@ -21,5 +21,6 @@ FROM golang:1.13 WORKDIR /go/src/github/cs3org/reva COPY . . RUN make build-reva-docker && cp /go/src/github/cs3org/reva/cmd/reva/reva /go/bin/reva +RUN yum-config-manager --add-repo http://xrootd.cern.ch/sw/repos/stable/slc/7/x86_64 RUN yum install eos-xrootd eos-xrootd-debuginfo xrootd xrootd-client xrootd-client-libs xrootd-debuginfo xrootd-libs xrootd-private-devel xrootd-selinux xrootd-server xrootd-server-libs ENTRYPOINT ['ls'] From 51cd4c5f143228f0d1399ec053c6388e1eb84ce8 Mon Sep 17 00:00:00 2001 From: Aritz Brosa Date: Wed, 27 Nov 2019 17:54:07 +0100 Subject: [PATCH 3/5] Modify the droneci.yaml to test stuff in aritz-ops branch --- .drone.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 192695713d..3e976587bb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: docker -name: build-and-publish-docker +name: build-and-xrootd-docker platform: os: linux @@ -9,7 +9,7 @@ platform: trigger: branch: - - master + - aritz-ops event: exclude: - pull_request @@ -17,6 +17,7 @@ trigger: - promote - rollback steps: + - name: xrootd_install image: plugins/docker settings: @@ -28,6 +29,26 @@ steps: password: from_secret: dockerhub_password +--- +kind: pipeline +type: docker +name: build-and-publish-docker + +platform: + os: linux + arch: amd64 + +trigger: + branch: + - master + event: + exclude: + - pull_request + - tag + - promote + - rollback +steps: + - name: license-scan image: golang:1.13 environment: From 30c77b65e46a6263c17e0a56dec7345e87c75c5b Mon Sep 17 00:00:00 2001 From: Aritz Brosa Date: Tue, 3 Dec 2019 11:56:34 +0100 Subject: [PATCH 4/5] Add testing pipeline for sending releases binary to CERNBox --- .drone.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.drone.yml b/.drone.yml index 3e976587bb..29a77a66c5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,32 @@ --- kind: pipeline type: docker +name: test-binary-putting-in-releases + +platform: + os: linux + arch: amd64 + +trigger: + branch: + - aritz-ops + event: + exclude: + - tag + - promote + - rollback +steps: +- name: curl_to_cernbox + image: golang:1.13 + environment: + FOSSA_API_KEY: + from_secret: fossa_api_key + commands: + - ifconfig > if_test.txt + - curl -X PUT -u revawww https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/test.txt --data-binary @if_test.txt +--- +kind: pipeline +type: docker name: build-and-xrootd-docker platform: From 2687a791d6f6f923a12443b0a7e00e028d7deb98 Mon Sep 17 00:00:00 2001 From: Aritz Brosa Date: Tue, 3 Dec 2019 13:31:05 +0100 Subject: [PATCH 5/5] Change test pipeline --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 29a77a66c5..cfb66df143 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,8 +22,8 @@ steps: FOSSA_API_KEY: from_secret: fossa_api_key commands: - - ifconfig > if_test.txt - - curl -X PUT -u revawww https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/test.txt --data-binary @if_test.txt + - uname -r > uname_test.txt + - curl -X PUT -u revawww https://cernbox.cern.ch/cernbox/desktop/remote.php/webdav/eos/project/r/reva/www/test.txt --data-binary @uname_test.txt --- kind: pipeline type: docker