stage 'promotion'
def userInput = input(
id: 'userInput', message: 'Let\'s promote?', parameters: [
[$class: 'TextParameterDefinition', defaultValue: 'uat', description: 'Environment', name: 'env'],
[$class: 'TextParameterDefinition', defaultValue: 'uat1', description: 'Target', name: 'target']
])
echo ("Env: "+userInput['env'])
echo ("Target: "+userInput['target'])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Questions are not from any actual exam!!! | |
| Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl | |
| and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] | |
| Once the job has completed, check the logs to and export the result to pi-result.txt. | |
| Solution: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| node_version:=$(shell node -v) | |
| npm_version:=$(shell npm -v) | |
| timeStamp:=$(shell date +%Y%m%d%H%M%S) | |
| .PHONY: install build archive test clean | |
| show: | |
| @ echo Timestamp: "$(timeStamp)" | |
| @ echo Node Version: $(node_version) |
** Make sure jenkin is in docker group **
sudo sudo usermod -aG docker $USER
sudo usermod -aG docker jenkins
** Update the docker.service **
Edit the following file : vi /usr/lib/systemd/system/docker.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2.0' | |
| services: | |
| postresql_db: | |
| build: | |
| context: ./ansible/dev/docker/postgresql/ | |
| volumes: | |
| - ./ansible/dev/docker/postgresql/db:/var/lib/postgresql/data | |
| ports: | |
| - 5432:5432 | |
| environment: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - hosts: localhost | |
| connection: local | |
| become: true | |
| gather_facts: true | |
| vars_files: | |
| - settings.yaml | |
| vars: | |
| proj_name: "devopscicd" | |
| nginx_host: "devopscicd.xyz.com" |