Gitlab CI build pending issue - gitlab

I don't know where from that problem comes. I sure, I didn't do anything like that, I'm just have worked in a usual mode. Can some one help me to fix that?

Related

Job keeps failing after issue has been fixed

I'm really new to using git so this might be a dumb issue, but somehow my colleague also doesn't know how to fix it.
So i pushed my code which worked without a problem.
When trying to commit i kept having an issue where it came out that the node.js version was too old.
My colleague fixed the issue and updated the node.js version.
However when i try to "Rerun failed jobs" it is still giving me the same issue as before.
I tried to push the code again and commit again but it obviously tells me that everything is already up-to-date.
When trying to pull the code again i just get the code that i already pushed.
My next try would be to push the wrong code again just to immediately push the right one afterwards, but i feel like there has to be a better way. Has anyone experienced this before and knows a fix for this problem?
The described behavior is how Azure DevOps works.
In order to get a run with your new code you should create a new run using the -> Run Pipeline button. This will checkout your new code. When using rerun failed job, the Azure DevOps will keep the same code, settings and will try to rerun the same job. That's why your pipeline fails.
The same apply with the releases. Every time you need to get a new Release (after you updated your pipeline) you should use the Create Release button and not run the previous failed one.
To conclude you should first commit your changes with the updated node version and then run a new pipeline.

Gitlab: Issues and Pipelines

I have setup a Git project + CI (using Gitlab-runner) on Gitlab v12.3.5. I have a question about issues and pipelines. Let's say I create an issue and assign it to myself. So this create a branch/merge request. Then, I open up the WebIDE to modify some files in an attempt to fix the issue. Now I want to see what if my changes will fix the issue. In order to run the pipeline, is it necessary to commit the changes into the branch or is there some other way?
The scenario I have is that it may take me 20 times to fix the files to make the pipeline 'clean'. In that case, I would have to keep committing on each change to see the results. What is the preferred way to accomplish this? Is it possible to run the pipeline by just staging the changes to see if they work?
I am setting up the gitlab-ci.yaml file. Hence it is taking a lot of trials to get it working properly.
You should create a branch and push to that. Only pushed changes will trigger pipeline runs. After you're done, you can squash and merge the branch so that the repo's history will be clean.
Usually though, you won't have to do this because you'll have automated tests set up to check whether your code works. You should also try testing the Linux commands (or whichever commands you're running in your GitLab CI scripts) locally first. If you're worried about whether your .gitlab-ci.yml syntax is correct, you can navigate to the file in your repository and check there (there's a button at the top which lints it).

Automatically add a label to GitLab issue with commit

Is it somehow possible to automatically add a label to GitLab issue in the git commit message? I know that it is possible to close issue by message fix #123, but how to add label to issue, for example, "Testing"?
No, this is not possible natively. The only thing you can do is mention the issue 'Fixes/Closes #123' as you mentioned.
If you really need to do this, then you could potentially do it as part of a custom server-side hook. You would have to interact with the GitLab API to add/manage the labels, but it would be possible. You can learn more about this in Custom Hooks Documentation.
However, I generally recommend avoiding custom hooks. Especially ones that interact with an API as strange things can happen. For example, if you call an API in a pre-receive hook and that connection hangs, your push also hangs. It's not quite so bad for a post-receive but there could still be problems if a post-receive hangs indefinitely.

Initiating a job on another project from a gitlab job

I have been searching the internet for an answer but cannot find anything.
I have a gitlab yml file in one project and would like to start a job for a different project.
If this is possible I would be grateful if someone could point me in the right direction
Thanks
This is possible, answered a similar question a few days ago, check it: Can I combine two branches into a GitLab CI build?
Bottomline, you can use pipeline triggers.

Phabricator run Gitlab CI build

I was looking for a solution, how can I start a build from phabricator. Currently we are using triggers for starting builds, but I need to start it when the review is passed in phabricator. Anyone know a solution for this problem?
The flow is the next: We take the task from the Review to the Testing, and this is what need to start the trigger which start the build under Gitlab. It is not necessary do the same, if anyone know an other solution or a best practice I am happy to hear.

Resources