Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
| # Only listen on http; disable ajp and https | |
| web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1 |
| # MASTER PRE-REQS | |
| # Install docker, docker-compose | |
| # mkdir -p ~/{jenkins,jnlp_slave} | |
| # master | |
| # docker run -d \ | |
| # -u root \ | |
| # --name=jenkins \ | |
| # -e TZ=America/Denver \ |
| # This is how you add a Jenkins slave | |
| # On master: | |
| sudo -u jenkins -H ssh-keygen | |
| # On slave | |
| adduser --system --group --home=/var/lib/jenkins-slave --no-create-home --disabled-password --quiet --shell /bin/bash jenkins-slave | |
| install -d -o jenkins-slave -g jenkins-slave /var/lib/jenkins-slave |
###Create a project from Maven Template:
To start a new maven project, use the maven archetype plugin from the command line using the archetype:generate goal.
The following command will tell maven to create a java project from maven-archetype-quickstart template, if you ignore the archetypeArtifactId argument, then a list of the templates will be listed for you to choose.
| prerequisities | |
| - access to server: | |
| - credentials | |
| - on server: | |
| 1. powershell >3.0 | |
| 2. be able to get packages from secure storage server. | |
| files: | |
| execute: winrm qc -q |
| [CmdletBinding(DefaultParameterSetName='Version')] | |
| param | |
| ( | |
| [Parameter(ParameterSetName='Latest', Mandatory = $true)] | |
| [Parameter(ParameterSetName='Version', Mandatory = $true)] | |
| [String] | |
| $SaveToPath, | |
| [Parameter(ParameterSetName='Version', Mandatory = $true)] | |
| [String] |
| name: Build and Deploy to Azure Functions | |
| on: | |
| push: | |
| branches: | |
| - master | |
| env: | |
| APPNAME: Daarviweb1 | |
| APPLICATIONPATH: "Application" | |
| RESOURCEGROUPNAME: Daarviweb1-rg |