How to trigger gitlab pipeline test manually? - gitlab-ci

I would like to ask is there any way I can trigger the gitlab pipeline test manually? For example I just want to play around with the .gitlab-ci.yml script without commiting change to the original .gitlab-ci.yml file.

Related

How to manually upload baseline screenshots in Percy for base branch

I am currently working on a react-native application and want to use Percy, a visual testing service to catch UI changes in my app.
I don't go the storybook way.
Currently, we use detox for testing, it generates screenshots artifacts which we directly upload to Percy.
But the test comparison always fails right now because we don't have corresponding baseline snapshots for the base branch, develop.
So, I want to be able to upload those baseline snapshots for the default branch manually and change them when I want.
I need help with that.
I have already checked the #percy/cli docs, I only see a way to upload manually but I don't see how to do it for the base branch.
Thanks
You can use PERCY_BRANCH to change the builds git branch and run a build to upload a set of screenshots you'd like to use for a baseline. https://docs.percy.io/docs/environment-variables#optional Something like:
PERCY_BRANCH="your-baseline-branch-name-here" npx percy upload ./screenshots (or whatever the CLI command you're running -- if it's the CLI the PERCY_BRANCH env var will work)

GitLab CI/CD for vue.js application and Node API

how to edit the .gitlab-ci.yml file in order to correctly execute the CI/CD pipeline on behalf of a vue.js application?
A .gitlab-ci.yml should be part of your repository, at the root folder of said repo.
See for example "How to use GitLab CI/CD for Vue.js" (2017, so some details may have changed since then)
Or the 2020 "How to auto deploy a Vue application using GitLab CI/CD on Ubuntu 18.04"
In both case, you can directly edit the .gitlab-ci.yml, add, commit and push.
Create a .gitlab-ci.yml file at the root of your repo.
GitLab will check for this file when new code is pushed.
If the file is present, it will define a pipeline, executed by a GitLab Runner.

Spinnaker configuration loaded as code from gitlab

It is really good that we have spinnaker pipeline as a code from roer and other tools. But is there a way that we will store these pipelines and as well as configurations on gitlab and restore by just fetching the files from gitlab? without really manually inserting the configurations?
You can use "Save Pipelines" stage.
See related commit for details.

Where can read about available commands i can use as a script in my gitlab CI yml file?

Basically, i'm getting started with gitlab's continuous integration, but having a hard time looking for a guide or documentation that would help me write scripts for the file.
Where can i read about operators, conditionals and instructions i can use for this?
Thanks!
First of all read the Quick start
Here is everything about yml file: Configuration of your jobs with .gitlab-ci.yml
I can recommend to use CI lint which can validates your yml syntax. It can saves your time ;-)

How to restrict runners to a specific branch and lock the .gitlab-ci.yml from changes?

Right now, anyone that creates a branch in my project and adds a .gitlab-ci.yml file to it, can execute commands on my server using the runner. How can I make it so that only masters or owners can upload CI config files and make changes to them?
I'm using https://gitlab.com/gitlab-org/gitlab-ci-multi-runner running on bash.
The GitLab runner wasn't really designed for this scenario and thus you are unable to do this. What you could do instead is have a new project with just your .gitlab-ci.yml file and configure it so that it pulls the original repository. From there you can do all the other things you want to do with your repository.