Skip to content

Commit

Permalink
Provide YAML spec for preview releases for Promitor (#434)
Browse files Browse the repository at this point in the history
* Add basic release build for previews

* Cleanup
  • Loading branch information
tomkerkhove authored Mar 25, 2019
1 parent e77e1d6 commit 2beba3b
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .azure-devops/agents-scraper-release-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: $(Image.Version)
resources:
- repo: self
trigger: none
pr: none
pool:
name: Hosted Ubuntu 1604
variables:
DotNet.SDK.Version: '2.2.105'
Image.Name: 'tomkerkhove/promitor-agent-scraper'
Image.TaggedName: '$(Image.Name):$(Image.Version)'
Release.TagName: '$(Build.BuildNumber)'
# Release.Title is configured in the build definition as settable at queue time
# Image.Version is configured in the build definition as settable at queue time
steps:
- task: DotNetCoreInstaller@0
displayName: 'Install .NET SDK'
inputs:
version: '$(DotNet.SDK.Version)'

- task: DotNetCoreCLI@2
displayName: 'Run Unit Tests'
inputs:
command: test
projects: src/Promitor.Scraper.Tests.Unit/Promitor.Scraper.Tests.Unit.csproj

- task: Docker@1
displayName: 'Build Docker image'
inputs:
dockerFile: ./src/Promitor.Scraper.Host/Dockerfile
imageName: '$(Image.TaggedName)'
includeLatestTag: true
useDefaultContext: false
buildContext: ./src/

- task: GitHubRelease@0
displayName: 'Create GitHub Release'
inputs:
gitHubConnection: 'Tom Kerkhove (GitHub - OAuth)'
repositoryName: tomkerkhove/promitor
action: Create
tagSource: manual
tag: '$(Release.TagName)'
title: '$(Release.Title)'
releaseNotesSource: input
isDraft: true
isPreRelease: true
releaseNotes: |
### Getting started
Running Promitor Scraper Agent is super easy:
```
docker run -d -p 8999:80 --name promitor-agent-scraper
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper:$(Image.Version)
```
### Docker Image information
New Docker image tag is available: `$(Image.Version)` on [Docker Hub](https://hub.docker.com/r/tomkerkhove/promitor-agent-scraper).<br/>
For more information about our tagging strategy, feel free to read our [documentation](https://promitor.io/deployment/#image-tagging-strategy).
- task: Docker@1
displayName: 'Push preview to Docker Hub'
inputs:
containerregistrytype: 'Container Registry'
dockerRegistryEndpoint: 'Docker Hub'
command: 'Push an image'
imageName: '$(Image.TaggedName)'

0 comments on commit 2beba3b

Please sign in to comment.