cicd | continuous integration and continuous delivery | Continous Integration library
kandi X-RAY | cicd Summary
kandi X-RAY | cicd Summary
continuous integration and continuous delivery
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cicd
cicd Key Features
cicd Examples and Code Snippets
Community Discussions
Trending Discussions on cicd
QUESTION
I'm trying to setup a gitlab kubernetes agent and runner for my in-cluster CICD pipeline. My gitlab.ci is something on the line of:
...ANSWER
Answered 2022-Apr-14 at 21:31In short: In your gitlab-runner values file, add the setting service_account = "gitlab"
under [runners.kubernetes]
.
Explanation: The actual pod that executes the job is not the gitlab-runner pod, nor the gitlab agent pod. Gitlab runner kubernetes executor spawns a new pod for each job. The place to set the service account name for these pods is in the above setting.
The error message above shows that the pod running the job was using the default service account for the gitlab
namespace. this service account doesn't (and shouldn't) have the required permissions.
The section runners.config
in the values file, ends up in the config.toml file that configures the runner. Here is the documentation about config.toml for kubernetes executor: https://docs.gitlab.com/runner/executors/kubernetes.html#other-configtoml-settings
And here is the Kubernetes executor interaction diagram
QUESTION
I am using azure-streamanalytics-cicd to test my asaql queries of the Stream Analytics Job.
Inside this query I need to have current timestamp:
...ANSWER
Answered 2022-Feb-18 at 22:23You can (and should) define a custom timestamp by using TIMESTAMP BY.
When developing locally, if you don't provide a TIMESTAMP, we use the query start time as the timestamp for all records. If you do any type of time processing (analytics functions like lag or lead, stream-stream join, temporal aggregations), they will most likely behave strangely to you, because they will operate on that single time slice of the query start time.
But also it means that System.Timestamp()
will be different for every run, which will break unit tests.
We are working on adding an exclude list in the test case definition template, so you can tell the test runner to not take that column into account when comparing results. But this is a long term thing that won't help here.
What will work is using TIMESTAMP BY
. If you don't have a event timestamp or don't want to use one from the payload, you can always use TIMESTAMP BY EventEnqueuedUtcTime
, which is the default implicit behavior anyway. This way you can add EventEnqueuedUtcTime to your input mock files and test input files, and control the behavior of the unit test.
QUESTION
I have a pipeline triggered from the GitLab UI (CICD >> Pipelines >> Run Pipeline) by someone else and I want to know or audit the Used Variables/Parameters for the Completed Pipelines. How do we do that?
...ANSWER
Answered 2021-Nov-08 at 18:15This is not possible out-of-the-box as it would pose a security risk. If you need to be able to see specific variables for a job (and it is safe to do so for your use case) then you can echo those specific variables in your job scripts, which will ensure they are visible in the job logs. Alternatively, you could write them to a file and save that file as an artifact (which can also have an expiration).
Again - please do not this with secrets or sensitive variables.
QUESTION
How to trigger a GitLab CICD pipeline whenever a tag like below gets created? How can I make it in regular expression for all future tags based on the same format?
Tag to trigger the pipeline: 2021.08.31.DEVRELEASE.0001
Where DEVRELEASE
is the static keyword, rest of the keywords would change.
ANSWER
Answered 2021-Sep-03 at 08:01You can use rules
and if
keywords to define your tag's regex. You can use the following snippet and customize the regex to match your desired tag:
QUESTION
Is it possible to create a kubernetes RBAC rule that allows creating a Job from an existing CronJob, but prevents creating a Job any other way?
We want to keep our clusters tightly locked down to avoid arbitrary deployments not managed by CICD - but we also need to facilitate manual testing of CronJobs, or rerunning failed jobs off schedule. I'd like developers to be able to run a command like:
...ANSWER
Answered 2022-Mar-01 at 09:34In this scenario in order to successfully execute this command:
QUESTION
We are in the process of upgrading our ARM Templates to Bicep, one of which is for storage. In the initially ported Bicep file, everything worked fine and then as part of my PR, it was highlighted that I'd left out isHnsEnabled
.
I then adjusted my bicep script to include that property setting with a parameter as we are creating module libraries:
...ANSWER
Answered 2022-Feb-15 at 09:42The isHnsEnabled
property (to enable hierarchical namespace) can only be set when creating new resource.
You can check this article to know when to enable this feature: Deciding whether to enable a hierarchical namespace.
To upgrade your storage, you can follow this article: Upgrade Azure Blob Storage with Azure Data Lake Storage Gen2 capabilities.
Otherwise you could delete and recreate the storage account.
QUESTION
In the gitlab-ci file, artifact retention can be set with expire_in
, and if no expiration is given then git defaults to 30 days, unless overridden or the artifact was generated before June 22, 2020
I’m working on a project to unify our pipeline configs and am unable to find where to view our artifact's expiration dates. On the individual pipeline steps, there is a message that states expiration time, but I can’t find how to see this for an entire project or group.
To my surprise, I can’t find anything in the Git documentation on how to view or report on this.
Does anyone have suggestions for how to check artifact expiration times for a project, or a group?
...ANSWER
Answered 2022-Jan-29 at 13:01We can retrieve metadata for all jobs of a project by using the Project API https://docs.gitlab.com/ee/api/jobs.html#list-project-jobs
QUESTION
Bonjor,
Hi All, hope all good.
From past days, I was setting up the coverage visualization on the multi-module gradle
project with the gitlab instance using gitlab-CI
and jacoco
test reports and cobertura
conversion analysis. And need a small assistance in setting up the gitlab-CI for the visualization task.
My current gitlab-ci.yaml
file is as below:
ANSWER
Answered 2022-Jan-28 at 03:53I ended up developing my own plugin jacotura-gradle-plugin that converts the jacoco
reports to cobertura
reports and executed as gradle
task.
Reference: Jacotura @ Github
QUESTION
I am trying to create a lambda function through terraform for files present in gitlab repo however I am getting error in CICD pipeline:
"./lambda_function.zip: no such file or directory"
The folder (src folder) containing the lambda function python file is different than the folder (terraform) containing the terraform file.
My Gitlab Project looks like
ProjectName
-src
- lambda_function.py
-terraform
- lambda.tf
And the terraform code in lambda.tf is:
...ANSWER
Answered 2022-Jan-25 at 10:07The problem in short:
The problem comes down to this: terraform plan
creates data.archive_file
resources, that are later used by terraform apply
. If you do these two terraform commands in separate gitlab pipeline stages. The zip files generated in the plan
stage, won't be available to the apply
stage. Unless you add the output directory as an artifact
The longer version of the answer
If you are using multiple stages of the gitlab pipeline, one to plan, then one to apply. This is your problem.
The "dist" zip files are created during the plan stage, so you need to add the $PWD/dist as an artifact to your pipeline. Then in your apply stage, tell the pipeline it needs the plan stage, making the artifacts available to the apply command.
So in our pipeline, I had something like this:
QUESTION
I have a Puppeteer CICD project where I use the NodeEnvironment to proceed to our test harness website, pull down the current list of custom xml tests from the dropdown element our QA team uses and then dynamically constructs an array of 1200+ URLs from this. Then I was using this.global to use as a reference array where I would then use clustering to run these in parallel.
I'm having problems wrapping my head around the proper way to get this list populated and then run the tests in parallel. The parameterized test option seems to be close to what I want, but I need a way to populate the dynamic array of urls before I jump to the for loop and it seems that the array is not populated yet and it is trying to run through the for loop and execute tests, even when using a promise.
I know I could probably hack something to get things working, but I would much rather know the proper expected way of doing this that allows me to take advantage of the parallelization playwright provides.
I am currently looking into worker fixtures or sharding to see if it provides me a way of achieving this, but the problem is if each worker goes to the website to populate the array then they will all have the 1200 test cases, which doesn't help either. I'm open to any ideas here, but an important thing to state is that I want each url to have its own test as each test has a series of get requests which I need to capture and perform comparisons against the query params.
A drastically minimized example of what I currently have is below:
dynamic.spec.js ...ANSWER
Answered 2022-Jan-20 at 20:53First thing first. You do not need before all as far as I can see. How it will work in a paralel execution if have before all, every worker that exists will run before all (you do not need that, you need it only once). So just put the code outside of it.
Choose a regular for loop for execution and add i (iterator) that will make your test unique. If this does not help you please write what kind of error you face.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cicd
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page