Status "stuck" and "Pending" when launching a job on GitLab

0

I'm trying to launch a very simple job and I can not find a way to make it work, and I do not understand why it fails. For now I have done a commit and a push in the file .gitlab-ci.yml as it says the documentation with the simple code to print in the bash a "Hellow world". Gitlab remains permanently in "stuck" and "pending" status.

I include the code in the .gitlab-ci.yml file

File .gitlab-ci.yml on project

    before_script:
  - bash echo 'hellow world'


stages:
    - test

job1:
  stage: test
  script:
    - bash echo 'hellow world'

  only:
    - master
  tags:
    - testPrimerJob

Finally after your help I realized that I was missing a "runner" to be able to launch the job. And I created it using the documentation and steps of gitlab.

To create the runner: link

To register the runner: link

Even so I have not gotten it to work, just enter gitlab and the runner appears as "locked" in the admin / runners panel (it seems to be an issue of version 10.3.0). I have also tried to link it to the project and launch the simple job that I have previously set. The result is the same, "indefinite pending".

As data I will put that by choosing what type of "runner" I have chosen "shell" that I understand is the best I was going for this test, if I'm wrong correct me.

I also found an error when installing the "runner", and it was because of an issue that our server that is responsible for resolving domains, because of some problem could not. The error is this:

Tomorrow I will open another question so as not to dirty this one.

    
asked by Albert Sanchez Guerrero 03.01.2018 в 10:57
source

1 answer

1

As it appears in the documentation , it seems to be different:

# This command is used if the build should be executed in context
# of another user (the shell executor)
cat generated-bash-script | su --shell /bin/bash --login user

# This command is used if the build should be executed using
# the current user, but in a login environment
cat generated-bash-script | /bin/bash --login

# This command is used if the build should be executed in
# a Docker environment
cat generated-bash-script | /bin/bash
  

Therefore, for your example, I understand that it should be:

     

echo "echo 'hola'" | /bin/bash --login

EDITING

Discuss the original question, this is what you see

Therefore, it seems that there is no active runner.

Attached screen of the pint that the runner should have:

    
answered by 03.01.2018 в 11:58