Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dash0] deploy new releases automatically #6

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/actions/deploy-demo/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2024 Dash0 Inc.
# SPDX-License-Identifier: Apache-2.0
name: Deploy Dash0 OTel Demo
description: deploy a release of the Dash0 fork of the OpenTelemetry demo
inputs:
token:
description: 'read/write Github access token for thr dash0-configuration repository'
required: true
containerImageVersion:
description: 'version tag of the Dash0 OTel Demo container images, e.g. 1.1.0'
required: true
runs:
using: "composite"
steps:
- name: checkout dash0-configuration
uses: actions/checkout@v4
with:
repository: dash0hq/dash0-configuration
token: ${{ inputs.token }}
path: dash0-configuration

- name: update container image version
uses: mikefarah/[email protected]
with:
cmd: yq -i '.otelDemo.helm.default.image.tag="${{ inputs.containerImageVersion }}"' dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml
- name: git push dash0-configuration
shell: bash
run: |
cd dash0-configuration
git add demo/environments/aws/demo-eu-west-1-demo.yaml
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "chore(otel-demo): update otel-demo image version to ${{ inputs.containerImageVersion }}"
git push
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
name: "Publish Images"
name: "Publish Images & Deploy"

on:
release:
Expand All @@ -13,3 +13,17 @@ jobs:
push: true
version: ${{ github.event.release.tag_name }}
secrets: inherit

deploy_release:
name: deploy to https://otel-demo.eu-west-1.aws.dash0-demo.com/
needs:
- build_and_push_images
runs-on: ubuntu-latest
# do not run multiple deployment jobs concurrently
concurrency: deploy
steps:
- name: deploy release
uses: .github/actions/deploy-demo
with:
token: ${{ secrets.REPOSITORY_FULL_ACCESS_GITHUB_TOKEN }}
containerImageVersion: ${{ github.event.release.tag_name }}
3 changes: 2 additions & 1 deletion .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
"src/productcatalogservice/genproto/",
"internal/tools/"
"internal/tools/",
".github/actions/deploy-demo/action.yaml"
]
}