Skip to content

Commit

Permalink
fix testing-framework
Browse files Browse the repository at this point in the history
Signed-off-by: sallyom <[email protected]>
  • Loading branch information
sallyom committed Jul 9, 2024
1 parent 67e8135 commit 1ed1d0d
Showing 1 changed file with 4 additions and 141 deletions.
145 changes: 4 additions & 141 deletions .github/workflows/testing_framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,51 +53,6 @@ jobs:
with:
python-version: '3.11'

- name: Install Python dependencies for otel trace generation
run: |
pip install --no-cache-dir opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation
- name: Configure OpenTelemetry Collector
run: |
echo '
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
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:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
exporters: [logging,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 &
- name: Start integration-tests trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="integration-tests"
export TRACE_ACTION="start"
python ci/trace-steps.py
- name: Checkout terraform module
id: checkout-module
uses: actions/[email protected]
Expand All @@ -116,13 +71,6 @@ jobs:
run: terraform init
working-directory: terraform-test-environment-module

- name: Start bootstrap trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="bootstrap"
export TRACE_ACTION="start"
python ci/trace-steps.py
- name: Bootstrap
id: up
run: terraform apply -auto-approve -lock=false
Expand All @@ -131,13 +79,6 @@ jobs:
TF_VAR_aws_instance_type: ${{ matrix.aws_image_type }}
TF_VAR_aws_ami_architecture: ${{ matrix.aws_ami_architecture }}

- name: End bootstrap trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="bootstrap"
export TRACE_ACTION="end"
python ci/trace-steps.py
- name: Terraform Output
id: terraform-output
run: |
Expand All @@ -148,54 +89,26 @@ jobs:

- name: Ansible Collections
run: ansible-galaxy install -r ./provision/requirements.yml
working-directory: ./main/recipes/natural_language_processing/chatbot

- name: Start ansible provision trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="ansible-provision"
export TRACE_ACTION="start"
python ci/trace-steps.py
working-directory: ./recipes/natural_language_processing/chatbot

- name: Provision
run: |
ansible-playbook ./main/recipes/natural_language_processing/chatbot/provision/playbook.yml \
ansible-playbook ./recipes/natural_language_processing/chatbot/provision/playbook.yml \
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }}
env:
ANSIBLE_HOST_KEY_CHECKING: false

- name: End ansible provision trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="ansible-provision"
export TRACE_ACTION="end"
python ci/trace-steps.py
- name: Install Dependencies
working-directory: ./main/recipes/natural_language_processing/chatbot
working-directory: ./recipes/natural_language_processing/chatbot
run: make install

- name: Start integration test trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="run-integration-tests"
export TRACE_ACTION="start"
python ci/trace-steps.py
- name: Run Integration Tests
working-directory: ./main/recipes/natural_language_processing/chatbot
working-directory: ./recipes/natural_language_processing/chatbot
run: make integration-tests
env:
URL: ${{ steps.terraform-output.outputs.url }}

- name: End integration test trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="run-integration-tests"
export TRACE_ACTION="end"
python ci/trace-steps.py
- name: Destroy Test Environment
id: down
if: always()
Expand All @@ -217,13 +130,6 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Stop testing_framework trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="integration-tests"
export TRACE_ACTION="end"
python ci/trace-steps.py
release-images:
runs-on: ubuntu-24.04
needs: integration-tests
Expand Down Expand Up @@ -272,53 +178,10 @@ jobs:
with:
python-version: '3.11'

- name: Install Python dependencies for otel trace generation
run: |
pip install --no-cache-dir opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation
- name: Configure OpenTelemetry Collector
run: |
echo '
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
exporters:
logging:
loglevel: debug
service:
pipelines:
traces:
receivers: [otlp]
exporters: [logging]
' > 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 &
- name: Start chatbot make bootc trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="test-make-targets"
export TRACE_ACTION="start"
python ci/trace-steps.py
- name: chatbot
working-directory: ./recipes/natural_language_processing/chatbot
run: make bootc

- name: End chatbot make bootc trace
run: |
export WORKFLOW_NAME="testing_framework"
export STEP_NAME="test-make-targets"
export TRACE_ACTION="end"
python ci/trace-steps.py
- name: Publish Job Results to Slack
id: slack
if: always()
Expand Down

0 comments on commit 1ed1d0d

Please sign in to comment.