From 56ac566a93a99684e900f6595513a1c813715c76 Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Sat, 5 Sep 2020 22:19:02 +0200 Subject: [PATCH 1/7] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 0000000..03fa44f --- /dev/null +++ b/azure-pipelines-1.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: '$(Build.SourcesDirectory)/Dockerfile' + tags: | + $(tag) \ No newline at end of file From c6a3080818c043e9600f603d129d3ff429e84fc0 Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Sat, 5 Sep 2020 22:25:59 +0200 Subject: [PATCH 2/7] Update azure-pipelines-1.yml for Azure Pipelines --- azure-pipelines-1.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index 03fa44f..971a4ed 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -13,17 +13,16 @@ variables: stages: - stage: Build - displayName: Build image + displayName: Build and Push image jobs: - job: Build - displayName: Build + displayName: Build and Push pool: vmImage: 'ubuntu-latest' steps: - - task: Docker@2 - displayName: Build an image - inputs: - command: build - dockerfile: '$(Build.SourcesDirectory)/Dockerfile' - tags: | - $(tag) \ No newline at end of file + - task: Docker@2 + inputs: + containerRegistry: 'Dockerhub' + repository: 'cits-test' + command: 'buildAndPush' + Dockerfile: '**/Dockerfile' \ No newline at end of file From 62991e624e3786340be596b03b6e9b477c07c43d Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Sun, 6 Sep 2020 12:55:29 +0200 Subject: [PATCH 3/7] Update azure-pipelines-1.yml for Azure Pipelines --- azure-pipelines-1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index 971a4ed..f5d1570 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -23,6 +23,6 @@ stages: - task: Docker@2 inputs: containerRegistry: 'Dockerhub' - repository: 'cits-test' + repository: 'ghoshasish99/cits-test' command: 'buildAndPush' Dockerfile: '**/Dockerfile' \ No newline at end of file From 3f0d94f7fdb7a6ef1d176fd7553dad241e8bf3ce Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Sun, 6 Sep 2020 18:33:39 +0200 Subject: [PATCH 4/7] Update azure-pipelines-1.yml for Azure Pipelines --- azure-pipelines-1.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index f5d1570..b6494f5 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -25,4 +25,16 @@ stages: containerRegistry: 'Dockerhub' repository: 'ghoshasish99/cits-test' command: 'buildAndPush' - Dockerfile: '**/Dockerfile' \ No newline at end of file + Dockerfile: '**/Dockerfile' + - task: Docker@2 + - task: CopyFiles@2 + inputs: + Contents: 'docker-compose.yml' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' + + \ No newline at end of file From a186b335e45debe5f2d8168ceec44bf7007adb28 Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Sun, 6 Sep 2020 18:38:30 +0200 Subject: [PATCH 5/7] Update azure-pipelines-1.yml for Azure Pipelines --- azure-pipelines-1.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index b6494f5..ce42efc 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -26,7 +26,7 @@ stages: repository: 'ghoshasish99/cits-test' command: 'buildAndPush' Dockerfile: '**/Dockerfile' - - task: Docker@2 + - task: CopyFiles@2 inputs: Contents: 'docker-compose.yml' From 71a351d2265f01436705c4f73a60f6383b4be72c Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Mon, 7 Sep 2020 11:07:21 +0200 Subject: [PATCH 6/7] Update azure-pipelines-1.yml for Azure Pipelines --- azure-pipelines-1.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index ce42efc..50399aa 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -20,6 +20,7 @@ stages: pool: vmImage: 'ubuntu-latest' steps: + - task: Docker@2 inputs: containerRegistry: 'Dockerhub' @@ -36,5 +37,8 @@ stages: PathtoPublish: '$(Build.ArtifactStagingDirectory)' ArtifactName: 'drop' publishLocation: 'Container' - + + - task: CmdLine@2 + inputs: + script: 'echo $(Build.BuildId)' \ No newline at end of file From af067528ca8a05ed4e4e470d06935ab5ac707e0b Mon Sep 17 00:00:00 2001 From: Ashish Ghosh <42202446+ghoshasish99@users.noreply.github.com> Date: Mon, 7 Sep 2020 15:04:27 +0200 Subject: [PATCH 7/7] Update azure-pipelines-1.yml for Azure Pipelines --- azure-pipelines-1.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index 50399aa..d556f88 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -38,7 +38,4 @@ stages: ArtifactName: 'drop' publishLocation: 'Container' - - task: CmdLine@2 - inputs: - script: 'echo $(Build.BuildId)' \ No newline at end of file