From 2217fb5977f420e68a0fb06698763deef7f6fba7 Mon Sep 17 00:00:00 2001 From: dariodevops Date: Fri, 18 Oct 2019 12:11:52 -0300 Subject: [PATCH 1/3] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000..049270d16 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,29 @@ +# Docker +# Build a Docker image +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: 'ubuntu-latest' + steps: + - task: Docker@2 + displayName: Build an image + inputs: + command: build + dockerfile: '**/Dockerfile' + tags: | + $(tag) \ No newline at end of file From 593aa69e608a6ef4a58de58bdee50f32e5e99326 Mon Sep 17 00:00:00 2001 From: dariodevops Date: Fri, 18 Oct 2019 12:30:13 -0300 Subject: [PATCH 2/3] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 000000000..ca08a07fa --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,39 @@ +# Docker +# Build and push an image to Azure Container Registry +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: '67c14172-db2b-4793-ae73-6daf135ccdbb' + imageRepository: 'dariodevopspipelinesjavascriptdocker' + containerRegistry: 'labacrdocker.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/app/Dockerfile' + tag: '$(Build.BuildId)' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag) From dd2252ffdebdad091fef30d106f408c205fd8cf1 Mon Sep 17 00:00:00 2001 From: dariodevops Date: Fri, 18 Oct 2019 12:45:33 -0300 Subject: [PATCH 3/3] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-2.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 azure-pipelines-2.yml diff --git a/azure-pipelines-2.yml b/azure-pipelines-2.yml new file mode 100644 index 000000000..5b67072ce --- /dev/null +++ b/azure-pipelines-2.yml @@ -0,0 +1,39 @@ +# Docker +# Build and push an image to Azure Container Registry +# https://docs.microsoft.com/azure/devops/pipelines/languages/docker + +trigger: +- master + +resources: +- repo: self + +variables: + # Container registry service connection established during pipeline creation + dockerRegistryServiceConnection: '70811235-58c0-41f6-a10c-7caa75d53578' + imageRepository: 'dariodevopspipelinesjavascriptdocker' + containerRegistry: 'labacrdocker.azurecr.io' + dockerfilePath: '$(Build.SourcesDirectory)/app/Dockerfile' + tag: '$(Build.BuildId)' + + # Agent VM image name + vmImageName: 'ubuntu-latest' + +stages: +- stage: Build + displayName: Build and push stage + jobs: + - job: Build + displayName: Build + pool: + vmImage: $(vmImageName) + steps: + - task: Docker@2 + displayName: Build and push an image to container registry + inputs: + command: buildAndPush + repository: $(imageRepository) + dockerfile: $(dockerfilePath) + containerRegistry: $(dockerRegistryServiceConnection) + tags: | + $(tag)