Running dev pipeline before doing MR


What happens

I have a problem when running pipeline on my branch. I am also not sure if I need to install GitLab Runner and attach the autonomic-autoscaling tag or what kind of executor I need to install or if all this is actually necessary

What do you understand or find about that problem

I understand that I have to run a pipeline on my branch and that all the jobs have to pass before doing a MR

You make any workaround? What did you do?

I installed GitLab Runner on my VM using this guidelines, registered the runner manually and set the custom executor to shell. I also ran the ./ <test_command> and gitlab-runner exec shell reviews locally before doing the push to my branch.

(Optional) Why fails your workaround?

I am not quite sure why it fails, but when the pipeline runs on my repository/branch It says I need to first install nix on my system. I had previously installed nix on my machine.


Link to the error

This is the local error I get whenever I execute the runner locally on reviews test

Picture that I have nix installed.

failed MR

I need help with

I need help figuring out if I am in the right track or what I need to do to run the dev pipeline on my branch before performing the MR.

Ok, this seems like a problem that I used to have, sometimes you should refresh nix, (In my case all day) for that I add a little execution to refresh nix on my .bashrc file.

#Activate Nix
source /home/<your username>/.nix-profile/etc/profile.d/

That is what I used to fix my problem, on the other hand, the failed job in your MR say why it fails, tell me if the ./ works well with my workaround, if not you should go deeper and read more on the web about your issue (or explain the new things that you can found)

Thanks for the response, I had tried using that command before without any helpful results. I come to realize that the command won’t run when I do it as superuser, like: sudo ./ test_commit_msg it says I need to install nix, but, when done without sudo it works just fine.

This is the same error I get when I run the pipleline from my remote repository, I need to find a way to run the command without sudo during the pipeline, or at least this is what I believe I should do.

Ok I was reading deeper your try to upload the solution, but I found that is probably that you are trying in a bad way, because you must upload your commit normally, why you are running reviews without the other pipelines?

You only need to make a normal commit with
git commit

and later you should make the push to the repo:
git push

with that the pipelines should run without problems.

You should wait that all pipes become successful and later open an MR.

You don’t need (and shouldn’t) run reviews without the other pipelines.

The thing is when I do the commit I have to set up a Runner pipeline to be equal to autonomic-autoscaling otherwise the pipeline gets stuck. After I create the runner and add a tag I get these errors for all the pipelines

can you explain the exact steps your are doing to make the MR?

for example my steps:

  1. finish the challenge
  2. copy the challenge in his folder.
  3. use git add to add the challenge.
  4. use git commit and use the commit template.
  5. use git rebase to be ahead.
  6. use git push to push my commit
  7. go to GitLab and see the CI and wait until the pipelines successfully executed.
  8. when the pipes are finished go to my branch a make an MR (merge request).
  9. wait until pipe reviews pass and wait for the peer review.
  10. see the peer review if has any comment or If the MR pass.

Could be helpful if you send the steps one by one that you are doing.

These are the steps I did:

  1. Finished the challenge.
  2. Placed all the files in the corresponding folder.
  3. Used git add to add all the changes.
  4. Used git commit using the template.
  5. Used git rebase to be ahead.
  6. Go to GitLab and see the CI (I saw a stuck tag because I did not have a autonomic-autoscaling in my CI/CD settings).
  7. Created a GitLab Runner as a shell executor and attached the autonomic-autoscaling tag.
  8. From the terminal I ran sudo gitlab-runner run.
  9. Wait for the pipes to finish.
  10. See the errors from the previous screenshots.

that seems that you are missing the git push, i was searching the CI that you start on gitlab, and the only CI that I can see is reviews without the others.

I fixed the problem. I had no idea that I had to create a config.toml file on my local and paste the content from the existing reviews.toml into this file, and from there specify which jobs I wanted to run; I previously was running the gitlab run command using the reviews.toml file which was testing for reviews.