devopsstartkit
v1.0.1
Published
A repository which contains the different files and documentation which is need to set up a CI/CD environment
Readme
DevOpsStartkit
A repository which contains the different files and documentation which is need to set up a CI/CD environment
Known and common issues
- SSH Token via URA is blocked -> Use PAT Authentication
- You can't install/update Jenkins Plugins when connected to URA
- If your VMs are crashing on a regular basis. Try to move your VM files from OneDrive to a local folder. If the file is read in the same moment, OneDrive tries to sync them to the VM crashes
- Windows is an issue in itself. Just use Linux. That way, you make life easier for yourself and everyone else
Installation
Jenkins
Short guide on how to get Jenkins running on Linux and Windows
Forward traffic
If you have problems connecting Docker Jenkins through to the Docker Host, try this
Pros and Cons of installations
Getting started with Jenkins
Basic pipelines
This is a pipeline example to test if the pipelines are working properly (GitHub must already be connected with Jenkins see "Create credentials for GitHub")
Jenkins Dashboard -> New Item -> Give a name -> Select "Pipeline" -> Click "OK"
Give a description
Build Triggers -> Poll SCM -> Give a schedule
pipeline { agent any triggers { pollSCM '* * * * *' } stages { stage('Test') { steps { echo 'Hello World!' } } } }Select under Pipeline -> Definition -> Pipeline script from SCM
SCM -> Git
Fill in your Repository URL, Credentials, specify the Branch and Script Path (jenkinsfile)
Agents
The basic agents to connect Jenkins (master) with another machine (slave)
Jenkins
Authentification and user management methodes
A few examples of how you could manage users. Can be extended by various plugins
Recommended plugins
Recommended plugins that could be helpful
GitHub and other tools
Create credentials for GitHub
How to create credentials for GitHub to connect to Jenkins
- Go to Settings -> Developer settings -> Personal access token
- Generate new Token
- Give a name and the needed rights ("repo")
- Generate Token and save it somewere
- Go to Jenkins -> Manage Jenkins -> Credentials -> (global) -> Add credentials
- Username -> Your GitHub User Password -> Your Token ID -> A fitting name
- Create
3rd party tools
Convenient 3rd party tools
- VSCode
- Git
- Nexus OSS
Usefull sites
- Pipeline Syntax -> https://www.jenkins.io/doc/book/pipeline/syntax/
- Agents -> https://www.jenkins.io/doc/book/using/using-agents/
- User management -> https://www.jenkins.io/doc/book/security/managing-security/
