ERROR: Job failed: exit status 1 on ubuntu 14.04 when trying to build a test project
Summary
Installed gitlab ci multi runner in my c9.io vm ubuntu using this guide https://docs.gitlab.com/runner/install/linux-repository.html. Then registered runner by following the instructions using this guide https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/tree/master/docs/commands, I started the service and then I pushed a commit on my project to gitlab with
.gitlab-ci.ymlfile, with correct syntax verified using CI LINT Page, and the script commands are tested locally and works fine, but when the pipeline runs, I always getERROR: Job failed: exit status 1.
Steps to reproduce
On c9.io vm ubuntu blank workspace, install latest gitlab ci multi runner by following this guide https://docs.gitlab.com/runner/install/linux-repository.html and you will get that error.
Actual behavior
Gitlab ci runner throws
ERROR: Job failed: exit status 1every time when I run a job process in gitlab.
Expected behavior
Gitlab ci runner builds the project and passes the stage.
Environment description
I am using my own gitlab runner hosted in c9.io and my repo is located in gitlab.com
Gitlab runner version
Version: 9.0.0
Git revision: 08a9e6f
Git branch: 9-0-stable
GO version: go1.7.5
Built: Wed, 22 Mar 2017 16:29:52 +0000
OS/Arch: linux/amd64
Gitlab runner config.toml
concurrent = 1
check_interval = 0
[[runners]]
name = "test-runner"
url = "https://gitlab.com/ci"
token = "4299126adfadf334343dfdfdfd313457889"
executor = "shell"
OS Version
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Relevant logs
dannyneverfade:~/workspace $ sudo gitlab-runner --debug run
Runtime platform arch=amd64 os=linux revision=08a9e6f version=9.0.0
Starting multi-runner from /etc/gitlab-runner/config.toml ... builds=0
Checking runtime mode GOOS=linux uid=0
Running in system-mode.
Configuration loaded builds=0
metricsserveraddress: ""
concurrent: 1
checkinterval: 0
user: ""
runners:
- name: test-runner
limit: 0
outputlimit: 0
requestconcurrency: 0
runnercredentials:
url: https://gitlab.com/ci
token: 4299126adfadf334343dfdfdfd313457889
tlscafile: ""
runnersettings:
executor: shell
buildsdir: ""
cachedir: ""
environment: []
preclonescript: ""
prebuildscript: ""
postbuildscript: ""
shell: ""
ssh: null
docker: null
parallels: null
virtualbox: null
cache:
type: ""
serveraddress: ""
accesskey: ""
secretkey: ""
bucketname: ""
bucketlocation: ""
insecure: false
path: ""
shared: false
machine: null
kubernetes: null
sentrydsn: null
modtime: 2017-03-27T14:51:20.240876357Z
loaded: true
builds=0
Waiting for stop signal builds=0
Metrics server disabled
Feeding runners to channel builds=0
Starting worker builds=0 worker=0
Trying to load /etc/gitlab-runner/certs/gitlab.com.crt ...
Dialing: tcp gitlab.com:443 ...
Feeding runners to channel builds=0
Checking for jobs... received job=13074496 repo_url=https://gitlab.com/dannyneverfade/test-project.git runner=42991260
Failed to requeue the runner: builds=1 runner=42991260
Running with gitlab-ci-multi-runner 9.0.0 (08a9e6f)
on test-runner (42991260) job=13074496 project=2177565 runner=42991260
Shell configuration: environment: []
dockercommand:
- sh
- -c
- "if [ -x /usr/local/bin/bash ]; then\n\texec /usr/local/bin/bash --login\nelif [
-x /usr/bin/bash ]; then\n\texec /usr/bin/bash --login\nelif [ -x /bin/bash ]; then\n\texec
/bin/bash --login\nelif [ -x /usr/local/bin/sh ]; then\n\texec /usr/local/bin/sh
--login\nelif [ -x /usr/bin/sh ]; then\n\texec /usr/bin/sh --login\nelif [ -x /bin/sh
]; then\n\texec /bin/sh --login\nelse\n\techo shell not found\n\texit 1\nfi\n\n"
command: bash
arguments:
- --login
passfile: false
extension: ""
job=13074496 project=2177565 runner=42991260
Using Shell executor... job=13074496 project=2177565 runner=42991260
Waiting for signals... job=13074496 project=2177565 runner=42991260
WARNING: Job failed: exit status 1 job=13074496 project=2177565 runner=42991260
Submitting job to coordinator... ok job=13074496 runner=42991260
Checking for jobs... nothing runner=42991260
Job process output in gitlab
Running with gitlab-ci-multi-runner 9.0.0 (08a9e6f)
on test-runner (42991260)
Using Shell executor...
Running on dannyneverfade-gitlab-runner-4624780...
`ERROR: Job failed: exit status 1`
.gitlab-ci.yml
test:
script:
- echo "test"
Running a local build is successful
dannyneverfade:~/workspace/test-project(master) $ gitlab-runner exec shell test
Running with gitlab-ci-multi-runner 9.0.0 (08a9e6f)
on ()
Using Shell executor...
Running on dannyneverfade-test-runner-4624780...
Cloning repository...
Cloning into '/home/ubuntu/workspace/test-project/builds/0/project-0'...
done.
Checking out 3a6cd3c6 as master...
Skipping Git submodules setup
$ echo "test"
test
Running after script...
Job succeeded