Tech DevOps
482 subscribers
10 photos
265 links
Download Telegram
Jenkins Pipeline Perforce SCM
Hi guys, I'm a complete noob at build automation and Jenkins, having started my first job as a full time build engineer about a month ago now..
Our current set-up works with a bunch of downstream jobs that trigger each other, I'm not a big fan of this and would like to setup a Jenkins pipeline as a proof of concept.. as I think they're written in groovy ? and possibly allow other languages? as well as the benefit of version control and reusability seems a huge win..
that said, I've been having trouble getting the perforce SCM to work.. I keep getting an error
Mapping '//jenkinsTemp-651dd846-1c45-4d93-965e-541df7327c59' is not under '//jenkinsTemp-651dd846-1c45-4d93-965e-541df7327c59/...'.
when running the job. I don't really understand why it keeps trying to make these jenkinsTemp workspaces? Inside the job I have it set up as (static view, master only) with the workspace name entered as the workspace of our build machine (we only have one node at the moment and thus want to set it up to just use this one's workspace.. no need for generating ones..) .. (Credentials fine too)...
the populate options set to 'preview check only' at the moment. And the scrip path set to
//DepotName/main/Tools/Jenkins/HelloWorldPipeline.groovy
I read the docs on github for the p4 plugin.. And couldn't figure out why it keeps trying to use jenkinsTemp and what it's trying to map exactly..
I know perforce isn't the popular option here, at previous workplaces we used git repo and it seemed a tone easier, but alas. Got a work with what I'm given.
Interesting Task
I wrote this in Markdown, so hopefully this comes through for everyone.
I have an interesting task coming down the pipe, I am wondering what people have done and if you all have suggestions for what the best most sustainable path forward is, that'd be hugely appreciated!
# Objective:
Create a template for customer builds. One that is highly parameterized, easy to add/remove from etc, and my most important requirement is it all be in code. The challenge is that every customer has different values to their variables. More so, sometimes there can be a "parent" customer and child customers and some of the parent values get inherited at the child level unless the child customer has that variable defined.
## Currently:
The way the current workflow goes is three part
1. Customer build (unique)
a. This is basically just a job that holds all of the custom parameters that get passed to the next job(s)
2. Build job (generic)
3. Test job (generic)
When we add new customers we copy a job through the UI and edit the values. If a "parent level" value changes that affects several jobs it is a very laborious process clicking through the jobs and editing.
## Gold Standard
Everything is in code
I would like a way to be able to copy/paste the template, edit the parameters based on the customer requirements and "apply" the changes. "Applying" could be running a script against Jenkins, committing to SCM and kicking off a job in Jenkins to then update itself.
## Current
1. At my previous job the entirety of Jenkins was all in code. We would blow away our entire Jenkins instance and just copy/paste the config back into Jenkins and it would all be back. I believe that also had all of the configurations for the jobs as well. In that case, that could be ideal. If I remember correctly this was all done in Groovy and not using the Configuration as Code (YAML) plugin.
2. I don't quite love Groovy and most of my coworkers work in Python, I was unsure if there was an equivalent to this.
1) A build parameter allows us to pass data into our Jenkins jobs. Using build parameters, we can pass any data we want: git branch name, secret credentials, hostnames and ports, and so on.
2) Any Jenkins job or pipeline can be parameterized. All we have to do is check the box on the General settings tab that says this project is parameterized:
What are the common use cases Jenkins is used for?
Jenkins being open-source automation can be used for any kind of software-based automation. Some of the common use-cases include but not limited to -

Software build jobs
Sanity/Smoke/CI/Regression test jobs
Web/Data Scraping related jobs
Code coverage measurement jobs
General-purpose automation
Reverse Engineering jobs
Key Decoding jobs & many other jobs where software automation will be applicable.
Tell me something about Continuous Integration, Continuous Delivery, and Continuous Deployment?
Continuous Integration: A software development process where the changes made to software are integrated into the main code as and when a patch is ready so that the software will be always ready to be - built, tested, deployed, monitored - continuously.

Continuous Delivery: This is a Software Development Process where the continuously integrated (CI) changes will be tested & deployed continuously into a specific environment, generally through a manual release process, after all the quality checks are successful

Continuous Deployment: A Software Development practice where the continuously integrated (CI) changes are deployed automatically into the target environment after all the quality checks are successful
Kubectl Basic Commands
Kubectl get
$ kubectl get namespaces
$ kubectl get nodes
$ kubectl get pods
$ kubectl get pods --namespace jenkins

Kubectl describe
$ kubectl describe ns jenkins
$ kubectl describe pods jenkins-7fc688c874-mh7gv --namespace jenkins
$ kubectl describe node minikube
πŸ’₯πŸ’₯ TODAY'S TECHNOTES πŸ’₯πŸ’₯
How do you store credentials in Jenkins securely?
Credentials can be stored securely in Jenkins using the Credentials plugin, which stores different types of credentials like - Username with a password, SSH username with the private key, AWS Credentials, Jenkins Build Token, Secret File/Text, X509 & other certificates, Vault related credentials securely with proper encryption & decryption as and when required.
How can we stop a scheduled job from being executed temporarily?
Disable the job from the job details page to temporarily stop all scheduled executions & other factors/events from triggering the job and enable it back to resume the job schedules/triggers. If a job is not required permanently, we can delete the job from the jobs list view page.
Forwarded from Deleted Account
Hi Techies,

Here we have social media links platform for gaining knowledge on *AZURE, GCP CLOUD & LINUX*

There you can get daily basis some technotes, materials and training information

Telegram link: https://t.me/tech_azure

Telegram link : https://t.me/techli_nux

Telegram link: https://t.me/tech_gcp
What are the ways to trigger a Jenkins Job/Pipeline?
There are many ways we can trigger a job in Jenkins. Some of the common ways are as below -

Trigger an API (POST) request to the target job URL with the required data.
Trigger it manually from the Jenkins web application.
Trigger it using Jenkins CLI from the master/slave nodes.
Time-based Scheduled Triggers like a cron job.
Event-based Triggers like SCM Actions (Git Commit, Pull Requests), WebHooks, etc.
Upstream/Downstream triggers by other Jenkins jobs.
Forwarded from Deleted Account
πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›

Hi FriendsπŸ’πŸ’

There you can get daily basis some technotes, materials and training information

*LINUX* Telegram link : https://t.me/techli_nux

*AZURE* Telegram link: https://t.me/tech_azure

*GCP* Telegram link: https://t.me/tech_gcp
Hi FriendsπŸ’πŸ’

Do you Want to learn LINUX ?🀩🀩

πŸ‘‡Here we are doing YouTube Video on LINUX | Linux Basic CommandsπŸ‘‡

https://youtu.be/GafoXUSBAbA

Please WatchπŸ‘¨πŸ»πŸ’» LikeπŸ‘πŸ» ShareπŸ“£ Subscribe πŸ””our channel to get more videosπŸ’―

Regards,
Hi-Tech Institution
+91 7092909192 / 8220217640
Forwarded from Deleted Account
🀩 FREE! FREE! FREE!... 🀩

*REALTIME PROJECT BASED VIDEOS*

*LINUX* : https://t.me/techli_nux

*AZURE* : https://t.me/tech_azure

*GCP* : https://t.me/tech_gcp
What is Jenkins Build Cause?
Build Cause is a text attribute that represents what made a job's build to be triggered, say it could be a Jenkins User (from UI), Timer for Scheduled jobs, Upstream jobs for a job which was triggered by upstream job, etc. This is mainly used to identify the nature of the builds - be it nightly, manual, automated, etc.

How Jenkins knows when to execute a Scheduled job/pipeline and how it is triggered?
Jenkins master will have the cron entries set up for the jobs as per the scheduled Job's configurations. As and when the time for a particular job comes, it commands agents (based on the configuration of the job) to execute the job with required configurations.
πŸ’₯πŸ’₯ Today's Technotes πŸ’₯πŸ’₯

WHAT ARE THE WAYS TO TRIGGER A JENKINS JOB/PIPELINE?
There are many ways we can trigger a job in Jenkins. Some of the common ways are as below -

Trigger an API (POST) request to the target job URL with the required data.
Trigger it manually from the Jenkins web application.
Trigger it using Jenkins CLI from the master/slave nodes.
Time-based Scheduled Triggers like a cron job.
Event-based Triggers like SCM Actions (Git Commit, Pull Requests), WebHooks, etc.
Upstream/Downstream triggers by other Jenkins jobs.
Forwarded from Tech Jenkins
πŸ’₯πŸ’₯ Today's Technotes πŸ’₯πŸ’₯

Hi FriendsπŸ’πŸ’

Do you Want to learn GCP CLOUD?🀩🀩

Here we are doing YouTube Video on GCP Machine Images | Custom VM Images| Machine Images in GCP | Google Cloud in GCP πŸ‘‡

https://youtu.be/oSJj3b8LP1A

Please WatchπŸ‘¨πŸ»πŸ’» LikeπŸ‘πŸ» ShareπŸ“£ Subscribe πŸ””our channel to get more videosπŸ’―

Regards,
Hi-Tech Institution
+91 7092909192 / 8220217640
πŸ’₯πŸ’₯ Today's Technotes πŸ’₯πŸ’₯
Hi FriendsπŸ’πŸ’

Do you Want to learn AWS CLOUD?🀩🀩

Here we are doing YouTube Video on AWS EKS: EKSCTL, Node Group, Kubectl Get Node, Kubectl Create Deployment, Kubernetes POD | EKS Part4πŸ‘‡

https://youtu.be/pe8l-GyClZU

Please WatchπŸ‘¨πŸ»πŸ’» LikeπŸ‘πŸ» ShareπŸ“£ Subscribe πŸ””our channel to get more videosπŸ’―

Regards,
Hi-Tech Institution
+91 7092909192 / 8220217640
Forwarded from Tech Jenkins
πŸ’‘πŸŸ πŸŸ  Today's Technotes πŸŸ πŸŸ πŸ’‘

Do you Want to learn GITLAB ? 🀩🀩

Introduction to GitLab in Tamil | GitLab | DevOps in Tamil | Hi-Institution πŸ‘‡

https://youtu.be/BGe-SqVjoic

Please WatchπŸ‘¨πŸ»πŸ’» LikeπŸ‘πŸ» ShareπŸ“£ Subscribe πŸ””our channel to get more videosπŸ’―

Regards,
Hi-Tech Institution
+91 7092909192 / 8220217640
Forwarded from Tech GCP
Hi FriendsπŸ’πŸ’

_Do you Want to AWS CLOUD?🀩🀩_

Here we are doing YouTube Videos on *AWS Lambda | Automate AWS Infrastructure using Boto3 | Python Boto3 | Lambda automation step by stepπŸ‘‡*

*https://youtu.be/Gu1XoDi8Xi8*


Please WatchπŸ‘¨πŸ»πŸ’» LikeπŸ‘πŸ» ShareπŸ“£ Subscribe πŸ””our channel to get more videosπŸ’―

Regards,
_Hi-Tech Institution_
*+91 7092909192 / 8220217640*