Gitlab CI - Start Shared Runner for normal repos











up vote
0
down vote

favorite












I'm new to Gitlab CI.



I have configured .gitlab-ci.yml file, and using CI Lint it has passed the validation process.



Based on this documentation, I can see a specific runner should be configured on a virtual machine, a VPS, a bare-metal machine, a docker container or even a cluster of containers.



And I can see gitlab has its own shared runners and enabled by default.



When I visit the Pipeline page I can only see the blue Get Started with Pipeline button and when clicked I was redirected to this page.



The "Gitlab CI - How to start Shared Runner" says that Gitlab CI will only run the job for the testing branch, however, none of my git use branch unless for very specific cases. So



The question is how to use this shared runner in my normal (private) repo that has only the single master branch?










share|improve this question




























    up vote
    0
    down vote

    favorite












    I'm new to Gitlab CI.



    I have configured .gitlab-ci.yml file, and using CI Lint it has passed the validation process.



    Based on this documentation, I can see a specific runner should be configured on a virtual machine, a VPS, a bare-metal machine, a docker container or even a cluster of containers.



    And I can see gitlab has its own shared runners and enabled by default.



    When I visit the Pipeline page I can only see the blue Get Started with Pipeline button and when clicked I was redirected to this page.



    The "Gitlab CI - How to start Shared Runner" says that Gitlab CI will only run the job for the testing branch, however, none of my git use branch unless for very specific cases. So



    The question is how to use this shared runner in my normal (private) repo that has only the single master branch?










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm new to Gitlab CI.



      I have configured .gitlab-ci.yml file, and using CI Lint it has passed the validation process.



      Based on this documentation, I can see a specific runner should be configured on a virtual machine, a VPS, a bare-metal machine, a docker container or even a cluster of containers.



      And I can see gitlab has its own shared runners and enabled by default.



      When I visit the Pipeline page I can only see the blue Get Started with Pipeline button and when clicked I was redirected to this page.



      The "Gitlab CI - How to start Shared Runner" says that Gitlab CI will only run the job for the testing branch, however, none of my git use branch unless for very specific cases. So



      The question is how to use this shared runner in my normal (private) repo that has only the single master branch?










      share|improve this question















      I'm new to Gitlab CI.



      I have configured .gitlab-ci.yml file, and using CI Lint it has passed the validation process.



      Based on this documentation, I can see a specific runner should be configured on a virtual machine, a VPS, a bare-metal machine, a docker container or even a cluster of containers.



      And I can see gitlab has its own shared runners and enabled by default.



      When I visit the Pipeline page I can only see the blue Get Started with Pipeline button and when clicked I was redirected to this page.



      The "Gitlab CI - How to start Shared Runner" says that Gitlab CI will only run the job for the testing branch, however, none of my git use branch unless for very specific cases. So



      The question is how to use this shared runner in my normal (private) repo that has only the single master branch?







      git gitlab gitlab-ci gitlab-ci-runner






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 8 at 19:32

























      asked Nov 8 at 16:53









      xpt

      3,99173070




      3,99173070
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Shared runners will run for any branch, so for the master branch too (unless you configure otherwise).



          Additionally,




          • you can pick-up a specific runner if you define a tag for your job.

          • you can filter if the job will be triggered via only and/or except directives.


          For example, following job will trigger for any push, despite the branch:



          buildClient:
          stage: buildComponents
          script:
          - echo "Building the client..."


          On the other hand, this job will trigger only for push to the develop branch and it will be processed by any available runner with the docker tag:



          buildServer:
          stage: buildComponents
          script:
          - echo "Building the server with Docker..."
          only:
          - develop
          tags:
          - docker




          According the blue Get Started with Pipeline button: You need to add a .gitlab-ci.yml file to the root of your project and push it to GitLab. This file defines stages and jobs of your build pipeline. Jobs are then picked-up by runners according the given configuration. E.g. simple .gitlab-ci.yml can look like this:



          image: alpine:latest

          stages:
          - test
          - build

          testApp:
          stage: test
          script: echo "Testing..."

          buildApp:
          stage: build
          script: echo "Building..."


          See Configuration of your jobs with .gitlab-ci.yml in GitLab documentation for more details.






          share|improve this answer























          • Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
            – xpt
            Nov 9 at 14:14












          • @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
            – Vít Kotačka
            Nov 9 at 16:13










          • Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
            – xpt
            Nov 9 at 20:46










          • You are absolutely right. Thx!!!
            – xpt
            Nov 10 at 15:53











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212518%2fgitlab-ci-start-shared-runner-for-normal-repos%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Shared runners will run for any branch, so for the master branch too (unless you configure otherwise).



          Additionally,




          • you can pick-up a specific runner if you define a tag for your job.

          • you can filter if the job will be triggered via only and/or except directives.


          For example, following job will trigger for any push, despite the branch:



          buildClient:
          stage: buildComponents
          script:
          - echo "Building the client..."


          On the other hand, this job will trigger only for push to the develop branch and it will be processed by any available runner with the docker tag:



          buildServer:
          stage: buildComponents
          script:
          - echo "Building the server with Docker..."
          only:
          - develop
          tags:
          - docker




          According the blue Get Started with Pipeline button: You need to add a .gitlab-ci.yml file to the root of your project and push it to GitLab. This file defines stages and jobs of your build pipeline. Jobs are then picked-up by runners according the given configuration. E.g. simple .gitlab-ci.yml can look like this:



          image: alpine:latest

          stages:
          - test
          - build

          testApp:
          stage: test
          script: echo "Testing..."

          buildApp:
          stage: build
          script: echo "Building..."


          See Configuration of your jobs with .gitlab-ci.yml in GitLab documentation for more details.






          share|improve this answer























          • Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
            – xpt
            Nov 9 at 14:14












          • @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
            – Vít Kotačka
            Nov 9 at 16:13










          • Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
            – xpt
            Nov 9 at 20:46










          • You are absolutely right. Thx!!!
            – xpt
            Nov 10 at 15:53















          up vote
          1
          down vote



          accepted










          Shared runners will run for any branch, so for the master branch too (unless you configure otherwise).



          Additionally,




          • you can pick-up a specific runner if you define a tag for your job.

          • you can filter if the job will be triggered via only and/or except directives.


          For example, following job will trigger for any push, despite the branch:



          buildClient:
          stage: buildComponents
          script:
          - echo "Building the client..."


          On the other hand, this job will trigger only for push to the develop branch and it will be processed by any available runner with the docker tag:



          buildServer:
          stage: buildComponents
          script:
          - echo "Building the server with Docker..."
          only:
          - develop
          tags:
          - docker




          According the blue Get Started with Pipeline button: You need to add a .gitlab-ci.yml file to the root of your project and push it to GitLab. This file defines stages and jobs of your build pipeline. Jobs are then picked-up by runners according the given configuration. E.g. simple .gitlab-ci.yml can look like this:



          image: alpine:latest

          stages:
          - test
          - build

          testApp:
          stage: test
          script: echo "Testing..."

          buildApp:
          stage: build
          script: echo "Building..."


          See Configuration of your jobs with .gitlab-ci.yml in GitLab documentation for more details.






          share|improve this answer























          • Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
            – xpt
            Nov 9 at 14:14












          • @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
            – Vít Kotačka
            Nov 9 at 16:13










          • Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
            – xpt
            Nov 9 at 20:46










          • You are absolutely right. Thx!!!
            – xpt
            Nov 10 at 15:53













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Shared runners will run for any branch, so for the master branch too (unless you configure otherwise).



          Additionally,




          • you can pick-up a specific runner if you define a tag for your job.

          • you can filter if the job will be triggered via only and/or except directives.


          For example, following job will trigger for any push, despite the branch:



          buildClient:
          stage: buildComponents
          script:
          - echo "Building the client..."


          On the other hand, this job will trigger only for push to the develop branch and it will be processed by any available runner with the docker tag:



          buildServer:
          stage: buildComponents
          script:
          - echo "Building the server with Docker..."
          only:
          - develop
          tags:
          - docker




          According the blue Get Started with Pipeline button: You need to add a .gitlab-ci.yml file to the root of your project and push it to GitLab. This file defines stages and jobs of your build pipeline. Jobs are then picked-up by runners according the given configuration. E.g. simple .gitlab-ci.yml can look like this:



          image: alpine:latest

          stages:
          - test
          - build

          testApp:
          stage: test
          script: echo "Testing..."

          buildApp:
          stage: build
          script: echo "Building..."


          See Configuration of your jobs with .gitlab-ci.yml in GitLab documentation for more details.






          share|improve this answer














          Shared runners will run for any branch, so for the master branch too (unless you configure otherwise).



          Additionally,




          • you can pick-up a specific runner if you define a tag for your job.

          • you can filter if the job will be triggered via only and/or except directives.


          For example, following job will trigger for any push, despite the branch:



          buildClient:
          stage: buildComponents
          script:
          - echo "Building the client..."


          On the other hand, this job will trigger only for push to the develop branch and it will be processed by any available runner with the docker tag:



          buildServer:
          stage: buildComponents
          script:
          - echo "Building the server with Docker..."
          only:
          - develop
          tags:
          - docker




          According the blue Get Started with Pipeline button: You need to add a .gitlab-ci.yml file to the root of your project and push it to GitLab. This file defines stages and jobs of your build pipeline. Jobs are then picked-up by runners according the given configuration. E.g. simple .gitlab-ci.yml can look like this:



          image: alpine:latest

          stages:
          - test
          - build

          testApp:
          stage: test
          script: echo "Testing..."

          buildApp:
          stage: build
          script: echo "Building..."


          See Configuration of your jobs with .gitlab-ci.yml in GitLab documentation for more details.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 9 at 16:17

























          answered Nov 9 at 8:48









          Vít Kotačka

          426419




          426419












          • Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
            – xpt
            Nov 9 at 14:14












          • @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
            – Vít Kotačka
            Nov 9 at 16:13










          • Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
            – xpt
            Nov 9 at 20:46










          • You are absolutely right. Thx!!!
            – xpt
            Nov 10 at 15:53


















          • Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
            – xpt
            Nov 9 at 14:14












          • @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
            – Vít Kotačka
            Nov 9 at 16:13










          • Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
            – xpt
            Nov 9 at 20:46










          • You are absolutely right. Thx!!!
            – xpt
            Nov 10 at 15:53
















          Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
          – xpt
          Nov 9 at 14:14






          Thanks for the reply Vit. Now that I know Shared runners will run for any branch, the next hurdle I need to overcome is, why when I visit the Pipeline page I can only see the blue Get Started with Pipeline button, even though my shared runners are enabled? There must be a step that I'm missing. thx.
          – xpt
          Nov 9 at 14:14














          @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
          – Vít Kotačka
          Nov 9 at 16:13




          @xpt I've added an additional explanation at the end of my answer. Once you push your .gitlab-ci.yml file, this button will disappear and you'll see your pipelines.
          – Vít Kotačka
          Nov 9 at 16:13












          Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
          – xpt
          Nov 9 at 20:46




          Thanks Vit. Please give me some time to try it and prepare a small demo as I can't make my forked repo public, ref gitlab.com/gitlab-org/gitlab-ce/issues/40088
          – xpt
          Nov 9 at 20:46












          You are absolutely right. Thx!!!
          – xpt
          Nov 10 at 15:53




          You are absolutely right. Thx!!!
          – xpt
          Nov 10 at 15:53


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212518%2fgitlab-ci-start-shared-runner-for-normal-repos%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Schultheiß

          Verwaltungsgliederung Dänemarks

          Liste der Kulturdenkmale in Wilsdruff