]> git.pld-linux.org Git - packages/gitlab-runner.git/blobdiff - nodim_gz.patch
fix using external prebuilt image
[packages/gitlab-runner.git] / nodim_gz.patch
index b23df7a989381e68ec75f1f35bbc98b5ed0ae0c4..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/executors/docker/executor_docker.go~        2016-12-22 16:21:38.000000000 +0200
-+++ gitlab-ci-multi-runner/executors/docker/executor_docker.go 2016-12-23 14:41:59.425571451 +0200
-@@ -208,17 +208,11 @@
-               return
+--- 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())
--      }
++              return nil, fmt.Errorf("Unable to read: %q", architecture, err.Error())
+       }
+-      s.Debugln("Loading prebuilt image...")
 -
-       s.Debugln("Loading prebuilt image...")
-       err = s.client.ImportImage(docker.ImportImageOptions{
-               Repository:  prebuiltImageName,
-               Tag:         architecture + "-" + common.REVISION,
--              Source:      "-",
--              InputStream: bytes.NewBuffer(data),
-+              Source:      "/var/lib/gitlab-runner/prebuilt-" + architecture + ".tar.xz",
-       })
-       if err != nil {
-               return
+       ref := prebuiltImageName
+       source := types.ImageImportSource{
+               Source:     bytes.NewBuffer(data),
This page took 0.082373 seconds and 4 git commands to generate.