I'm using GitLab CI shell as the executor.
I made an.gitlab-ci.yml, and I determined my code in it when im done
the pipeline got stuck, and I don't know to resolve it.
the error I get
the code I use
A pipeline will be declared as stuck when no requested runner can be available to run it.
Your job configuration requests a runner with the tag docker. Based on the fact that your pipeline is stuck, this tells me that you do not have a GitLab runner available to your project that has a docker tag on it.
To fix this, you'll either have to remove the tag from your job configuration or register a runner with the docker tag (or add the docker tag to an existing runner).
Alright I removed the tags, and it did solve that problem, but now I still get a failed status where i don't know what to do
Related
I am trying to implement a CI/CD pipeline as mentioned in this video by "tech with nana".
But I always end up with this error which says -make: command not found.
However, I have written in my pipeline code as explained by her in the video.
How do I fix this?
Check first if your YAML is correctly written.
Typically, -make should be - make (note the space between - and make).
The GitLab pipeline editor can help verify the configuration syntax automatically.
GitLab dedicated runner defined in the Yaml file using the Tags..But the pre build failing due to not able to pull the docker image defined "amazonlinux:latest",,,,FYI below is where the runner is stuck.....
Running with gitlab-runner 13.5.0 (ece86343)
on runner1 xyzf
Preparing the "docker+machine" executor
If any experts out there, looking for your valueable suggestions. Thanks.
Thanks for the input..But i have sorted out on that day itself, the issue was, runner ec2 instance was not able to be created due to subnet issue.
I'm starting to using GitLab CI/CD for some automation, turns out that I wanted to use WebHooks as described HERE, unfortunately within the company we don't have this option available.
So I was thinking on making a cURL POST request in order to achieve what I wanted using the WebHooks. However I'm not sure in which part of the gitlab-ci.yml to put this.
Are there are any Tags where I can put the instructions to run the cURL, right before the runner finishes? The idea is to make a POST informing if it has failed or succeeded.
We have two servers in our organisation.
1) server with gitlab
2) Build server
I would like to create an automate build happen in the second machine(Build server ) for the source code in the gitlab server.
How can I achieve this using gitlab ?
Thanks,
siva
If you are moving from an "pull" continuous integration system (e.g. using a kind of crontab that regularly checks if the source code on the versioning system has changed and start the configure/build/test/deploy stages if it has), then know that gitlab has a much better way of doing this.
gitlab approach is to configure a "pull" system: every time the code is updated (in any branch) on the git repository then the script defined in your .gitlab-ci.yml is read to see if continuous integration jobs have to be launched. jobs are send to your configured gitlab runners. gitlab runners are defined on your build server(s) and takes the job when they are coming.
Definition of what to do is also describes in the .gitlab-ci.yml.
Here is a list of documentation to start learning about gitlab CI:
the official documentation can be helpful
A general introduction to gitlab ci using docker can be found in this blog article (the first slides are great). If your build server or your intended build is on Linux, I would recommend using the "docker executor" (e.g. gitlab runners are executed inside a docker machine inside your build server). It is easy and quick to setup.
Hope this helps you starting...
I am using gitlab in my local environment. Now I am trying to implement CI for autodeployment process. I followed the tutorial but that tutorial only works on gitlab.com my gitlab addrr is something like this http://192.168.-.-:---/root/test-project.
When I follow the tutorial step by step it works on gitlab.com that means when I add .gitlab-ci.yml file to my root project it triggers the pipeline. But when I add .gitlab-ci.yml file on my local git it doesn't trigger the pipeline as pipeline page shows everytime getting started with pipeline and it seems like i am not pushing it right.
How can I add .yml into my root directory?
the first step is to make pipelines work. I am confused
This should be easier with GitLab 13.12 (May 2021), which does now include a tutorial:
Useful GitLab CI/CD information in the pipeline editor
Creating your first GitLab CI/CD pipeline can be difficult, especially for those new to CI/CD.
You might spend time switching back and forth between documentation and GitLab to get your first pipeline configured.
In this release we’ve added a drawer with useful information to the pipeline editor to help guide you through the steps of writing your first pipeline.
See Documentation and Issue.