-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docker ci * docker ci * docker ci * docker ci
- Loading branch information
1 parent
7d92b7b
commit 6e2620f
Showing
2 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
tools/sdk-generation-pipeline/build-publish-docker-image.yml
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,69 @@ | ||
trigger: none | ||
|
||
pr: none | ||
|
||
parameters: | ||
- name: dockerImage | ||
displayName: Docker Image | ||
type: string | ||
default: sdkgeneration.azurecr.io/sdk-generation:beta-1.0 | ||
- name: dockerContainerRegistry | ||
displayName: Docker Container Registry | ||
type: string | ||
default: sdkgeneration.azurecr.io | ||
|
||
variables: | ||
- template: ../../eng/pipelines/templates/variables/globals.yml | ||
- name: NodeVersion | ||
value: '16.x' | ||
- name: VAR_ARTIFACT_NAME | ||
value: 'packages' | ||
- name: VAR_DOCKER_IMAGE_ARTIFACT_NAME | ||
value: 'dockerImages' | ||
- name: VAR_BUILD_ARTIFACT_STAGING_DIRECTORY | ||
value: $(Build.ArtifactStagingDirectory) | ||
|
||
pool: | ||
name: "azsdk-pool-mms-ubuntu-2004-general" | ||
vmImage: "MMSUbuntu20.04" | ||
|
||
stages: | ||
- stage: Build | ||
jobs: | ||
- job: Build | ||
steps: | ||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: '$(NodeVersion)' | ||
displayName: 'Install Node.js' | ||
|
||
- bash: | | ||
npm install -g @microsoft/rush | ||
npm install -g [email protected] | ||
displayName: 'Install dependencies' | ||
- script: | | ||
rush update | ||
displayName: 'rush update' | ||
workingDirectory: $(System.DefaultWorkingDirectory)/tools/sdk-generation-pipeline | ||
- script: | | ||
rush build | ||
displayName: 'rush build' | ||
workingDirectory: $(System.DefaultWorkingDirectory)/tools/sdk-generation-pipeline | ||
- script: | | ||
rushx pack | ||
displayName: 'Pack @azure-tools/sdk-generation-cli' | ||
workingDirectory: $(System.DefaultWorkingDirectory)/tools/sdk-generation-pipeline/packages/sdk-generation-cli | ||
- script: | | ||
docker build -t ${{ parameters.dockerImage }} . | ||
displayName: 'Build docker image' | ||
workingDirectory: $(System.DefaultWorkingDirectory)/tools/sdk-generation-pipeline | ||
- script: | | ||
docker login -u $(DockerUserName) -p $(DockerPassword) ${{ parameters.dockerContainerRegistry }} | ||
docker push ${{ parameters.dockerImage }} | ||
displayName: 'Publish docker image' | ||
workingDirectory: $(System.DefaultWorkingDirectory)/tools/sdk-generation-pipeline |
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