Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
Signed-off-by: sallyom <[email protected]>
  • Loading branch information
sallyom committed Jun 21, 2024
1 parent dc012ed commit d9e936b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 30 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/chatbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,36 +51,39 @@ jobs:
- name: Configure OpenTelemetry Collector
run: |
echo '
extensions:
bearertokenauth:
scheme: "Bearer"
token: "${{ secrets.OTEL_BEARER_TOKEN}}"
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
exporters:
otlphttp:
endpoint: https://apps.platform-sts.pcbk.p1.openshiftapps.com
endpoint: https://otc.apps.platform-sts.pcbk.p1.openshiftapps.com
auth:
authenticator: bearertokenauth
tls:
insecure: false
cert_pem: ${{ secrets.CLIENT_CERT_ROSA_OTEL }}
key_pem: ${{ secrets.CLIENT_KEY_ROSA_OTEL }}
ca_pem: ${{ secrets.SERVER_CERT_ROSA_OTEL }}
logging:
ca_pem: ${{ secrets.ROSA_ROOT_CERT }}
debug:
verbosity: detailed
service:
extensions: [bearertokenauth]
pipelines:
traces:
receivers: [otlp]
exporters: [logging,otlphttp]
exporters: [debug, otlphttp]
' > otel-collector-config.yaml
- name: Run OpenTelemetry Collector
run: |
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.102.1/otelcol_0.102.1_linux_amd64.tar.gz
tar -xvf otelcol_0.102.1_linux_amd64.tar.gz
chmod +x otelcol
./otelcol --config otel-collector-config.yaml &
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.103.0/otelcol-contrib_0.103.0_linux_amd64.tar.gz
tar -xvf otelcol-contrib_0.103.0_linux_amd64.tar.gz
chmod +x otelcol-contrib
./otelcol-contrib --config otel-collector-config.yaml &
- name: Install qemu dependency
run: |
Expand Down
44 changes: 26 additions & 18 deletions .github/workflows/test-trace-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ on:

jobs:
test:
runs-on: ubuntu-latest

if: "!contains(github.event.pull_request.labels.*.name, 'hold-tests')"
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
Expand All @@ -28,39 +26,49 @@ jobs:
run: |
pip install --no-cache-dir opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation
- name: Download OpenTelemetry Collector Contrib
run: |
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.103.0/otelcol-contrib_0.103.0_linux_amd64.tar.gz
tar -xvf otelcol-contrib_0.103.0_linux_amd64.tar.gz
- name: Configure OpenTelemetry Collector
env:
OTEL_USERNAME: ${{ secrets.OTEL_USERNAME }}
OTEL_PASSWORD: ${{ secrets.OTEL_PASSWORD }}
ROSA_ROOT_CERT: ${{ secrets.ROSA_ROOT_CERT }}
run: |
echo '
extensions:
basicauth/client:
client_auth:
username: "${OTEL_USERNAME}"
password: "${OTEL_PASSWORD}"
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
exporters:
otlphttp:
endpoint: https://apps.platform-sts.pcbk.p1.openshiftapps.com
endpoint: https://otc.apps.platform-sts.pcbk.p1.openshiftapps.com
auth:
authenticator: basicauth/client
tls:
insecure: false
cert_pem: ${{ secrets.CLIENT_CERT_ROSA_OTEL }}
key_pem: ${{ secrets.CLIENT_KEY_ROSA_OTEL }}
ca_pem: ${{ secrets.SERVER_CERT_ROSA_OTEL }}
logging:
ca_pem: "${ROSA_ROOT_CERT}"
debug:
verbosity: detailed
service:
extensions: [basicauth/client]
pipelines:
traces:
receivers: [otlp]
exporters: [logging,otlphttp]
' > otel-collector-config.yaml
exporters: [debug, otlphttp]
' > otel-collector-config.yaml
- name: Run OpenTelemetry Collector
run: |
curl --proto '=https' --tlsv1.2 -fOL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.102.1/otelcol_0.102.1_linux_amd64.tar.gz
tar -xvf otelcol_0.102.1_linux_amd64.tar.gz
chmod +x otelcol
./otelcol --config otel-collector-config.yaml &
./otelcol-contrib --config otel-collector-config.yaml &
- name: Start build trace
run: |
Expand Down

0 comments on commit d9e936b

Please sign in to comment.