Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
straussb committed Apr 11, 2024
1 parent 8daec8b commit badb0ec
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions .github/workflows/otel-fork-replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,39 @@ jobs:
git config --global user.name 'Github Action'
git config --global user.email '[email protected]'
git checkout -b otel-fork-replace-${{ steps.get-latest-commit.outputs.sha }}
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor=github.com/amazon-contributing/opentelemetry-collector-contrib/processor/resourcedetectionprocessor@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter=github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsemfexporter@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter=github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awsxrayexporter@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/xray@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/awsutil@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/containerinsight@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/k8s@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver=github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver=github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/prometheusreceiver@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus=github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/translator/prometheus@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs=github.com/amazon-contributing/opentelemetry-collector-contrib/internal/aws/cwlogs@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter=github.com/amazon-contributing/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver=github.com/amazon-contributing/opentelemetry-collector-contrib/receiver/awsxrayreceiver@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws=github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
go mod edit -replace github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza=github.com/amazon-contributing/opentelemetry-collector-contrib/pkg/stanza@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
packages=(
exporter/awscloudwatchlogsexporter
exporter/awsemfexporter
exporter/awsxrayexporter
extension/awsmiddleware
extension/awsproxy
internal/aws/awsutil
internal/aws/containerinsight
internal/aws/cwlogs
internal/aws/k8s
internal/aws/proxy
internal/aws/xray
internal/kubelet
pkg/translator/prometheus
processor/resourcedetectionprocessor
receiver/awscontainerinsightreceiver
receiver/awsxrayreceiver
receiver/prometheusreceiver
)
for p in ${packages[@]}; do
go mod edit -replace github.com/open-telemetry/opentelemetry-collector-contrib/$p=github.com/amazon-contributing/opentelemetry-collector-contrib/$p@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
done
amazonContributingPackages=(
override/aws
pkg/stanza
)
for p in ${amazonContributingPackages[@]}; do
go mod edit -replace github.com/amazon-contributing/opentelemetry-collector-contrib/$p=github.com/amazon-contributing/opentelemetry-collector-contrib/$p@${{ steps.get-latest-commit.outputs.sha }}
go mod tidy
done
git commit -am "Update OTel fork components to https://github.com/amazon-contributing/opentelemetry-collector-contrib/commit/${{ steps.get-latest-commit.outputs.sha }}"
git push -u origin HEAD
git config --global --unset user.name
Expand Down

0 comments on commit badb0ec

Please sign in to comment.