Skip to content

Added logs to client logging methods (#8014) #2180

Added logs to client logging methods (#8014)

Added logs to client logging methods (#8014) #2180

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: TC Health Client Integration Tests
env:
ATS_VERSION: 9.2.x
RHEL_VERSION: 8
TARGET_ARCH: x86_64
on:
workflow_dispatch:
push:
paths:
- .github/workflows/health-client-tests.yml
- go.mod
- go.sum
- GO_VERSION
- lib/go-atscfg/**.go
- traffic_ops/*client/**.go
- traffic_ops/toclientlib/**.go
- lib/atscfg-go/**.go
- traffic_ops/traffic_ops_golang/**.go
- tc-health-client/**.go
- tc-health-client/testing/**
- '!**_test.go'
- tc-health-client/**_test.go
- vendor/**.go
- vendor/modules.txt
- .github/actions/build-ats-test-rpm/**
- .github/actions/repo-info/**
- .github/actions/health-client-integration-tests/**
pull_request:
paths:
- .github/workflows/health-client-tests.yml
- go.mod
- go.sum
- GO_VERSION
- lib/go-atscfg/**.go
- traffic_ops/*client/**.go
- traffic_ops/toclientlib/**.go
- lib/atscfg-go/**.go
- traffic_ops/traffic_ops_golang/**.go
- tc-health-client/**.go
- tc-health-client/testing/**
- '!**_test.go'
- tc-health-client/**_test.go
- vendor/**.go
- vendor/modules.txt
- .github/actions/build-ats-test-rpm/**
- .github/actions/repo-info/**
- .github/actions/health-client-integration-tests/**
types: [opened, reopened, ready_for_review, synchronize]
jobs:
traffic_ops:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Build RPM
uses: ./.github/actions/build-rpms
env:
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
tc-health-client:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Build RPM
uses: ./.github/actions/build-rpms
env:
NO_SOURCE: 1
ATC_COMPONENT: ${{ github.job }}
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/trafficcontrol-health-client-*.x86_64.rpm
trafficserver:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get expected RPM name
uses: ./.github/actions/repo-info
with:
owner: apache
repo: trafficserver
branch: ${{ env.ATS_VERSION }}
id: repo-info
- name: Check Cache
id: ats-rpm-cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/dist
key: ${{ steps.repo-info.outputs.expected-rpm-name }}-${{ hashFiles('cache-config/testing/docker/trafficserver/**') }}
- name: Build ATS RPM
if: steps.ats-rpm-cache.outputs.cache-hit != 'true'
uses: ./.github/actions/build-ats-test-rpm
env:
ATC_COMPONENT: ${{ github.job }}
- name: Check ATS RPM name
run: |
set -o errexit -o nounset -o xtrace
actual_rpm_name="$(ls dist | grep -E '^trafficserver-[0-9.]+-[0-9]+\.[0-9a-f]+.el${{ env.RHEL_VERSION }}.${{ env.TARGET_ARCH }}.rpm$')"
[[ "${{ steps.repo-info.outputs.expected-rpm-name }}" == "$actual_rpm_name" ]]
- name: Upload RPM
uses: actions/upload-artifact@v2
with:
name: ${{ github.job }}
path: ${{ github.workspace }}/dist/${{ github.job }}-*.x86_64.rpm
health-client_tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
needs:
- traffic_ops
- tc-health-client
- trafficserver
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download TO RPM
uses: actions/download-artifact@v2
with:
name: traffic_ops
path: ${{ github.workspace }}/tc-health-client/testing/docker/traffic_ops
- name: Download Health Client RPM
uses: actions/download-artifact@v2
with:
name: tc-health-client
path: ${{ github.workspace }}/tc-health-client/testing/docker/health-check-test
- name: Download ATS RPM
uses: actions/download-artifact@v2
with:
name: trafficserver
path: ${{ github.workspace }}/tc-health-client/testing/docker/health-check-test
- name: display directory
run: ls -l ${{ github.workspace }}/tc-health-client/testing/docker/health-check-test
- name: Build health client test containers
run: docker-compose -f ${{ github.workspace }}/tc-health-client/testing/docker/docker-compose.yml build --parallel
- name: Run health client integration tests
uses: ./.github/actions/health-client-integration-tests