From e9b34b394d4aa39c87286e44c0a1282506abdbef Mon Sep 17 00:00:00 2001
From: Akira Ohgaki <akiraohgaki@gmail.com>
Date: Sun, 10 Mar 2019 06:20:05 +0900
Subject: [PATCH] CI job

---
 .gitlab-ci.yml  | 20 ++++++++++++++++----
 scripts/package | 14 --------------
 2 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 425ea4d..1036bcf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,7 +9,10 @@ ubuntu_deb:
     - /^release\-.+/
   script:
     - ./scripts/package ubuntu_deb
-    - cat transfer.log
+  artifacts:
+    paths:
+    - build_*/ocs-url*.deb
+    expire_in: 2 days
 
 fedora_rpm:
   stage: build
@@ -19,7 +22,10 @@ fedora_rpm:
     - /^release\-.+/
   script:
     - ./scripts/package fedora_rpm
-    - cat transfer.log
+  artifacts:
+    paths:
+    - build_*/ocs-url*.rpm
+    expire_in: 2 days
 
 opensuse_rpm:
   stage: build
@@ -29,7 +35,10 @@ opensuse_rpm:
     - /^release\-.+/
   script:
     - ./scripts/package opensuse_rpm
-    - cat transfer.log
+  artifacts:
+    paths:
+    - build_*/ocs-url*.rpm
+    expire_in: 2 days
 
 archlinux_pkg:
   stage: build
@@ -39,4 +48,7 @@ archlinux_pkg:
     - /^release\-.+/
   script:
     - ./scripts/package archlinux_pkg
-    - cat transfer.log
+  artifacts:
+    paths:
+    - build_*/ocs-url*.pkg.tar.xz
+    expire_in: 2 days
diff --git a/scripts/package b/scripts/package
index c6e58f5..00f4c4e 100755
--- a/scripts/package
+++ b/scripts/package
@@ -14,7 +14,6 @@ ubuntu_deb() { # docker-image: ubuntu:14.04
     install_build_deps_ubuntu_deb
     add_pkguser
     su -c "export HOME=/home/${PKGUSER} && "${PKGSCRIPT}" build_ubuntu_deb" ${PKGUSER}
-    transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.deb")"
 }
 
 install_build_deps_ubuntu_deb() {
@@ -38,7 +37,6 @@ fedora_rpm() { # docker-image: fedora:20
     install_build_deps_fedora_rpm
     add_pkguser
     su -c "export HOME=/home/${PKGUSER} && "${PKGSCRIPT}" build_fedora_rpm" ${PKGUSER}
-    transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.rpm")"
 }
 
 install_build_deps_fedora_rpm() {
@@ -61,7 +59,6 @@ opensuse_rpm() { # docker-image: opensuse:42.1
     install_build_deps_opensuse_rpm
     add_pkguser
     su -c "export HOME=/home/${PKGUSER} && "${PKGSCRIPT}" build_opensuse_rpm" ${PKGUSER}
-    transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.rpm")"
 }
 
 install_build_deps_opensuse_rpm() {
@@ -85,7 +82,6 @@ archlinux_pkg() { # docker-image: base/archlinux:latest
     install_build_deps_archlinux_pkg
     add_pkguser
     su -c "export HOME=/home/${PKGUSER} && "${PKGSCRIPT}" build_archlinux_pkg" ${PKGUSER}
-    transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.pkg.tar.xz")"
 }
 
 install_build_deps_archlinux_pkg() {
@@ -116,16 +112,6 @@ export_srcarchive() {
     fi
 }
 
-transfer_file() {
-    if [ -f "${1}" ]; then
-        filename="$(basename "${1}")"
-        transferlog="${PROJDIR}/transfer.log"
-        echo "Uploading ${filename}" >> "${transferlog}"
-        curl -fsSL -T "${1}" "https://transfer.sh/${filename}" >> "${transferlog}"
-        echo '' >> "${transferlog}"
-    fi
-}
-
 if [ "${1}" ]; then
     ${1}
 fi
-- 
GitLab