-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add auto-layer-releases flow to deploy flow #1274
base: main
Are you sure you want to change the base?
Conversation
Move auto-layer-releases flow from lambda to GHA.
🦙 MegaLinter status: ❌ ERROR
See detailed report in MegaLinter reports |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1274 +/- ##
==========================================
- Coverage 79.55% 79.36% -0.19%
==========================================
Files 201 201
Lines 22173 22173
Branches 3519 3519
==========================================
- Hits 17639 17597 -42
- Misses 3379 3431 +52
+ Partials 1155 1145 -10 ☔ View full report in Codecov by Sentry. |
.github/scripts/releases.py
Outdated
@@ -0,0 +1,70 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#!/bin/bash | |
#!/usr/bin/env python3 |
.github/scripts/releases.py
Outdated
# How to use this script: | ||
# Set the following env vars: | ||
# * GH_RELEASE_TOKEN | ||
# * LAMBDA_RUNTIME (optional) | ||
# * INITCONTAINER_RUNTIME (optional) | ||
# * AGENT_VERSION | ||
# * DRY_RUN (optional) set to 1 to run the flow without creating the release tag. | ||
# | ||
# Lambda runtime options: | ||
# nodejs | ||
# python | ||
# ruby | ||
# dotnet | ||
# | ||
# Initcontainer runtime options: | ||
# nodejs | ||
# python | ||
# ruby | ||
# java | ||
# dotnet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you make those a constant, so we don't have to set those as env vars? Presumably each repo will have a separate copy of this script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well...I was still thinking of making it shared at this point (even though I realize I haven't done that in this PR). I guess TBD on that.
.github/scripts/releases.py
Outdated
tag_name = f"{latest_version}.0_{runtime}" | ||
release_name = f"New Relic {runtime} Agent {latest_version}.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This originally had logic to have release names and release tags as different strings. For Python the only difference was capitalization, but for Node and .NET it was Node -> nodejs
, and .NET -> dotnet
.
Why not make constants for TAG_SUFFIX="python"
and RUNTIME_NAME="Python"
. Then maybe use bool constants to toggle on/off the lambda and initcontainer releases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oooh you're totally right! I was trying to simplify those out but they were used for the release name-I'll put those back I guess. Instead of a boolean I was thinking each team could just set the value of those and that way the work flow could be shared across all teams-I need to look into that more though to see if we can do that.
As a general thought, is there a reason not to convert this to bash scripting and use the |
I was actually thinking about this after I pushed this up as a Python script. Since we seem to both have had that thought, I'll just go ahead and do that. I agree-it would be easier to maintain that way for each team in the long run. |
ad59deb
to
30b2816
Compare
Overview
Move auto-layer-releases flow from lambda to GHA.