使用docker,Gitlab-CI构建失败

时间:2016-09-22 20:39:23

标签: gitlab gitlab-ci gitlab-ci-runner

我只是想熟悉Gitlab并试图了解它对我的需求有多大帮助。我在TapeJS中为它编写了一个简单的javascript程序和单元测试。

isAnagram.js

module.exports = function(string1, string2){

if (string1.length != string2.length){
    return false
}

string1 = string1.replace(/[\s\W]+/g, '');
string2 = string2.replace(/[\s\W]+/g, '');

string1 = string1.toLowerCase().split('').sort();
string2 = string2.toLowerCase().split('').sort();

if(string1.toString() == string2.toString()){
    return true
} else {
    return false
}
}

test.js

var test = require('tape').test,
isA = require('./isAnagram');

test('Is it an Anagram? ', function(t){
    var actual = isA('iceman', 'cinema');
    var expected = true;
    t.equal(actual, expected);
    t.end();
});

Gitlab转轮文件/etc/gitlab-runner/config.toml

    concurrent = 1
    check_interval = 0

    [[runners]]
      name = "Test runner"
      url = "http://172.16.205.131/ci"
      token = "043e80c412bd5bb73d2ef98d66117e"
      executor = "docker"
      [runners.docker]
        tls_verify = false
        image = "ubuntu:latest"
        privileged = false
        disable_cache = false
        volumes = ["/cache"]
      [runners.cache]

测试结果:

Running with gitlab-ci-multi-runner 1.5.3 (fb49c47)
Using Docker executor with image ubuntu:latest ...
Pulling docker image ubuntu:latest ...
Running on runner-043e80c4-project-2-concurrent-0 via iwinks...
Fetching changes...
Checking out 872868f4 as master...
fatal: reference is not a tree: 872868f4555bfe7429724e1569c9a4ef142510f2
ERROR: Build failed: exit code 1

我不确定出了什么问题并且不明白问题到底是什么,“引用不是树”是什么意思?

0 个答案:

没有答案