]> git.pld-linux.org Git - packages/gitlab-runner.git/commitdiff
fix using external prebuilt image
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 31 Aug 2017 14:01:46 +0000 (17:01 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 31 Aug 2017 14:01:48 +0000 (17:01 +0300)
this time actually tested

gitlab-ci-multi-runner.spec
nodim_gz.patch

index 3a1c00936a261744749fd5682bf67a9e9c76a813..6ab83670a0ea1f5439b70e7abf0c445fb3e2bd96 100644 (file)
@@ -1,7 +1,7 @@
 Summary:       The official GitLab CI runner written in Go
 Name:          gitlab-ci-multi-runner
 Version:       9.5.0
-Release:       1
+Release:       2
 License:       MIT
 Group:         Development/Building
 Source0:       https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/repository/archive.tar.gz?ref=v%{version}&/%{name}-%{version}.tar.gz
@@ -39,7 +39,7 @@ BuildRoot:    %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # go stuff
 %define _enable_debug_packages 0
-%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
+%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v %{?debug:-x} %{?**};
 %define import_path    gitlab.com/gitlab-org/gitlab-ci-multi-runner
 
 %description
index 1dc643b6c8152c949d82c9e300f3e89c7780155a..4762f2fa15710cc5b1e46e622d1702a3a1e64813 100644 (file)
@@ -2,26 +2,34 @@ Last-Update: 2016-08-24
 Forwarded: not-needed
 Bug-Upstream: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1504
 Author: Dmitry Smirnov <onlyjob@debian.org>
+Author: Elan Ruusamäe <glen@pld-linux.org>
 Description: do not incorporate Docker image into executable.
 
---- gitlab-ci-multi-runner-9.5.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/executor_docker.go  2017-08-22 16:20:43.000000000 +0300
-+++ gitlab-ci-multi-runner-9.5.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/executor_docker.go  2017-08-28 00:25:29.417833457 +0300
-@@ -222,17 +222,11 @@
+--- gitlab-ci-multi-runner-9.5.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/executor_docker.go  2017-08-28 00:25:29.417833457 +0300
++++ gitlab-ci-multi-runner-9.5.0/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/docker/executor_docker.go  2017-08-31 16:21:38.164066652 +0300
+@@ -6,6 +6,7 @@
+       "errors"
+       "fmt"
+       "io"
++      "io/ioutil"
+       "path"
+       "path/filepath"
+       "regexp"
+@@ -222,13 +222,13 @@
                return &image, nil
        }
  
 -      data, err := Asset("prebuilt-" + architecture + prebuiltImageExtension)
--      if err != nil {
++      s.Debugln("Loading prebuilt image...")
++
++      data, err := ioutil.ReadFile("/var/lib/gitlab-runner/prebuilt-" + architecture + ".tar.xz")
+       if err != nil {
 -              return nil, fmt.Errorf("Unsupported architecture: %s: %q", architecture, err.Error())
--      }
--
-       s.Debugln("Loading prebuilt image...")
++              return nil, fmt.Errorf("Unable to read: %q", architecture, err.Error())
+       }
  
+-      s.Debugln("Loading prebuilt image...")
+-
        ref := prebuiltImageName
        source := types.ImageImportSource{
--              Source:     bytes.NewBuffer(data),
--              SourceName: "-",
-+              SourceName: "/var/lib/gitlab-runner/prebuilt-" + architecture + ".tar.xz",
-       }
-       options := types.ImageImportOptions{
-               Tag: architecture + "-" + common.REVISION,
+               Source:     bytes.NewBuffer(data),
This page took 0.031651 seconds and 4 git commands to generate.