You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples/jenkins/ansible-kubernetes/README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,24 @@ First, create a new pipeline via [New Item](http://localhost:8080/view/all/newJo
29
29
30
30
In the configure pipeline view, scroll to the bottom and under Pipeline sub-header select `Pipeline script from SCM`. SCM type should be `Git` and Repository URL the url of this repository: `https://github.com/kangasta/cicd-examples.git`. Ensure that branch specifier includes `main` branch of the repository and modify the Script Path to be `docs/examples/jenkins/ansible-kubernetes/Jenkinsfile`.
31
31
32
+
The pipeline deploys an example application to a Kubernetes cluster using Ansible playbook. The playbook selects a container image tag based on Jenkins build parameter.
After you have created the pipeline, try to execute it by clicking _Build Now_. The pipeline should have deployed the example application into the Kubernetes cluster with the default image tag (`cow`) defined in the [deploy-to-kubernetes.yml](./deploy-to-kubernetes.yml) Ansible playbook.
After the Ansible playbook has been executed, the pipeline runs [wait-until-service-up.sh](./wait-until-service-up.sh) script. The script waits until the load-balancer created by the Kubernetes service has reached running state and parses the URL where the example application is running.
You can find the URL of the created load-balancer from the console output of the build. Open the application with your browser or user curl to see the application response.
35
51
36
52
In addition, after the first execution Jenkins should have updated the project configuration to contain parameters defined in the pipeline and we can configure the image tag in _Build with Parameters_ menu.
Copy file name to clipboardExpand all lines: docs/examples/jenkins/build-status-pipelines/README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,3 +24,43 @@ node {
24
24
```
25
25
26
26
The execution will likely fail with `ERROR: script not yet approved for use` message. To enable this script, navigate to [Manage Jenkins > In-process Script Approval](http://localhost:8080/scriptApproval/), inspect the script, and click _Approve_. Then try to run the created seed project again. It should now succeed and list the created resources.
27
+
28
+
The scripted pipeline listed above executes [jobs.groovy](./jobs.groovy) script. This script creates five new pipelines and executes four of those.
The four different pipeline scripts used to create the jobs are listed below. The final job, `Status/Not built`, uses the same script as `Status/Success`, but the build is not executed.
35
+
36
+
=== "Aborted"
37
+
38
+
Defines a pipeline that has a three minute timeout and build step that takes more than three minutes.
Copy file name to clipboardExpand all lines: docs/examples/jenkins/parallel-robot-pipeline/README.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,41 @@ First, create a new pipeline via _[New Item](http://localhost:8080/view/all/newJ
18
18
19
19
In the configure pipeline view, scroll to the bottom and under Pipeline sub-header select `Pipeline script from SCM`. SCM type should be `Git` and Repository URL the url of this repository: `https://github.com/kangasta/cicd-examples.git`. Ensure that branch specifier includes `main` branch of the repository and modify the Script Path to be `docs/examples/jenkins/parallel-robot-pipeline/Jenkinsfile`.
20
20
21
-
After you have created the pipeline, try to execute it by clicking _Build Now_. All Robot Framework tasks should be in Skipped state as we did not specify URL variable, see `.robot` file for details. In addition, after the first execution Jenkins should have updated the project configuration to contain parameters defined in the pipeline and we can now pass target URL to our automation tasks in Build with Parameters menu.
21
+
The pipeline executes the same Robot Framework suite twice: once with Firefox and once with Chromium. This is done in parallel. After the test suites have finished, the log files are combined in the next stage.
After you have created the pipeline, try to execute it by clicking _Build Now_. All Robot Framework tasks should be in Skipped state as we did not specify an URL variable. In addition, after the first execution Jenkins should have updated the project configuration to contain parameters defined in the pipeline and we can now pass target URL to our automation tasks in _Build with Parameters_ menu.
28
+
29
+
The Robot Framework suite defined in [suites/screenshot.robot](./suites/screenshot.robot) uses Browser library to take a screenshot of the page available in the URL defined with the URL variable.
Finally, If the robot log cannot be loaded after task execution, see [this stackoverflow post](https://stackoverflow.com/questions/36607394/error-opening-robot-framework-log-failed) for solution. To summarize, run following command in Jenkins Script Console to modify Jenkins servers Content Security Policy (CSP):
The Jenkins pipeline listed above uses container image from Github Container Registry to run the pipelines. The container image is created using [Dockerfile](./Dockerfile) defined by this tutorial.
The Dockerfile is based on Playwright image that contains the Browser binaries and other Playwright related dependencies of the Browser library. In addition, the Dockerfile installs Python and Python libraries defined in [requirements.txt](./requirements.txt) to the container image.
0 commit comments