Skip to content

Commit

Permalink
Merge code generation changes to main (#295)
Browse files Browse the repository at this point in the history
Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
Co-authored-by: Josh Suereth <joshuasuereth@google.com>
Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
  • Loading branch information
5 people authored Mar 15, 2024
1 parent 472bedb commit 157bb4b
Show file tree
Hide file tree
Showing 37 changed files with 1,481 additions and 80 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/semconvgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Semantic Convention Generator
on:
push:
tags: [ '**' ]
branches: [ main ]
branches:
- main
- 'feature/**'
pull_request:
branches: [ main ]
branches:
- main
- 'feature/**'
paths:
- .github/workflows/semconvgen.yml
- 'semantic-conventions/**'
Expand All @@ -13,7 +17,7 @@ jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
run:
working-directory: semantic-conventions/
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,3 +73,13 @@ jobs:
else
tag_and_push "${GITHUB_REF#"refs/tags/"}"
fi
- name: Push the Dev Docker image
if: startsWith(github.ref, 'refs/heads/feature/')
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
function tag_and_push {
docker tag semconvgen "otel/semconvgen:${1}" && docker push "otel/semconvgen:${1}"
}
TAG="${GITHUB_REF#"refs/heads/"}"
TAG="${TAG/"/"/"-"}"
tag_and_push "${TAG}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

# Vim
.swp

# Python
*.whl
12 changes: 12 additions & 0 deletions semantic-conventions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ Please update the changelog as part of any significant pull request.
([#271](https://github.com/open-telemetry/build-tools/pull/271))
- Add link to requirement levels definition from Markdown table title.
([#222](https://github.com/open-telemetry/build-tools/pull/222))
- Added code-generation mode that groups attributes by the root namespace and ability to write each group into individual file.
[BREAKING] The `--file-per-group <pattern>` that used to create multiple directories (like `output/<pattern>/file`) now generates
multiple files (`output/<pattern>file`) instead.
([#243](https://github.com/open-telemetry/build-tools/pull/243))
- Update `semconvgen.yml` workflow to run on feature/* branches.
([#256](https://github.com/open-telemetry/build-tools/pull/256))
- Allow --output to be templatized when generating multiple files.
([#263](https://github.com/open-telemetry/build-tools/pull/263))
- Add `metrics` to the context of non-scoped code generation
([#270](https://github.com/open-telemetry/build-tools/pull/270))
- Add `enum_attributes` to the context, adds `print_member_value` helper
([#266](https://github.com/open-telemetry/build-tools/pull/266))
- Sort attribute tables by requirement level and attribute name
([#260](https://github.com/open-telemetry/build-tools/pull/260))

Expand Down
Loading

0 comments on commit 157bb4b

Please sign in to comment.