IMPORTANT
I don't recommend using `colima`_ on macOS. Proceed either with `Docker Desktop`_ or `Podman Desktop`_.
IMPORTANT
I don't recommend using `colima`_ on macOS. Proceed either with `Docker Desktop`_ or `Podman Desktop`_.
| import jenkins.model.Jenkins | |
| import com.cloudbees.hudson.plugins.folder.Folder | |
| import hudson.triggers.TimerTrigger | |
| def listAllJobs(folder, indent = "") { | |
| folder.getItems().each { item -> | |
| if (item instanceof Folder) { | |
| // Print folder name and recurse into subfolder | |
| println "${indent}Folder: ${item.fullName}" | |
| listAllJobs(item, indent + " ") | |
| } else { |
| 2024-03-25,10:53:31 | |
| 2024-03-25,10:53:32 |
| cd $JENKINS_HOME | |
| mkdir -p init.groovy.d/ | |
| #see https://www.jenkins.io/doc/book/managing/groovy-hook-scripts/ | |
| #open file with vi | |
| vi init.groovy.d//init.groovy | |
| #add the follwing and save | |
| #init.groovy |
| import com.cloudbees.plugins.credentials.CredentialsProvider | |
| import com.cloudbees.plugins.credentials.Credentials | |
| import com.cloudbees.plugins.credentials.domains.Domain | |
| import jenkins.model.Jenkins | |
| def indent = { String text, int indentationCount -> | |
| def replacement = "\t" * indentationCount | |
| text.replaceAll("(?m)^", replacement) | |
| } | |
| Jenkins.get().allItems().collectMany{ CredentialsProvider.lookupStores(it).toList()}.unique().forEach { store -> |
| import com.cloudbees.plugins.credentials.CredentialsProvider | |
| import com.cloudbees.plugins.credentials.Credentials | |
| import com.cloudbees.plugins.credentials.domains.Domain | |
| import jenkins.model.Jenkins | |
| def indent = { String text, int indentationCount -> | |
| def replacement = "\t" * indentationCount | |
| text.replaceAll("(?m)^", replacement) | |
| } | |
| Jenkins.get().allItems().collectMany{ CredentialsProvider.lookupStores(it).toList()}.unique().forEach { store -> |
| #create the cluster | |
| jx create cluster eks -n $CLUSTER_NAME \ | |
| --default-admin-password admin123! | |
| These include # | |
| -> Jenkins as CI/CD pipeline solution | |
| -> Nexus - an artifact repository | |
| -> Chartmuseum - a Helm Chart repository | |
| -> Monocular which provides a Web UI for searching and discovering charts deployed into your cluster via Jenkins X. |
| see https://jfrog.com/knowledge-base/how-to-configure-artifactory-as-an-internal-jenkins-update-site/ | |
| * Create a remote repo named Jenkins-update | |
| * Create a local repo named jenkins-update-center | |
| * Get the update-center.json from repo Jenkins-update to local and modify the URL from 'http://updates.jenkins-ci.org/' to my own URL 'https://artifacts.xxx.com/artifactory/Jenkins-update/' in update-center.json, then put update-center.json into local repo. | |
| ``` | |
| #!/bin/sh | |
| curl -L -o /tmp/update-center.json http://localhost:8081/artifactory/Jenkins-update-cache/update-center.json | |
| sed -i 's#http://updates.jenkins-ci.org/#https://artifacts.xxx.com/artifactory/Jenkins-update/#g' /tmp/update-center.json |
| ###################### | |
| # Create The Cluster # | |
| ###################### | |
| az login | |
| az provider register -n Microsoft.Network | |
| az provider register -n Microsoft.Storage |
| #!groovy | |
| /** | |
| API Base URL - by default it’s https://bitbucket.org/api | |
| API Version - 1.0 or 2.0 | |
| API Endpoint Path - includes the following | |
| “repositories” - since we want to use one of the repositories API | |
| Organization Name - aka team or account name | |
| Repository Name - repository slug | |
| Repositories API Endpoint - branches since we want to get list of branches | |
| */ |