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

fix version update script #5758

Closed
wants to merge 4 commits into from
Closed
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
3 changes: 2 additions & 1 deletion content/en/docs/collector/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ title: Collector
description: Vendor-agnostic way to receive, process and export telemetry data.
aliases: [collector/about]
cascade:
vers: 0.115.1
vers:
collector: 0.115.1
weight: 270
---

Expand Down
65 changes: 33 additions & 32 deletions content/en/docs/collector/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ and [Deployment Methods][] page.
## Docker

The following commands pull a Docker image and run the Collector in a container.
Replace `{{% param vers %}}` with the version of the Collector you want to run.
Replace `{{% param vers.collector %}}` with the version of the Collector you
want to run.

{{< tabpane text=true >}} {{% tab DockerHub %}}

```sh
docker pull otel/opentelemetry-collector-contrib:{{% param vers %}}
docker run otel/opentelemetry-collector-contrib:{{% param vers %}}
docker pull otel/opentelemetry-collector-contrib:{{% param vers.collector %}}
docker run otel/opentelemetry-collector-contrib:{{% param vers.collector %}}
```

{{% /tab %}} {{% tab ghcr.io %}}

```sh
docker pull ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{% param vers %}}
docker run ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{% param vers %}}
docker pull ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{% param vers.collector %}}
docker run ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{% param vers.collector %}}
```

{{% /tab %}} {{< /tabpane >}}
Expand All @@ -40,13 +41,13 @@ as a volume:
{{< tabpane text=true >}} {{% tab DockerHub %}}

```sh
docker run -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib:{{% param vers %}}
docker run -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml otel/opentelemetry-collector-contrib:{{% param vers.collector %}}
```

{{% /tab %}} {{% tab ghcr.io %}}

```sh
docker run -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{% param vers %}}
docker run -v $(pwd)/config.yaml:/etc/otelcol-contrib/config.yaml ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:{{% param vers.collector %}}
```

{{% /tab %}} {{< /tabpane >}}
Expand Down Expand Up @@ -77,7 +78,7 @@ The following command deploys an agent as a daemonset and a single gateway
instance:

```sh
kubectl apply -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector/v{{% param vers %}}/examples/k8s/otel-config.yaml
kubectl apply -f https://raw.githubusercontent.com/open-telemetry/opentelemetry-collector/v{{% param vers.collector %}}/examples/k8s/otel-config.yaml
```

The previous example is meant to serve as a starting point, to be extended and
Expand Down Expand Up @@ -114,26 +115,26 @@ To get started on Debian systems run the following commands:
```sh
sudo apt-get update
sudo apt-get -y install wget
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_amd64.deb
sudo dpkg -i otelcol_{{% param vers %}}_linux_amd64.deb
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_amd64.deb
sudo dpkg -i otelcol_{{% param vers.collector %}}_linux_amd64.deb
```

{{% /tab %}} {{% tab ARM64 %}}

```sh
sudo apt-get update
sudo apt-get -y install wget
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_arm64.deb
sudo dpkg -i otelcol_{{% param vers %}}_linux_arm64.deb
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_arm64.deb
sudo dpkg -i otelcol_{{% param vers.collector %}}_linux_arm64.deb
```

{{% /tab %}} {{% tab i386 %}}

```sh
sudo apt-get update
sudo apt-get -y install wget
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_386.deb
sudo dpkg -i otelcol_{{% param vers %}}_linux_386.deb
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_386.deb
sudo dpkg -i otelcol_{{% param vers.collector %}}_linux_386.deb
```

{{% /tab %}} {{< /tabpane >}}
Expand All @@ -147,26 +148,26 @@ To get started on Red Hat systems run the following commands:
```sh
sudo yum update
sudo yum -y install wget systemctl
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_amd64.rpm
sudo rpm -ivh otelcol_{{% param vers %}}_linux_amd64.rpm
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_amd64.rpm
sudo rpm -ivh otelcol_{{% param vers.collector %}}_linux_amd64.rpm
```

{{% /tab %}} {{% tab ARM64 %}}

```sh
sudo yum update
sudo yum -y install wget systemctl
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_arm64.rpm
sudo rpm -ivh otelcol_{{% param vers %}}_linux_arm64.rpm
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_arm64.rpm
sudo rpm -ivh otelcol_{{% param vers.collector %}}_linux_arm64.rpm
```

{{% /tab %}} {{% tab i386 %}}

```sh
sudo yum update
sudo yum -y install wget systemctl
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_386.rpm
sudo rpm -ivh otelcol_{{% param vers %}}_linux_386.rpm
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_386.rpm
sudo rpm -ivh otelcol_{{% param vers.collector %}}_linux_386.rpm
```

{{% /tab %}} {{< /tabpane >}}
Expand All @@ -179,29 +180,29 @@ file containing the binary and install it on your machine manually:
{{< tabpane text=true >}} {{% tab AMD64 %}}

```sh
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_amd64.tar.gz
tar -xvf otelcol_{{% param vers %}}_linux_amd64.tar.gz
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_amd64.tar.gz
tar -xvf otelcol_{{% param vers.collector %}}_linux_amd64.tar.gz
```

{{% /tab %}} {{% tab ARM64 %}}

```sh
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_arm64.tar.gz
tar -xvf otelcol_{{% param vers %}}_linux_arm64.tar.gz
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_arm64.tar.gz
tar -xvf otelcol_{{% param vers.collector %}}_linux_arm64.tar.gz
```

{{% /tab %}} {{% tab i386 %}}

```sh
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_386.tar.gz
tar -xvf otelcol_{{% param vers %}}_linux_386.tar.gz
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_386.tar.gz
tar -xvf otelcol_{{% param vers.collector %}}_linux_386.tar.gz
```

{{% /tab %}} {{% tab ppc64le %}}

```sh
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_linux_ppc64le.tar.gz
tar -xvf otelcol_{{% param vers %}}_linux_ppc64le.tar.gz
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_linux_ppc64le.tar.gz
tar -xvf otelcol_{{% param vers.collector %}}_linux_ppc64le.tar.gz
```

{{% /tab %}} {{< /tabpane >}}
Expand Down Expand Up @@ -239,15 +240,15 @@ commands:
{{< tabpane text=true >}} {{% tab Intel %}}

```sh
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_darwin_amd64.tar.gz
tar -xvf otelcol_{{% param vers %}}_darwin_amd64.tar.gz
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_darwin_amd64.tar.gz
tar -xvf otelcol_{{% param vers.collector %}}_darwin_amd64.tar.gz
```

{{% /tab %}} {{% tab ARM %}}

```sh
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers %}}/otelcol_{{% param vers %}}_darwin_arm64.tar.gz
tar -xvf otelcol_{{% param vers %}}_darwin_arm64.tar.gz
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v{{% param vers.collector %}}/otelcol_{{% param vers.collector %}}_darwin_arm64.tar.gz
tar -xvf otelcol_{{% param vers.collector %}}_darwin_arm64.tar.gz
```

{{% /tab %}} {{< /tabpane >}}
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/collector/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ preferred shell.
1. Pull in the OpenTelemetry Collector Contrib Docker image:

```sh
docker pull otel/opentelemetry-collector-contrib:{{% param vers %}}
docker pull otel/opentelemetry-collector-contrib:{{% param vers.collector %}}
```

2. Install the [telemetrygen] utility:
Expand All @@ -65,7 +65,7 @@ preferred shell.
-p 127.0.0.1:4317:4317 \
-p 127.0.0.1:4318:4318 \
-p 127.0.0.1:55679:55679 \
otel/opentelemetry-collector-contrib:{{% param vers %}} \
otel/opentelemetry-collector-contrib:{{% param vers.collector %}} \
2>&1 | tee collector-output.txt # Optionally tee output for easier search later
```

Expand Down
3 changes: 2 additions & 1 deletion content/en/docs/security/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Security
cascade:
collector_vers: 0.115.1
vers:
collector: 0.115.1
weight: 970
---

Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/security/config-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ host) by connecting to `127.0.0.1:4567`. Here is an example `docker run`
command:

```shell
docker run --hostname my-hostname --name container-name -p 127.0.0.1:4567:4317 otel/opentelemetry-collector:{{% param collector_vers %}}
docker run --hostname my-hostname --name container-name -p 127.0.0.1:4567:4317 otel/opentelemetry-collector:{{% param vers.collector %}}
```

#### Docker Compose
Expand All @@ -152,7 +152,7 @@ The Docker `compose.yaml` file:
```yaml
services:
otel-collector:
image: otel/opentelemetry-collector-contrib:{{% param collector_vers %}}
image: otel/opentelemetry-collector-contrib:{{% param vers.collector %}}
ports:
- '4567:4317'
```
Expand Down Expand Up @@ -193,7 +193,7 @@ spec:
spec:
containers:
- name: collector
image: otel/opentelemetry-collector:{{% param collector_vers %}}
image: otel/opentelemetry-collector:{{% param vers.collector %}}
ports:
- containerPort: 4317
hostPort: 4317
Expand Down
12 changes: 6 additions & 6 deletions scripts/auto-update/all-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

function auto_update_versions() {
local cmd="./scripts/auto-update/version-in-file.sh"
################################################################
## Each repository must only appear once in the list below! ##
################################################################
local updates=(
"opentelemetry-collector-releases vers content/en/docs/collector/_index.md"
"opentelemetry-collector-releases collector_vers content/en/docs/security/_index.md"
"opentelemetry-java otel content/en/docs/languages/java/_index.md"
"opentelemetry-java otel content/en/docs/zero-code/java/_index.md"
"opentelemetry-java-instrumentation instrumentation content/en/docs/languages/java/_index.md"
"opentelemetry-java-instrumentation instrumentation content/en/docs/zero-code/java/_index.md"
"opentelemetry-collector-releases collector content/en/docs/collector/_index.md content/en/docs/security/_index.md"
"opentelemetry-java otel content/en/docs/languages/java/_index.md content/en/docs/zero-code/java/_index.md"
"opentelemetry-java-instrumentation instrumentation content/en/docs/languages/java/_index.md content/en/docs/zero-code/java/_index.md"
"opentelemetry-java-contrib contrib content/en/docs/languages/java/_index.md"
"opentelemetry-specification spec scripts/content-modules/adjust-pages.pl .gitmodules"
"opentelemetry-proto otlp scripts/content-modules/adjust-pages.pl .gitmodules"
Expand Down
10 changes: 5 additions & 5 deletions scripts/auto-update/version-in-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ else
echo
fi

message="Update $repo version to $latest_version"
body="Update $repo version to \`$latest_version\`.
message="Update $repo to $latest_version"
body="Update $repo to \`$latest_version\`.

See https://github.com/open-telemetry/$repo/releases/tag/$latest_version."

existing_pr_count=$(gh pr list --state all --search "in:title $message" | wc -l)
if [ "$existing_pr_count" -gt 0 ]; then
existing_prs=$(gh pr list --state all --search "in:title $message")
if [ -n "$existing_pr" ]; then
echo "PR(s) already exist for '$message'"
gh pr list --state all --search "\"$message\" in:title"
echo "$existing_prs"
echo "So we won't create another. Exiting."
exit 0
fi
Expand Down
Loading