Adding
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
# Starter pipeline
|
||||
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
||||
# Add steps that build, run tests, deploy, and more:
|
||||
# https://aka.ms/yaml
|
||||
|
||||
name: 'LCU.Api.Internal.CoreApiWrapper.$(Build.SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r)'
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- '*'
|
||||
|
||||
pool:
|
||||
name: LCUOnPrem
|
||||
demands:
|
||||
- Agent.Name -equals SLES-Docker
|
||||
|
||||
stages:
|
||||
- stage: Build
|
||||
displayName: Build stage
|
||||
jobs:
|
||||
- job: Build
|
||||
displayName: Build
|
||||
steps:
|
||||
- script: echo Docker Build Starting
|
||||
displayName: 'Docker Build Start'
|
||||
- task: Docker@2
|
||||
inputs:
|
||||
containerRegistry: 'Docker Registry LMCU'
|
||||
repository: 'landmarkcu/core-api-wrapper'
|
||||
command: 'build'
|
||||
Dockerfile: '**/Dockerfile'
|
||||
tags: |
|
||||
$(Build.BuildID)
|
||||
latest
|
||||
arguments: '--build-arg PAT=$(System.AccessToken)'
|
||||
|
||||
- stage: Publish
|
||||
displayName: Publish
|
||||
dependsOn: Build
|
||||
condition: or(eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], 'master'))
|
||||
jobs:
|
||||
- job: Publish
|
||||
displayName: Publish
|
||||
steps:
|
||||
- task: Docker@2
|
||||
inputs:
|
||||
containerRegistry: 'Docker Registry LMCU'
|
||||
repository: 'landmarkcu/core-api-wrapper'
|
||||
command: 'push'
|
||||
tags: |
|
||||
$(Build.BuildID)
|
||||
latest
|
||||
displayName: 'Publish Docker Image'
|
||||
|
||||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: 'sed -i ''s/{{version}}/$(Build.BuildID)/g'' _deploy/base/Deployment.yaml'
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: './_deploy'
|
||||
artifact: 'overlay'
|
||||
publishLocation: 'pipeline'
|
||||
displayName: 'Publish Overlay Artifact'
|
||||
Reference in New Issue
Block a user