Skip to content

Commit

Permalink
feat: Provide option to create GitHub release for Scraper agent (#1452)
Browse files Browse the repository at this point in the history
* Provide option to create GitHub release for Scraper agent

Signed-off-by: Tom Kerkhove <[email protected]>

* Fix indention

Signed-off-by: Tom Kerkhove <[email protected]>
  • Loading branch information
tomkerkhove authored Jan 6, 2021
1 parent ccd9534 commit db4815c
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ stages:
- ${{ if eq(parameters['releaseType'], 'Full') }}:
- template: templates/docker/push-image.yml
parameters:
imageDisplayName: '''{major}.{minor}'''
imageName: '$(Image.ResourceDiscovery.Name):$(Image.MajorMinorVersion)'
imageDisplayName: '''{major}.{minor}'''
imageName: '$(Image.ResourceDiscovery.Name):$(Image.MajorMinorVersion)'
- template: templates/docker/push-image.yml
parameters:
imageDisplayName: '''{major}.{minor}-$(OS.Name)'''
imageName: '$(Image.ResourceDiscovery.Name):$(Image.MajorMinorVersion)-$(OS.Name)'
imageDisplayName: '''{major}.{minor}-$(OS.Name)'''
imageName: '$(Image.ResourceDiscovery.Name):$(Image.MajorMinorVersion)-$(OS.Name)'
- template: templates/docker/push-image.yml
parameters:
imageDisplayName: '''latest'''
Expand Down
199 changes: 102 additions & 97 deletions build/azure-devops/agents-scraper-release-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ parameters:
displayName: GitHub Release Title
type: string
default: Promitor Scraper v$(Image.Version)
- name: createGithubRelease
displayName: Create GitHub Release
type: boolean
default: true

variables:
- template: ./variables/tests.yml
Expand Down Expand Up @@ -155,12 +159,12 @@ stages:
- ${{ if eq(parameters['releaseType'], 'Full') }}:
- template: templates/docker/push-image.yml
parameters:
imageDisplayName: '''{major}.{minor}'''
imageName: '$(Image.Name):$(Image.MajorMinorVersion)'
imageDisplayName: '''{major}.{minor}'''
imageName: '$(Image.Name):$(Image.MajorMinorVersion)'
- template: templates/docker/push-image.yml
parameters:
imageDisplayName: '''{major}.{minor}-$(OS.Name)'''
imageName: '$(Image.Name):$(Image.MajorMinorVersion)-$(OS.Name)'
imageDisplayName: '''{major}.{minor}-$(OS.Name)'''
imageName: '$(Image.Name):$(Image.MajorMinorVersion)-$(OS.Name)'
- template: templates/docker/push-image.yml
parameters:
imageDisplayName: '''latest'''
Expand Down Expand Up @@ -248,98 +252,99 @@ stages:
parameters:
imageDisplayName: '''latest-$(OS.Name)'''
imageName: '$(Image.Name):latest-$(OS.Name)'
- stage: ReleaseGitHub
displayName: Release on GitHub
dependsOn: Build
jobs:
- job: CreateRelease
displayName: Create Release
pool:
vmImage: ubuntu-16.04
steps:
- download: current
artifact: variables
- template: templates/utils/read-variable-on-linux.yml
parameters:
variableName: 'Image.MajorMinorVersion'
- ${{ if eq(parameters['releaseType'], 'Preview') }}:
- task: GitHubRelease@0
displayName: 'Create GitHub Pre-Release'
inputs:
gitHubConnection: 'Tom Kerkhove (GitHub - OAuth)'
repositoryName: tomkerkhove/promitor
action: Create
tagSource: manual
tag: '$(Release.TagName)'
title: '$(Release.Title)'
releaseNotesSource: input
isPreRelease: true
changeLogType: issueBased
changeLogCompareToRelease: 'lastFullRelease'
isDraft: true
releaseNotes: |
### What's new?
Here are some important things you should know, for a full list see [changelog.promitor.io](https://changelog.promitor.io/).
#### Deprecations
Here are a list of new deprecations and how to mitigate them:
- TBW _(Discussion [#]())_
#### Breaking Changes
Here are a list of breaking changes and how to mitigate them:
- TBW (#) - _Use new approach documented here_
### Getting started
Running Promitor Scraper is super easy:
```
docker run -d -p 8999:80 --name promitor-agent-scraper
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env-file C:/Promitor/az-mon-auth.creds \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
ghcr.io/tomkerkhove/promitor-agent-scraper:$(Image.Version)
```
### Docker Image information
New Docker image tags are available:
- `$(Image.Version)`, `$(Image.Version)-linux`, `$(Image.Version)-windows`
- `$(Image.MajorMinorVersion)`, `$(Image.MajorMinorVersion)-linux`, `$(Image.MajorMinorVersion)-windows`
- ${{ if eq(parameters['createGitHubRelease'], true) }}:
- stage: ReleaseGitHub
displayName: Release on GitHub
dependsOn: Build
jobs:
- job: CreateRelease
displayName: Create Release
pool:
vmImage: ubuntu-16.04
steps:
- download: current
artifact: variables
- template: templates/utils/read-variable-on-linux.yml
parameters:
variableName: 'Image.MajorMinorVersion'
- ${{ if eq(parameters['releaseType'], 'Preview') }}:
- task: GitHubRelease@0
displayName: 'Create GitHub Pre-Release'
inputs:
gitHubConnection: 'Tom Kerkhove (GitHub - OAuth)'
repositoryName: tomkerkhove/promitor
action: Create
tagSource: manual
tag: '$(Release.TagName)'
title: '$(Release.Title)'
releaseNotesSource: input
isPreRelease: true
changeLogType: issueBased
changeLogCompareToRelease: 'lastFullRelease'
isDraft: true
releaseNotes: |
### What's new?
Here are some important things you should know, for a full list see [changelog.promitor.io](https://changelog.promitor.io/).
#### Deprecations
Here are a list of new deprecations and how to mitigate them:
- TBW _(Discussion [#]())_
#### Breaking Changes
Here are a list of breaking changes and how to mitigate them:
- TBW (#) - _Use new approach documented here_
### Getting started
Running Promitor Scraper is super easy:
```
docker run -d -p 8999:80 --name promitor-agent-scraper
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env-file C:/Promitor/az-mon-auth.creds \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
ghcr.io/tomkerkhove/promitor-agent-scraper:$(Image.Version)
```
### Docker Image information
New Docker image tags are available:
- `$(Image.Version)`, `$(Image.Version)-linux`, `$(Image.Version)-windows`
- `$(Image.MajorMinorVersion)`, `$(Image.MajorMinorVersion)-linux`, `$(Image.MajorMinorVersion)-windows`
Docker image is available 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).
- ${{ if eq(parameters['releaseType'], 'Full') }}:
- task: GitHubRelease@0
displayName: 'Create GitHub Pre-Release'
inputs:
gitHubConnection: 'Tom Kerkhove (GitHub - OAuth)'
repositoryName: tomkerkhove/promitor
action: Create
tagSource: manual
tag: '$(Release.TagName)'
title: '$(Release.Title)'
releaseNotesSource: input
changeLogType: issueBased
changeLogCompareToRelease: 'lastFullRelease'
isPreRelease: false
isDraft: true
releaseNotes: |
### What's new?
Here are some important things you should know, for a full list see [changelog.promitor.io](https://changelog.promitor.io/).
#### Deprecations
Here are a list of new deprecations and how to mitigate them:
- TBW _(Discussion [#]())_
#### Breaking Changes
Here are a list of breaking changes and how to mitigate them:
- TBW (#) - _Use new approach documented here_
### Getting started
Running Promitor Scraper is super easy:
```
docker run -d -p 8999:80 --name promitor-agent-scraper
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env-file C:/Promitor/az-mon-auth.creds \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
ghcr.io/tomkerkhove/promitor-agent-scraper:$(Image.Version)
```
### Docker Image information
New Docker image tags are available:
- `latest`, `latest-linux`, `latest-windows`
- `$(Image.Version)`, `$(Image.Version)-linux`, `$(Image.Version)-windows`
- `$(Image.MajorMinorVersion)`, `$(Image.MajorMinorVersion)-linux`, `$(Image.MajorMinorVersion)-windows`
Docker image is available 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).
- ${{ if eq(parameters['releaseType'], 'Full') }}:
- task: GitHubRelease@0
displayName: 'Create GitHub Pre-Release'
inputs:
gitHubConnection: 'Tom Kerkhove (GitHub - OAuth)'
repositoryName: tomkerkhove/promitor
action: Create
tagSource: manual
tag: '$(Release.TagName)'
title: '$(Release.Title)'
releaseNotesSource: input
changeLogType: issueBased
changeLogCompareToRelease: 'lastFullRelease'
isPreRelease: false
isDraft: true
releaseNotes: |
### What's new?
Here are some important things you should know, for a full list see [changelog.promitor.io](https://changelog.promitor.io/).
#### Deprecations
Here are a list of new deprecations and how to mitigate them:
- TBW _(Discussion [#]())_
#### Breaking Changes
Here are a list of breaking changes and how to mitigate them:
- TBW (#) - _Use new approach documented here_
### Getting started
Running Promitor Scraper is super easy:
```
docker run -d -p 8999:80 --name promitor-agent-scraper
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env-file C:/Promitor/az-mon-auth.creds \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
ghcr.io/tomkerkhove/promitor-agent-scraper:$(Image.Version)
```
### Docker Image information
New Docker image tags are available:
- `latest`, `latest-linux`, `latest-windows`
- `$(Image.Version)`, `$(Image.Version)-linux`, `$(Image.Version)-windows`
- `$(Image.MajorMinorVersion)`, `$(Image.MajorMinorVersion)-linux`, `$(Image.MajorMinorVersion)-windows`
Docker image is available 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).
Docker image is available 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).

0 comments on commit db4815c

Please sign in to comment.