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
| #!/bin/bash | |
| # { | |
| # "repositories": [ | |
| # { | |
| # "url": "https://xxx.git", | |
| # "baseBranch": "origin/release/1.x", | |
| # "targetBranch": "origin/daily" | |
| # }, | |
| # { |
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
| import * as fs from 'fs'; | |
| import * as queryString from 'query-string'; | |
| import * as request from 'request'; | |
| import config from '../config/index'; | |
| /**************************************************/ | |
| // Interface Declaration | |
| /**************************************************/ | |
| export interface ISendEmailDetails { | |
| to: string[]; // List of emailId's |
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('linux') { | |
| properties([[$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], | |
| parameters( | |
| [ | |
| string(defaultValue: "", description: 'To', name: 'to'), | |
| string(defaultValue: "", description: 'Cc', name: 'cc'), | |
| string(defaultValue: "", description: 'Subject', name: 'subject'), | |
| string(defaultValue: "", description: 'Body', name: 'body'), | |
| string(defaultValue: "", description: 'From', name: 'from'), | |
| ] |
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
| curl --silent --basic http://<username>:<password>@<jenkins-url>/me/configure | hxselect '#apiToken' | sed 's/.*value="\([^"]*\)".*/\1\n/g' |
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
| curl -X POST JENKINS_URL/job/JOB_NAME/build \ | |
| --user <USER:TOKEN> \ | |
| --data-urlencode json='{"parameter": [{"name":"id", "value":"123"}]}' |
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
| curl -X POST JENKINS_URL/job/JOB_NAME/build \ | |
| --user <USER:PASSWORD> \ | |
| --data-urlencode json='{"parameter": [{"name":"id", "value":"123"}]}' |
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
| import * as request from 'request'; | |
| import * as fs from 'fs'; | |
| import * as cheerio from 'cheerio'; | |
| /** | |
| * Retrieve the Jenkins Api Token. | |
| */ | |
| async function getJenkinsApiToken(): Promise<string> { | |
| return new Promise<string>((resolve, reject) => { | |
| request( |
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
| cat > ./src/db/migrations/$(date +"%Y%m%d%H%M%S")-$1.ts << EOF | |
| import { QueryInterface, SequelizeStatic } from 'sequelize'; | |
| module.exports = { | |
| // tslint:disable-next-line:variable-name | |
| up: async (queryInterface: QueryInterface, Sequelize: SequelizeStatic) => { | |
| // Write migration code here. | |
| }, | |
| // tslint:disable-next-line:variable-name |
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
| const path = require('path'); | |
| module.exports = { | |
| config: path.resolve('src', 'db', 'config.js'), | |
| 'models-path': path.resolve('src', 'db', 'models'), | |
| 'seeders-path': path.resolve('src', 'db', 'seeders'), | |
| 'migrations-path': path.resolve('build-migrations', 'db', 'migrations'), | |
| }; |
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
| const fs = require('fs'); | |
| module.exports = { | |
| development: { | |
| url: 'postgres://postgres@localhost:5432/devopsjourney', | |
| dialect: 'postgres', | |
| operatorsAliases: false, | |
| }, | |
| production: { | |
| url: process.env.DB_URL, |
NewerOlder