-
Notifications
You must be signed in to change notification settings - Fork 56
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
Update PR and Main Build for patched dependencies jobs #669
Closed
Closed
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,26 @@ | |
# Enable debug mode, fail on any command that fail in this script and fail on unset variables | ||
set -x -e -u | ||
|
||
# This parameter will help find the patches to be applied | ||
BRANCH=$1 | ||
|
||
# .github/patches/$BRANCH/versions.sh should define all the versions of the dependencies that we are going to patch | ||
# .github/patches/versions.sh should define all the versions of the dependencies that we are going to patch | ||
# This is used so that we can properly clone the upstream repositories. | ||
# This file should define the following variables: | ||
# OTEL_JAVA_VERSION. Tag of the opentelemetry-java repository to use. E.g.: JAVA_OTEL_JAVA_VERSION=v1.21.0 | ||
# OTEL_JAVA_INSTRUMENTATION_VERSION. Tag of the opentelemetry-java-instrumentation repository to use, e.g.: OTEL_JAVA_INSTRUMENTATION_VERSION=v1.21.0 | ||
# OTEL_JAVA_CONTRIB_VERSION. Tag of the opentelemetry-java-contrib repository. E.g.: OTEL_JAVA_CONTRIB_VERSION=v1.21.0 | ||
# This script will fail if a variable that is supposed to exist is referenced. | ||
|
||
if [[ ! -f .github/patches/${BRANCH}/versions ]]; then | ||
if [[ ! -f .github/patches/versions ]]; then | ||
echo "No versions file found. Skipping patching" | ||
exit 0 | ||
fi | ||
|
||
source .github/patches/${BRANCH}/versions | ||
source .github/patches/versions | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "ADOT Patch workflow" | ||
|
||
|
||
OTEL_JAVA_PATCH=".github/patches/${BRANCH}/opentelemetry-java.patch" | ||
OTEL_JAVA_PATCH=".github/patches/opentelemetry-java.patch" | ||
if [[ -f "$OTEL_JAVA_PATCH" ]]; then | ||
git clone https://github.com/open-telemetry/opentelemetry-java.git | ||
cd opentelemetry-java | ||
|
@@ -37,7 +34,7 @@ else | |
fi | ||
|
||
|
||
OTEL_JAVA_CONTRIB_PATCH=".github/patches/${BRANCH}/opentelemetry-java-contrib.patch" | ||
OTEL_JAVA_CONTRIB_PATCH=".github/patches/opentelemetry-java-contrib.patch" | ||
if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then | ||
git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git | ||
cd opentelemetry-java-contrib | ||
|
@@ -50,7 +47,7 @@ else | |
fi | ||
|
||
|
||
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/${BRANCH}/opentelemetry-java-instrumentation.patch" | ||
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch" | ||
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then | ||
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git | ||
cd opentelemetry-java-instrumentation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't think we need this conditional anymore. Running the patch action is a NOOP if no patch files exist.