skywalking.yaml 32.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# 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: CI

on:
  pull_request:
  schedule:
22
    - cron: "0 18 * * *" # TimeZone: UTC 0
23 24 25 26 27 28 29 30

concurrency:
  group: skywalking-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

env:
  SW_AGENT_JDK_VERSION: 8
  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
31
  SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 # Cache restore timeout
32

33 34 35 36 37 38 39
jobs:
  license-header:
    if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
    name: License header
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
40
      - uses: actions/checkout@v3
41 42 43
        with:
          submodules: true
      - name: Check license header
44
        uses: apache/skywalking-eyes@bd8d2db65f2fea938b74401ae72b0365733bdfdc
45 46 47 48 49 50 51

  code-style:
    if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
    name: Code style
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
52
      - uses: actions/checkout@v3
53 54 55
        with:
          submodules: true
      - name: Check code style
56 57 58 59
        run: ./mvnw -B -q clean checkstyle:check

  dependency-license:
    if: |
60
      ( always() && ! cancelled() ) &&
61
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.pom == 'true' || needs.changes.outputs.ui == 'true')
62
    name: Dependency licenses
63
    needs: [changes]
64 65 66 67 68 69 70 71
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
      - uses: actions/setup-java@v3
        with:
72
          distribution: "temurin"
73
          java-version: "11"
74
          cache: "maven"
75 76 77
      - name: Setup Go
        uses: actions/setup-go@v3
        with:
78
          go-version: "1.16"
79 80
      - name: Check Dependencies Licenses
        run: |
81
          go install github.com/apache/skywalking-eyes/cmd/license-eye@bd8d2db65f2fea938b74401ae72b0365733bdfdc
82 83 84 85 86 87
          license-eye dependency resolve --summary ./dist-material/release-docs/LICENSE.tpl || exit 1
          if [ ! -z "$(git diff -U0 ./dist-material/release-docs/LICENSE)" ]; then
            echo "LICENSE file is not updated correctly"
            git diff -U0 ./dist-material/release-docs/LICENSE
            exit 1
          fi
88 89

  sanity-check:
90
    if: ( always() && ! cancelled() ) && (github.event_name == 'schedule' && github.repository == 'apache/skywalking') || (github.event_name != 'schedule')
91
    name: Sanity check results
92
    needs: [license-header, code-style, dependency-license]
93 94 95 96 97
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - name: Check results
        run: |
98 99 100
          [[ ${{ needs.license-header.result }} == 'success' ]] || exit 1;
          [[ ${{ needs.code-style.result }} == 'success' ]] || exit 1;
          [[ ${{ needs.dependency-license.result }} == 'success' ]] || [[ ${{ needs.dependency-license.result }} == 'skipped' ]] || exit 1;
101

102 103 104 105 106 107 108 109 110
  changes:
    # Check if anything related to Actual code / CI(functional testing) is changed
    # set outputs for other jobs to access for if conditions
    runs-on: ubuntu-latest
    # To prevent error when there's no base branch
    if: github.event_name != 'schedule'
    timeout-minutes: 10
    outputs:
      oap: ${{ steps.filter.outputs.oap }}
111
      pom: ${{ steps.filter.outputs.pom }}
112
      ui: ${{ steps.filter.outputs.ui }}
113
    steps:
114
      - uses: actions/checkout@v3 # required for push event
115 116 117 118 119 120 121
      - name: Check for file changes
        uses: getsentry/paths-filter@v2
        id: filter
        with:
          token: ${{ github.token }}
          # The following is a single composite pattern that allows next CI steps,
          # the pattern is in form of [not (foo or bar)] to be safe.
122
          # When new files come in, the CI will NOT ignore them unless listed,
123 124 125 126 127 128 129 130 131 132 133 134 135
          # so remember to extend here if they do not serve functional purposes.
          # NOTE: careful with using ** in expression, keep !**/{old, new things}.
          filters: |
            oap:
              - "!**/{\
              *.md,*.txt,\
              skywalking-ui,\
              .asf.yaml,.dlc.json,.gitignore,.licenserc.yaml,\
              codeStyle.xml,\
              HEADER,LICENSE,NOTICE,\
              docs/**,\
              .github/workflows/codeql.yaml,\
              .github/(ISSUE_TEMPLATE/**|PULL_REQUEST_TEMPLATE),\
136
              dist-material/release-docs/**,\
137 138
              component-libraries.yml\
              }"
139 140
            pom:
              - "**/pom.xml"
141 142
            ui:
              - "skywalking-ui"
143
          list-files: json # logs matched files
144

145
  dist-tar:
146
    if: |
147
      ( always() && ! cancelled() ) &&
148
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
149
    name: Build dist tar
150
    needs: [sanity-check, changes]
151 152 153
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
154
      - uses: actions/checkout@v3
155 156
        with:
          submodules: true
157
      - uses: actions/setup-java@v3
158
        with:
159
          distribution: "temurin"
160
          java-version: "11"
161
          cache: "maven"
162 163 164 165 166 167
      - name: Build distribution tar
        run: |
          ./mvnw clean install -B -q \
            -Dmaven.test.skip \
            -Dmaven.javadoc.skip \
            -Dcheckstyle.skip
168
      - uses: actions/upload-artifact@v3
169 170 171 172 173 174
        name: Upload distribution tar
        with:
          name: dist
          path: dist

  docker:
175
    if: |
176
      ( always() && ! cancelled() ) &&
177
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
178
    name: Docker images
179
    needs: [dist-tar, changes]
180 181 182 183
    runs-on: ubuntu-latest
    timeout-minutes: 30
    strategy:
      matrix:
184
        java-version: [11, 17]
185
    steps:
186
      - uses: actions/checkout@v3
187 188
        with:
          submodules: true
189
      - uses: actions/download-artifact@v3
190 191 192 193 194
        name: Download distribution tar
        with:
          name: dist
          path: dist
      - name: Set up Java
195
        uses: actions/setup-java@v3
196 197 198 199 200 201 202 203 204 205 206
        with:
          distribution: temurin
          java-version: ${{ matrix.java-version }}
      - name: Build and save docker images
        env:
          SW_OAP_BASE_IMAGE: eclipse-temurin:${{ matrix.java-version }}-jre
        run: |
          make docker.all || make docker.all
          docker save -o docker-images-skywalking-oap.tar skywalking/oap:latest
          docker save -o docker-images-skywalking-ui.tar skywalking/ui:latest
      - name: Upload docker images
207
        uses: actions/upload-artifact@v3
208 209 210 211 212
        with:
          name: docker-images-${{ matrix.java-version }}
          path: docker-images-skywalking-*.tar

  unit-test:
213
    if: |
214
      ( always() && ! cancelled() ) &&
215
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
216
    name: Unit test
217
    needs: [sanity-check, changes]
218 219 220 221
    runs-on: ${{ matrix.os }}-latest
    timeout-minutes: 30
    strategy:
      matrix:
222
        os: [ubuntu, macos, windows]
223
        java-version: [11]
224 225
        include:
          - os: ubuntu
226
            java-version: 17
227
    steps:
228
      - uses: actions/checkout@v3
229 230 231
        with:
          submodules: true
      - name: Cache maven repository
232
        uses: actions/cache@v3
233 234 235 236
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-maven-
237
      - uses: actions/setup-java@v3
238 239
        with:
          java-version: ${{ matrix.java-version }}
240
          distribution: temurin
241
      - name: Unit test
242
        run: ./mvnw clean test -q -B -D"checkstyle.skip" || ./mvnw clean test -q -B -D"checkstyle.skip"
243 244

  integration-test:
245
    if: |
246
      ( always() && ! cancelled() ) &&
247
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
248
    name: Integration test
249
    needs: [sanity-check, changes]
250 251 252 253
    runs-on: ubuntu-latest
    timeout-minutes: 60
    strategy:
      matrix:
254
        java-version: [11, 17]
255
    steps:
256
      - uses: actions/checkout@v3
257 258 259
        with:
          submodules: true
      - name: Cache maven repository
260
        uses: actions/cache@v3
261 262 263 264
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-maven-
265
      - uses: actions/setup-java@v3
266 267
        with:
          java-version: ${{ matrix.java-version }}
268
          distribution: temurin
269 270
      - name: Integration test
        run: |
271 272 273
          # Exclude slow integration tests and run those tests separately below.
          ./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true -DexcludedGroups=slow || \
          ./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true -DexcludedGroups=slow
274

275 276
  # Slow tests
  slow-integration-test:
277
    if: |
278
      ( always() && ! cancelled() ) &&
279
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
280
    name: Slow Integration Tests
281 282 283 284 285
    needs: [sanity-check, changes]
    runs-on: ubuntu-latest
    timeout-minutes: 60
    strategy:
      matrix:
286 287
        test:
          - name: ShardingSphere
288
            class: org.apache.skywalking.oap.server.storage.plugin.jdbc.shardingsphere.ShardingSphereIT
289
          - name: ElasticSearch / OpenSearch
290
            class: org.apache.skywalking.library.elasticsearch.ElasticSearchIT
291 292 293 294 295 296 297 298 299 300 301 302
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
      - name: Cache maven repository
        uses: actions/cache@v3
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-maven-
      - uses: actions/setup-java@v3
        with:
303 304
          java-version: 11
          distribution: temurin
305
      - name: ${{ matrix.test.name }}
306
        run: |
307 308
          ./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true -Dit.test=${{ matrix.test.class }} -DfailIfNoTests=false || \
          ./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true -Dit.test=${{ matrix.test.class }} -DfailIfNoTests=false
309

310
  e2e-test:
311
    if: |
312
      ( always() && ! cancelled() ) &&
313
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
314
    name: E2E test
315
    needs: [docker]
316
    runs-on: ${{ matrix.test.runs-on || 'ubuntu-latest' }}
317 318 319 320 321 322 323 324 325 326 327 328 329 330
    timeout-minutes: 60
    strategy:
      fail-fast: false
      matrix:
        test:
          - name: Cluster ZK/ES
            config: test/e2e-v2/cases/cluster/zk/es/e2e.yaml

          - name: Agent NodeJS Backend
            config: test/e2e-v2/cases/nodejs/e2e.yaml
          - name: Agent Golang
            config: test/e2e-v2/cases/go/e2e.yaml
          - name: Agent NodeJS Frontend
            config: test/e2e-v2/cases/browser/e2e.yaml
331 332 333 334
          - name: Agent NodeJS Frontend ES
            config: test/e2e-v2/cases/browser/es/e2e.yaml
          - name: Agent NodeJS Frontend ES Sharding
            config: test/e2e-v2/cases/browser/es/es-sharding/e2e.yaml
335 336 337 338 339 340 341
          - name: Agent PHP
            config: test/e2e-v2/cases/php/e2e.yaml
          - name: Agent Python
            config: test/e2e-v2/cases/python/e2e.yaml
          - name: Agent Lua
            config: test/e2e-v2/cases/lua/e2e.yaml

J
Jiajing LU 已提交
342 343
          - name: BanyanDB
            config: test/e2e-v2/cases/storage/banyandb/e2e.yaml
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372
          - name: Storage H2
            config: test/e2e-v2/cases/storage/h2/e2e.yaml
          - name: Storage MySQL
            config: test/e2e-v2/cases/storage/mysql/e2e.yaml
          - name: Storage TiDB
            config: test/e2e-v2/cases/storage/tidb/e2e.yaml
          - name: Storage PostgreSQL
            config: test/e2e-v2/cases/storage/postgres/e2e.yaml
          - name: Storage ES 6.3.2
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=6.3.2
          - name: Storage ES 7.0.0
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=7.0.0
          - name: Storage ES 7.8.0
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=7.8.0
          - name: Storage ES 7.10.1
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=7.10.1
          - name: Storage ES 7.14.0
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=7.14.0
          - name: Storage ES 7.15.0
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=7.15.0
          - name: Storage ES 8.0.0
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=8.0.0
373 374 375
          - name: Storage ES 8.1.0
            config: test/e2e-v2/cases/storage/es/e2e.yaml
            env: ES_VERSION=8.1.0
376 377 378
          - name: Storage OpenSearch 1.1.0
            config: test/e2e-v2/cases/storage/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=1.1.0
379
          - name: Storage OpenSearch 1.3.6
380
            config: test/e2e-v2/cases/storage/opensearch/e2e.yaml
381 382
            env: OPENSEARCH_VERSION=1.3.6
          - name: Storage OpenSearch 2.4.0
383
            config: test/e2e-v2/cases/storage/opensearch/e2e.yaml
384
            env: OPENSEARCH_VERSION=2.4.0
385 386
          - name: Storage ES Sharding
            config: test/e2e-v2/cases/storage/es/es-sharding/e2e.yaml
387 388 389 390 391

          - name: Alarm H2
            config: test/e2e-v2/cases/alarm/h2/e2e.yaml
          - name: Alarm ES
            config: test/e2e-v2/cases/alarm/es/e2e.yaml
392 393
          - name: Alarm ES Sharding
            config: test/e2e-v2/cases/alarm/es/es-sharding/e2e.yaml
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412
          - name: Alarm MySQL
            config: test/e2e-v2/cases/alarm/mysql/e2e.yaml
          - name: Alarm PostgreSQL
            config: test/e2e-v2/cases/alarm/postgres/e2e.yaml

          - name: TTL TiDB
            config: test/e2e-v2/cases/ttl/tidb/e2e.yaml
          - name: TTL PostgreSQL
            config: test/e2e-v2/cases/ttl/postgresql/e2e.yaml
          - name: TTL ES 6.3.2
            config: test/e2e-v2/cases/ttl/es/e2e.yaml
            env: ES_VERSION=6.3.2
          - name: TTL ES 7.15.0
            config: test/e2e-v2/cases/ttl/es/e2e.yaml
            env: ES_VERSION=7.15.0
          - name: TTL ES 8.0.0
            config: test/e2e-v2/cases/ttl/es/e2e.yaml
            env: ES_VERSION=8.0.0

J
Jiajing LU 已提交
413 414
          - name: Event BanyanDB
            config: test/e2e-v2/cases/event/banyandb/e2e.yaml
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
          - name: Event H2
            config: test/e2e-v2/cases/event/h2/e2e.yaml
          - name: Event ES
            config: test/e2e-v2/cases/event/es/e2e.yaml
          - name: Event MySQL
            config: test/e2e-v2/cases/event/mysql/e2e.yaml

          - name: Log H2
            config: test/e2e-v2/cases/log/h2/e2e.yaml
          - name: Log MySQL
            config: test/e2e-v2/cases/log/mysql/e2e.yaml
          - name: Log PostgreSQL
            config: test/e2e-v2/cases/log/postgres/e2e.yaml
          - name: Log ES 6.3.2
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=6.3.2
          - name: Log ES 7.0.0
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=7.0.0
          - name: Log ES 7.8.0
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=7.8.0
          - name: Log ES 7.10.1
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=7.10.1
          - name: Log ES 7.14.0
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=7.14.0
          - name: Log ES 7.15.0
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=7.15.0
          - name: Log ES 8.0.0
            config: test/e2e-v2/cases/log/es/e2e.yaml
            env: ES_VERSION=8.0.0
449 450 451
          - name: Log ES 8.0.0 Shardng
            config: test/e2e-v2/cases/log/es/es-sharding/e2e.yaml
            env: ES_VERSION=8.0.0
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471

          - name: Log FluentBit ES 6.3.2
            config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
            env: ES_VERSION=6.3.2
          - name: Log FluentBit ES 7.0.0
            config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
            env: ES_VERSION=7.0.0
          - name: Log FluentBit ES 7.8.0
            config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
            env: ES_VERSION=7.8.0
          - name: Log FluentBit ES 7.10.1
            config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
            env: ES_VERSION=7.10.1
          - name: Log FluentBit ES 7.14.0
            config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
            env: ES_VERSION=7.14.0
          - name: Log FluentBit ES 7.15.0
            config: test/e2e-v2/cases/log/fluent-bit/e2e.yaml
            env: ES_VERSION=7.15.0

J
Jiajing LU 已提交
472 473
          - name: Trace Profiling BanyanDB
            config: test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
474 475 476 477
          - name: Trace Profiling H2
            config: test/e2e-v2/cases/profiling/trace/h2/e2e.yaml
          - name: Trace Profiling ES
            config: test/e2e-v2/cases/profiling/trace/es/e2e.yaml
478 479
          - name: Trace Profiling ES Sharding
            config: test/e2e-v2/cases/profiling/trace/es/es-sharding/e2e.yaml
480 481
          - name: Trace Profiling MySQL
            config: test/e2e-v2/cases/profiling/trace/mysql/e2e.yaml
482 483 484 485 486 487 488
          - name: Trace Profiling Postgres
            config: test/e2e-v2/cases/profiling/trace/postgres/e2e.yaml
          - name: Trace Profiling TiDB
            config: test/e2e-v2/cases/profiling/trace/tidb/e2e.yaml
          - name: Trace Profiling OpenSearch 1.1.0
            config: test/e2e-v2/cases/profiling/trace/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=1.1.0
489 490 491 492
          - name: Trace Profiling OpenSearch 1.3.6
            config: test/e2e-v2/cases/profiling/trace/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=1.3.6
          - name: Trace Profiling OpenSearch 2.4.0
493
            config: test/e2e-v2/cases/profiling/trace/opensearch/e2e.yaml
494
            env: OPENSEARCH_VERSION=2.4.0
495

496 497 498 499 500 501
          - name: eBPF Profiling On CPU BanyanDB
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/banyandb/e2e.yaml
          - name: eBPF Profiling On CPU H2
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/h2/e2e.yaml
          - name: eBPF Profiling On CPU ES
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/es/e2e.yaml
502 503
          - name: eBPF Profiling On CPU ES
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/es/es-sharding/e2e.yaml
504 505 506 507 508 509 510 511
          - name: eBPF Profiling On CPU MySQL
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/mysql/e2e.yaml
          - name: eBPF Profiling On CPU Postgres
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/postgres/e2e.yaml
          - name: eBPF Profiling On CPU TiDB
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/tidb/e2e.yaml
          - name: eBPF Profiling On CPU OpenSearch 1.1.0
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/opensearch/e2e.yaml
512
            env: OPENSEARCH_VERSION=1.1.0
513 514 515 516
          - name: eBPF Profiling On CPU OpenSearch 1.3.6
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=1.3.6
          - name: eBPF Profiling On CPU OpenSearch 2.4.0
517
            config: test/e2e-v2/cases/profiling/ebpf/oncpu/opensearch/e2e.yaml
518
            env: OPENSEARCH_VERSION=2.4.0
519 520
          - name: eBPF Profiling Off CPU
            config: test/e2e-v2/cases/profiling/ebpf/offcpu/e2e.yaml
521
            runs-on: ubuntu-20.04
522 523 524 525 526 527
          - name: eBPF Profiling Network BanyanDB
            config: test/e2e-v2/cases/profiling/ebpf/network/banyandb/e2e.yaml
          - name: eBPF Profiling Network H2
            config: test/e2e-v2/cases/profiling/ebpf/network/h2/e2e.yaml
          - name: eBPF Profiling Network ES
            config: test/e2e-v2/cases/profiling/ebpf/network/es/e2e.yaml
528
          - name: eBPF Profiling Network ES Sharding
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
            config: test/e2e-v2/cases/profiling/ebpf/network/es/es-sharding/e2e.yaml
          - name: eBPF Profiling Network MySQL
            config: test/e2e-v2/cases/profiling/ebpf/network/mysql/e2e.yaml
          - name: eBPF Profiling Network Postgres
            config: test/e2e-v2/cases/profiling/ebpf/network/postgres/e2e.yaml
          - name: eBPF Profiling Network TiDB
            config: test/e2e-v2/cases/profiling/ebpf/network/tidb/e2e.yaml
          - name: eBPF Profiling Network OpenSearch 1.1.0
            config: test/e2e-v2/cases/profiling/ebpf/network/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=1.1.0
          - name: eBPF Profiling Network OpenSearch 1.3.6
            config: test/e2e-v2/cases/profiling/ebpf/network/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=1.3.6
          - name: eBPF Profiling Network OpenSearch 2.4.0
            config: test/e2e-v2/cases/profiling/ebpf/network/opensearch/e2e.yaml
            env: OPENSEARCH_VERSION=2.4.0
545 546 547 548 549 550 551 552 553 554 555 556

          - name: Kafka Basic
            config: test/e2e-v2/cases/kafka/simple-so11y/e2e.yaml
          - name: Kafka Profiling
            config: test/e2e-v2/cases/kafka/profile/e2e.yaml
          - name: Kafka Meter
            config: test/e2e-v2/cases/kafka/meter/e2e.yaml
          - name: Kafka Log
            config: test/e2e-v2/cases/kafka/log/e2e.yaml

          - name: Istio Metrics Service 1.8.2
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
557 558 559
            env: |
              ISTIO_VERSION=1.8.2
              KUBERNETES_VERSION=19
560 561
          - name: Istio Metrics Service 1.9.1
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
562 563 564
            env: |
              ISTIO_VERSION=1.9.1
              KUBERNETES_VERSION=20
565 566
          - name: Istio Metrics Service 1.10.3
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
567 568 569
            env: |
              ISTIO_VERSION=1.10.3
              KUBERNETES_VERSION=20
570 571
          - name: Istio Metrics Service 1.11.4
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
572 573 574
            env: |
              ISTIO_VERSION=1.11.4
              KUBERNETES_VERSION=20
575 576
          - name: Istio Metrics Service 1.12.0
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
577 578 579
            env: |
              ISTIO_VERSION=1.12.0
              KUBERNETES_VERSION=20
580 581
          - name: Istio Metrics Service 1.13.1
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
582 583 584
            env: |
              ISTIO_VERSION=1.13.1
              KUBERNETES_VERSION=20
585 586 587 588 589 590 591 592 593 594
          - name: Istio Metrics Service 1.14.4
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
            env: |
              ISTIO_VERSION=1.14.4
              KUBERNETES_VERSION=20
          - name: Istio Metrics Service 1.15.0
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
            env: |
              ISTIO_VERSION=1.15.0
              KUBERNETES_VERSION=20
595 596 597 598 599
          - name: Istio Metrics Service 1.16.0
            config: test/e2e-v2/cases/istio/metrics/e2e.yaml
            env: |
              ISTIO_VERSION=1.16.0
              KUBERNETES_VERSION=20
600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616

          - name: Satellite
            config: test/e2e-v2/cases/satellite/native-protocols/e2e.yaml
          - name: Auth
            config: test/e2e-v2/cases/simple/auth/e2e.yaml
          - name: SSL
            config: test/e2e-v2/cases/simple/ssl/e2e.yaml
          - name: mTLS
            config: test/e2e-v2/cases/simple/mtls/e2e.yaml
          - name: Virtual Gateway
            config: test/e2e-v2/cases/gateway/e2e.yaml
          - name: Meter
            config: test/e2e-v2/cases/meter/e2e.yaml
          - name: VM Zabbix
            config: test/e2e-v2/cases/vm/zabbix/e2e.yaml
          - name: VM Prometheus
            config: test/e2e-v2/cases/vm/prometheus-node-exporter/e2e.yaml
617 618
          - name: VM Telegraf
            config: test/e2e-v2/cases/vm/telegraf/e2e.yaml
619 620
          - name: So11y
            config: test/e2e-v2/cases/so11y/e2e.yaml
621 622
          - name: MySQL Prometheus and slowsql
            config: test/e2e-v2/cases/mysql/mysql-slowsql/e2e.yaml
Y
yswdqz 已提交
623 624
          - name: PostgreSQL Prometheus
            config: test/e2e-v2/cases/postgresql/postgres-exporter/e2e.yaml
625 626
          - name: MariaDB Prometheus and slowsql
            config: test/e2e-v2/cases/mariadb/mariadb-slowsql/e2e.yaml
627 628 629 630

          - name: Rover with Istio Process 1.13.1
            config: test/e2e-v2/cases/rover/process/istio/e2e.yaml
            env: ISTIO_VERSION=1.13.1
631
            runs-on: ubuntu-20.04
632 633 634

          - name: Zipkin ES
            config: test/e2e-v2/cases/zipkin/es/e2e.yaml
635 636
          - name: Zipkin ES Sharding
            config: test/e2e-v2/cases/zipkin/es/es-sharding/e2e.yaml
637 638
          - name: Zipkin MySQL
            config: test/e2e-v2/cases/zipkin/mysql/e2e.yaml
639 640 641 642 643 644
          - name: Zipkin Opensearch
            config: test/e2e-v2/cases/zipkin/opensearch/e2e.yaml
          - name: Zipkin H2
            config: test/e2e-v2/cases/zipkin/h2/e2e.yaml
          - name: Zipkin Postgres
            config: test/e2e-v2/cases/zipkin/postgres/e2e.yaml
645 646
          - name: Zipkin Kafka
            config: test/e2e-v2/cases/zipkin/kafka/e2e.yaml
647 648
          - name: Zipkin BanyanDB
            config: test/e2e-v2/cases/zipkin/banyandb/e2e.yaml
649 650 651 652 653 654 655 656 657

          - name: MySQL-Sharding storage
            config: test/e2e-v2/cases/storage/mysql/sharding/e2e.yaml
          - name: MySQL-Sharding log
            config: test/e2e-v2/cases/log/mysql/sharding/e2e.yaml
          - name: MySQL-Sharding browser
            config: test/e2e-v2/cases/browser/mysql/sharding/e2e.yaml
          - name: MySQL-Sharding zipkin
            config: test/e2e-v2/cases/zipkin/mysql/sharding/e2e.yaml
P
pg.yang 已提交
658 659
          - name: APISIX metrics
            config: test/e2e-v2/cases/apisix/otel-collector/e2e.yaml
660 661
          - name: Exporter Kafka
            config: test/e2e-v2/cases/exporter/kafka/e2e.yaml
662 663
          - name: Virtual MQ
            config: test/e2e-v2/cases/virtual-mq/e2e.yaml
664 665
          - name: AWS Cloud EKS
            config: test/e2e-v2/cases/aws/eks/e2e.yaml
M
Mike 已提交
666 667
          - name: Windows
            config: test/e2e-v2/cases/win/e2e.yaml
668
    steps:
669
      - uses: actions/checkout@v3
670 671
        with:
          submodules: true
672
      - uses: actions/download-artifact@v3
673 674
        name: Download docker images
        with:
675
          name: docker-images-11
676 677 678 679 680 681 682 683 684 685
          path: docker-images
      - name: Load docker images
        run: find docker-images -name "*.tar" -exec docker load -i {} \;
      - name: Prepare test services
        shell: bash
        run: ./mvnw -B -f test/e2e-v2/java-test-service/pom.xml clean package
      - name: Set env var
        run: |
          echo "${{ matrix.test.env }}"  >> $GITHUB_ENV
      - name: ${{ matrix.test.name }}
686
        uses: apache/skywalking-infra-e2e@964ede199fe199e166920169dc5f8c9b214cfac5
687 688
        with:
          e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
689 690 691 692 693 694
      - uses: actions/upload-artifact@v2
        if: ${{ failure() }}
        name: Upload Logs
        with:
          name: logs
          path: "${{ env.SW_INFRA_E2E_LOG_DIR }}"
695 696

  e2e-test-istio:
697
    if: |
698
      ( always() && ! cancelled() ) &&
699
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
700
    name: E2E test
701
    needs: [docker]
702
    runs-on: ubuntu-20.04
703 704 705 706
    timeout-minutes: 60
    strategy:
      fail-fast: false
      matrix:
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722
        analyzer: [k8s-mesh, mx-mesh]
        versions:
          - istio: 1.7.1
            kubernetes: 18
          - istio: 1.8.2
            kubernetes: 19
          - istio: 1.9.1
            kubernetes: 19
          - istio: 1.10.3
            kubernetes: 19
          - istio: 1.11.4
            kubernetes: 19
          - istio: 1.12.0
            kubernetes: 19
          - istio: 1.13.1
            kubernetes: 20
723 724 725 726
          - istio: 1.14.4
            kubernetes: 20
          - istio: 1.15.0
            kubernetes: 20
727 728
          - istio: 1.16.0
            kubernetes: 20
729

730
    steps:
731
      - uses: actions/checkout@v3
732 733
        with:
          submodules: true
734
      - uses: actions/download-artifact@v3
735 736
        name: Download docker images
        with:
737
          name: docker-images-11
738 739 740 741
          path: docker-images
      - name: Load docker images
        run: find docker-images -name "*.tar" -exec docker load -i {} \;
      - name: ${{ matrix.test.name }}
742
        uses: apache/skywalking-infra-e2e@964ede199fe199e166920169dc5f8c9b214cfac5
743
        env:
744 745
          ISTIO_VERSION: ${{ matrix.versions.istio }}
          KUBERNETES_VERSION: ${{ matrix.versions.kubernetes }}
746 747 748 749 750
          ALS_ANALYZER: ${{ matrix.analyzer }}
        with:
          e2e-file: $GITHUB_WORKSPACE/test/e2e-v2/cases/istio/als/e2e.yaml

  e2e-test-java-versions:
751
    if: |
752
      ( always() && ! cancelled() ) &&
753
      ((github.event_name == 'schedule' && github.repository == 'apache/skywalking') || needs.changes.outputs.oap == 'true')
754
    name: E2E test
755
    needs: [docker]
756 757 758 759 760
    runs-on: ubuntu-latest
    timeout-minutes: 60
    strategy:
      fail-fast: false
      matrix:
761
        java-version: [11, 17]
762
    steps:
763
      - uses: actions/checkout@v3
764 765
        with:
          submodules: true
766
      - uses: actions/download-artifact@v3
767 768 769 770 771 772
        name: Download docker images
        with:
          name: docker-images-${{ matrix.java-version }}
          path: docker-images
      - name: Load docker images
        run: find docker-images -name "*.tar" -exec docker load -i {} \;
773
      - uses: actions/setup-java@v3
774 775
        with:
          java-version: ${{ matrix.java-version }}
776
          distribution: temurin
777 778 779 780
      - name: Prepare test services
        shell: bash
        run: ./mvnw -B -f test/e2e-v2/java-test-service/pom.xml clean package
      - name: Java version ${{ matrix.java-version }}
781
        uses: apache/skywalking-infra-e2e@964ede199fe199e166920169dc5f8c9b214cfac5
782 783 784 785 786 787 788 789
        env:
          SW_AGENT_JDK_VERSION: ${{ matrix.java-version }}
        with:
          e2e-file: $GITHUB_WORKSPACE/test/e2e-v2/cases/simple/jdk/e2e.yaml

  required:
    if: always()
    name: Required
790 791 792 793
    needs:
      - dependency-license
      - unit-test
      - integration-test
794
      - slow-integration-test
795 796 797
      - e2e-test
      - e2e-test-istio
      - e2e-test-java-versions
798 799 800 801
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - name: Merge Requirement
802
        # check changes, sanity, dependency license, unit, integration, e2e, e2e-istio and e2e-java-versions,
803
        # if all of them are working as expected then naturally exits else return error code
804
        run: |
805 806 807 808 809 810 811 812
          execute=${{ needs.changes.outputs.oap }}

          sanityResults=${{ needs.dependency-license.result }}
          [[ ${sanityResults} == 'success' ]] || [[ ${execute} != 'true' && ${sanityResults} == 'skipped' ]] || exit -1;

          depLicenseResults=${{ needs.dependency-license.result }}
          unitResults=${{ needs.unit-test.result }};
          integrationResults=${{ needs.integration-test.result }};
813
          timeConsumingITResults=${{ needs.slow-integration-test.result }};
814 815 816 817 818 819 820 821 822 823
          e2eResults=${{ needs.e2e-test.result }};
          e2eIstioResults=${{ needs.e2e-test-istio.result }};
          e2eJavaVersionResults=${{ needs.e2e-test-java-versions.result }};

          [[ ${depLicenseResults} == 'success' ]] || [[ ${execute} != 'true' && ${depLicenseResults} == 'skipped' ]] || exit -2;
          [[ ${unitResults} == 'success' ]] || [[ ${execute} != 'true' && ${unitResults} == 'skipped' ]] || exit -3;
          [[ ${integrationResults} == 'success' ]] || [[ ${execute} != 'true' && ${integrationResults} == 'skipped' ]] || exit -4;
          [[ ${e2eResults} == 'success' ]] || [[ ${execute} != 'true' && ${e2eResults} == 'skipped' ]] || exit -5;
          [[ ${e2eIstioResults} == 'success' ]] || [[ ${execute} != 'true' && ${e2eIstioResults} == 'skipped' ]] || exit -6;
          [[ ${e2eJavaVersionResults} == 'success' ]] || [[ ${execute} != 'true' && ${e2eJavaVersionResults} == 'skipped' ]] || exit -7;
824
          [[ ${timeConsumingITResults} == 'success' ]] || [[ ${execute} != 'true' && ${timeConsumingITResults} == 'skipped' ]] || exit -8;
825 826

          exit 0;