Skip to content

Instantly share code, notes, and snippets.

View goyalmohit's full-sized avatar

mohit goyal goyalmohit

View GitHub Profile
@goyalmohit
goyalmohit / db.changelog.xml
Created August 14, 2019 01:58
ChangeLogFile for Specifying database changes to be executed
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<include file="src/main/resources/issue-8534/create_table_link.sql"/>
@goyalmohit
goyalmohit / liquibase.properties
Created August 14, 2019 01:53
Liquibase configuration file for PostgreSQL database
driver: org.postgresql.Driver
classpath: ./lib/postgresql-42.2.5.jar
url: jdbc:postgresql://localhost:5432/sampledb
username: adminUsername
password: adminUserPassword
changeLogFile: src/main/resources/db.changelog.xml
stages:
- stage: Build_Source_Code # Build Source Code for Dotnet Core Web App
jobs:
- job: Build
pool: 'Hosted VS2017'
variables:
buildConfiguration: 'Release'
continueOnError: false
steps:
- task: DotNetCoreCLI@2
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'Ubuntu-16.04'
continueOnError: true
steps:
- script: echo "hello to my first Build"
- stage: dev_deploy
# Gets the Azure DevOps logs using the REST API
Function Get-AzureDevOpsAuditLogs {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[String] $OrganizationName,
[Parameter(Mandatory=$false)]
# This code parse the audit logs exported from azure devops and saved as file auditlog.json
function Parse-AzureDevOpsAuditLogs {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string] $Path
)
"""
Parse output from az pipelines runs list command into a nice format using python
Below code assumes that output from 'az pipelines runs list' command has been stored
under the az-pipelines-runs-list.json file.
"""
import json, sys
with open("az-pipelines-runs-list.json", "r") as f:
runs = json.load(f)
"""
Parse output from az pipelines list command into a nice format using python
Below code assumes that output from 'az pipelines list' command has been stored
under the az-pipelines-list.json file
"""
import sys, json
with open("working-with-azure-devops-pipelines-at-command-line/az-pipelines-list.json", "r") as f:
pipelines = json.load(f)
Function Get-Sum {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[int] $Number1,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[int] $Number2
Function Get-Sum {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[int] $Number1,
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[int] $Number2