Implement Gitlab AutoDevops with ArgoCD - continuous-integration

We have AutoDevops feature implemented with help of gitlab runner and managing the CD stage with ArgoCD. So the CI pipeline builds a docker image , pushes it to gitlab registry and CD stages use the pushed image to deploy the application with help of ArgoCD. On every commit, gitlab runner will trigger the pipeline. Is there are way in which we can use ArgoCD alone to handle this scenario so that the pipeline gets triggered automatically without having to configure runners?

To avoid having both gitlab runner and argocd running in your cluster, you would configure a gitlab webhook pointing to an ArgoCD Git Webhook Configuration.
Your ArgoCD application would then handle all the rest.

Related

Is there an alternative to gitlab-runner?

I would like to know if there is an alternative to gitlab runners compatible with bitbucket.
The main functionnalities i'm searching for is to install an executor on my server and use it to run some commands on the server where it is installed.
I've tried circle-ci, bitbucket pipelines and travis but all of those require to be connect to my server over ssh.
If you like the gitlab ci you can use it as a CI for bitbucket.
Just mirror your bitbucket repo on gitlab and your will be able to use all of gitlab ci features.
"The following are some possible use cases for repository mirroring:
You migrated to GitLab but still need to keep your project in another source. In that case, you can simply set it up to mirror to GitLab (pull) and all the essential history of commits, tags, and branches will be available in your GitLab instance."
It works on gitlab.com and also on gitlab self hosted (CE or Enterprise)

Gitlab Runner configuration to ignore folder builded on server

I'm new with Gitlab CI. Every time Gitlab CI run, it replace old folder on server. I have small problem when I want to reduce time Gradle build for project which include DL4J (very big size and take time to build). So I want it keep build folder from last version. I follow this to reduce time build by gradle.
Question: Is that possible to skip some folder by config of gitlab ci to keep it exist. This is my gitlab ci
stages:
- build
something_run:
stage: build
script:
- gradle build
- systemctl restart myproject
tags:
- ml
only:
- master
When it run, gradle will build project and time to build quite long. So I want next time CI run it will not delete last build version.
Take a look at cache (https://docs.gitlab.com/ee/ci/yaml/#cache)
cache is used to specify a list of files and directories which should be cached between jobs.
GitLab CI/CD provides a caching mechanism that can be used to save time when your jobs are running.
See also https://docs.gitlab.com/ee/ci/caching/index.html

How to configure Azure-DevOps release pipeline task to kick off automated UI test scripts on xcode in MacBook?

I have setup the Build pipeline in Azure-DevOps to generate build of xcode automation project. For that, I have used Microsoft hosted MacOS agent on my macbook. Now, i want to setup release pipeline to kick off automated test scripts from TFS/Azure-DevOps Server on the same macBook? Not sure what are the configuration I need to use in release pipeline task. If someone has done this, could you please help me step-by-step?
Did you mean you want the automated test from azure devops to run against your local macBook.
If this is your intention. You may need to setup a self-hosted macOS agent on you local macBook.
Please check here to create a self-hosted agent.
And in the release pipeline, associate your release pipeline to the build artifacts from your build pipeline. Make sure the build artifacts include your test code.If not you may need to add a publish artifact task in your build pipeline to include your test code in the build artifacts which will be downloaded and used in release pipeline.
In your stage create an agent job with the agent pool set to your agent pool with your self-host agent. And add a xcode task to run your test. When you run the release pipeline the test will run on your local macBook.
Here is documents about how to build, test and deploy with xcode. Hope you find above helpful.

How to deploy image to kubernetes with jib and maven

I have environment where I can simply push images(created with Jib) to local repository. I want to now to be able to deploy this on kubernetes, but from the "safety" of maven.
I know I can spin some Skaffold magic, but I don't like to have it installed separately. Is there some Jib-Skaffold workflow I can use to continuously force Skaffold to redeploy on source change(without running it in command line)
Is there some Skaffold plugin? I really like what they have here, but proposed kubernetes-dev-maven-plugin is probably internal only.
Skaffold can monitor your local code and detect changes that will trigger a build and deployment in your cluster. This is built-in on Skaffold using the dev mode so it solves the redeploy on source change part.
As for the workflow, Jib is a supported builder for Skaffold so the same dynamic applies.
Although these features automate the tasks, it is still necessary to run it once with skaffold dev and let it run in the "background".

GitLab runner configuration

I am using standard GitLab runner.
I need to determinate updates of master branch and updates of development branch. Beacause I want to copy master branch to production server and dev branch to test-server.
But I have only one .gitlab-ci.yml file which starting after 'git push'.
If I am register second runner. it is also controller by .gitlab-ci.yml
What to do?
In gitlab ci config file, we have the only option allowing to trigger a job only from a specified branch.
Doc at docs.gitlab.com/ce/ci/yaml/README.html#only-and-except

Resources