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?
git gitlab gitlab-ci gitlab-ci-runner
add a comment |
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?
git gitlab gitlab-ci gitlab-ci-runner
add a comment |
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?
git gitlab gitlab-ci gitlab-ci-runner
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
git gitlab gitlab-ci gitlab-ci-runner
edited Nov 8 at 19:32
asked Nov 8 at 16:53
xpt
3,99173070
3,99173070
add a comment |
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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