Skip to content

Instantly share code, notes, and snippets.

View goyalmohit's full-sized avatar

mohit goyal goyalmohit

View GitHub Profile
@goyalmohit
goyalmohit / azure-pipelines-section.yml
Created August 14, 2019 02:55
yaml to download artifacts during release stage
..
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: drop
itemPattern: '**/*.zip'
downloadPath: '$(System.ArtifactsDirectory)'
..
@goyalmohit
goyalmohit / azure-pipelines-section.yml
Created August 14, 2019 02:27
Specifying task to upload artifact to Azure DevOps
..
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/target'
ArtifactName: 'drop'
publishLocation: 'Container'
..
@goyalmohit
goyalmohit / azure-pipelines-section.yml
Created August 14, 2019 02:23
Defining maven task for build stage in azure pipelines
..
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean package'
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
javaHomeOption: 'JDKVersion'
mavenVersionOption: 'Default'
mavenAuthenticateFeed: false
@goyalmohit
goyalmohit / azure-pipelines-section.yml
Created August 14, 2019 02:22
Defining build stage for azure pipelines
- stage: Build
jobs:
- job: Build
pool: 'Hosted Ubuntu 1604'
continueOnError: false
@goyalmohit
goyalmohit / assembly.xml
Created August 14, 2019 02:10
Specify packaging information for liquibase files
..
<fileSets>
<fileSet>
<directory>${project.basedir}/scripts</directory>
<outputDirectory>/scripts/</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<lineEnding>unix</lineEnding>
</fileSet>
@goyalmohit
goyalmohit / pom-section.xml
Created August 14, 2019 02:09
Adding assembly plugin to pom file
<plugins>
..
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<descriptor>src/assembly/assembly.xml</descriptor>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
@goyalmohit
goyalmohit / pom-section.xml
Created August 14, 2019 02:06
Ading liquibase maven plugin to pom file
..
<plugins>
..
<!-- User liquibase plugin -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
@goyalmohit
goyalmohit / pom-section.xml
Created August 14, 2019 02:04
Adding PostgreSQL JDBC driver to dependencies
..
</dependencies>
..
<!-- PostgreSQL -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.5</version>
</dependency>
</dependencies>
@goyalmohit
goyalmohit / pom-section.xml
Created August 14, 2019 02:03
Adding liquibase jar file to dependency in POM file
..
</dependencies>
..
<!-- Liquibase -->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.3.0</version>
</dependency>
</dependencies>
@goyalmohit
goyalmohit / create_table_link.sql
Created August 14, 2019 02:01
Sql file to create a table named link in PostgreSQL using liquibase