Skip to content Skip to sidebar Skip to footer

Gitlab Ci :- Getting Pending Status After Push On The Gitlab

I am using the Gitlab-ci for the creating the build on the push,I have also creating the .gitlab-ci.yml inside my root directory. With each push the code on the Gitlab , i am getti

Solution 1:

If you have active shared-runner, then try to give the tags of the runner in the .gitlab-ci.yml. Say if the tag for the shared-runner is dev-ci, then find below the updated code:

image:jangrewe/gitlab-ci-androidstages:-buildbefore_script:-exportGRADLE_USER_HOME=$(pwd)/.gradle-chmod+x./gradlewcache:key:${CI_PROJECT_ID}paths:-.gradle/build:stage:buildtags:-dev-ciscript:-./gradlewassembleDebugartifacts:paths:-app/build/outputs/

Screenshot of the runner tags:

enter image description here

Setting up a runner

Before setting up a runner for your project, you need to first:

  1. Install gitlab-runner on a server separate than where GitLab is installed.
  2. Register a runner [there are 3 types of runners: shared, group and specific runners. Depending on requirement, you can choose which runner to register.]
  3. While registering the runner, you need to give tags and the type of runner executor you need.
  4. After registering the runner, go to Project >> Settings >> CI/CD >> Runners, you can see the runner is online. If in case you are using Group or Shared runner, then you need to enable the runner in Project settings.

In your case, you can use Specific Runner with Docker as Runner-Executor and then, in the .gitlab-ci.yml use the tags you provided while registering the runner.

Post a Comment for "Gitlab Ci :- Getting Pending Status After Push On The Gitlab"