-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating yml file for ctl image build ci (#12926)
* creating yml file for ctl image build ci * Update ctl-image-build.yml Co-authored-by: James Suplizio <[email protected]>
- Loading branch information
1 parent
2f4f39f
commit 2c6eb8a
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
jobs: | ||
- job: Cosmos CTL | ||
timeoutInMinutes: 20 | ||
variables: | ||
- template: /eng/pipelines/templates/variables/globals.yml | ||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
|
||
# java-cosmos-container-registry-pwd | ||
variables: | ||
ContainerRegistryName: 'javactl' | ||
ContainerRegistryUserName: 'javactl' | ||
ContainerRegistryUrl: 'javactl.azurecr.io' | ||
|
||
steps: | ||
- task: Maven@3 | ||
displayName: 'Build Cosmos and Benchmark' | ||
inputs: | ||
mavenPomFile: pom.xml | ||
jdkVersionOption: $(JavaBuildVersion) | ||
jdkArchitectureOption: 'x64' | ||
# The -Ppackage-assembly profile packages up both libraries into one package | ||
options: '$(DefaultOptions) -Ppackage-assembly -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Drevapi.skip=true -pl com.azure:azure-cosmos,com.azure:azure-cosmos-benchmark' | ||
|
||
- task: CopyFiles@2 | ||
displayName: 'Copy benchmark jar' | ||
inputs: | ||
SourceFolder: '$(build.sourcesdirectory)/sdk/cosmos/azure-cosmos-benchmark/target' | ||
Contents: '*' | ||
TargetFolder: $(Agent.TempDirectory)/ctl | ||
|
||
- task: CopyFiles@2 | ||
displayName: 'Copy docker config files' | ||
inputs: | ||
SourceFolder: '$(build.sourcesdirectory)/sdk/cosmos/azure-cosmos-benchmark/ctl' | ||
TargetFolder: $(Agent.TempDirectory)/ctl | ||
|
||
# Below will build the image and push it to azure container registry | ||
- pwsh: | | ||
cd $(Agent.TempDirectory)/ctl | ||
docker build . -t java-ctl | ||
az acr login --name $(ContainerRegistryName) -u $(ContainerRegistryUserName) -p $(java-cosmos-container-registry-pwd) | ||
docker tag java-ctl $(ContainerRegistryUrl)/javactl/benchmark | ||
docker push $(ContainerRegistryUrl)/javactl/benchmark | ||
displayName: 'Build and push docker image to registry' |