Skip to content

Shell execution issues on SLES 11 SP3

We have installed the GitLab runner 1.5.3

  • Version: 1.5.3
  • Git revision: fb49c478
  • Git branch: 1-5-stable
  • GO version: go1.6.3
  • Built: Tue, 13 Sep 2016 19:39:13 +0000
  • OS/Arch: linux/amd64

In two Linux machines

1) First Linux server

  • SUSE Linux Enterprise Server 11 (x86_64)
  • VERSION = 11
  • PATCHLEVEL = 3

2) Second linux Server

  • NAME="SLES"
  • VERSION="12-SP1"
  • VERSION_ID="12.1"
  • PRETTY_NAME="SUSE Linux Enterprise Server 12 SP1"
  • ID="sles"
  • ANSI_COLOR="0;32"
  • CPE_NAME="cpe:/o:suse:sles:12:sp1"

We use this instruction for installing manually the gitlab runners https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md

We connect the both gitlab runners ot the Gitlab server but

In 2) we can have the Build working

Running with gitlab-ci-multi-runner 1.5.3 (fb49c47)
Using Shell executor...
Running on dkaapp-dc05...
Fetching changes...
HEAD is now at 6b08453 test
From https://RETRACTED/RETRACTED
6b08453..b8c7eb6 master -> origin/master
Checking out b8c7eb66 as master...
$ cd /usr/local/bin
$ echo GIGI
GIGI
Build succeeded

In 1) is not working

Running with gitlab-ci-multi-runner 1.5.3 (fb49c47)
Using Shell executor...
Running on dkaapp-cmt...
Fetching changes...
ERROR: Build failed: exit status 1

This is the debug mode info

Running with gitlab-ci-multi-runner 1.5.3 (fb49c47)  build=103 project=10 runner=ab4f102e
DEBU[0015] 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: su
arguments:
- -s
- /bin/bash
- gitlab-runner
- -c
- bash --login
passfile: false
extension: ""
  build=103 project=10 runner=ab4f102e
DEBU[0015] Using Shell executor...                       build=103 project=10 runner=ab4f102e
DEBU[0015] Waiting for signals...                        build=103 project=10 runner=ab4f102e
DEBU[0015] Checking for builds... nothing                runner=ab4f102e
WARN[0015] Build failed: exit status 1                   build=103 project=10 runner=ab4f102e
DEBU[0015] Submitting build to coordinator... ok         build=103 runner=ab4

The .gitlab-ci.yaml is: For 1)

stages:
  - deploy_dev

puppet_deploy_dev:
    stage: deploy_dev
    tags:
        - puppet-shell_sles_11
    script:
        - cd /usr/local/bin
        - echo GIGI

For 2)

stages:
  - deploy_dev

puppet_deploy_dev:
    stage: deploy_dev
    tags:
        - puppet-shell
    script:
        - cd /usr/local/bin
        - echo GIGI

The config.toml file is in both machines:

concurrent = 1
check_interval = 0

[[runners]]
  name = "puppet-shell"
  url = "https://REMOVED/ci"
  token = "REMOVED"
  tls-ca-file = "/usr/local/bin/REMOVED.cer"
  executor = "shell"
  environment = ["GIT_SSL_NO_VERIFY=true"]

Ticket: https://gitlab.zendesk.com/agent/tickets/39643