github.com/kubeshop/testkube@v1.17.23/.github/workflows/docker-build-develop.yaml (about) 1 name: Docker images build develop 2 on: 3 push: 4 branches: 5 - develop 6 paths-ignore: 7 - 'docs/**' 8 env: 9 ALPINE_IMAGE: alpine:3.19.0 10 BUSYBOX_IMAGE: busybox:1.36.1-musl 11 GO_VERSION: 1.21.5 12 13 jobs: 14 api: 15 runs-on: ubuntu-latest 16 steps: 17 - name: Checkout 18 uses: actions/checkout@v4 19 20 - name: Set up Docker Buildx 21 id: buildx 22 uses: docker/setup-buildx-action@v1 23 24 - name: Set-up Go 25 uses: actions/setup-go@v4 26 with: 27 go-version: ${{ env.GO_VERSION }} 28 cache: false 29 30 - name: Go Cache 31 uses: actions/cache@v2 32 with: 33 path: | 34 ~/go/pkg/mod 35 ~/.cache/go-build 36 key: testkube-api-go-${{ hashFiles('**/go.sum') }} 37 38 - name: Login to DockerHub 39 uses: docker/login-action@v1 40 with: 41 username: ${{ secrets.DOCKERHUB_USERNAME }} 42 password: ${{ secrets.DOCKERHUB_TOKEN }} 43 44 - id: commit 45 uses: prompt/actions-commit-hash@v3 46 47 - name: Release 48 uses: goreleaser/goreleaser-action@v4 49 with: 50 distribution: goreleaser 51 version: latest 52 args: release -f goreleaser_files/.goreleaser-docker-build-api.yml --snapshot 53 env: 54 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 55 ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}} 56 ANALYTICS_API_KEY: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_SECRET}} 57 SLACK_BOT_CLIENT_ID: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_ID}} 58 SLACK_BOT_CLIENT_SECRET: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_SECRET}} 59 SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_SEGMENTIO_KEY}} 60 CLOUD_SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_CLOUD_SEGMENTIO_KEY}} 61 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 62 DOCKER_BUILDX_CACHE_FROM: "type=gha" 63 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 64 ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} 65 BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }} 66 IMAGE_TAG_SHA: true 67 68 - name: Push Docker images 69 run: | 70 docker push kubeshop/testkube-api-server:${{ steps.commit.outputs.short }} 71 72 testworkflow-init: 73 runs-on: ubuntu-latest 74 steps: 75 - name: Checkout 76 uses: actions/checkout@v4 77 78 - name: Set up Docker Buildx 79 id: buildx 80 uses: docker/setup-buildx-action@v1 81 82 - name: Set-up Go 83 uses: actions/setup-go@v4 84 with: 85 go-version: ${{ env.GO_VERSION }} 86 cache: false 87 88 - name: Go Cache 89 uses: actions/cache@v2 90 with: 91 path: | 92 ~/go/pkg/mod 93 ~/.cache/go-build 94 key: testkube-tw-init-go-${{ hashFiles('**/go.sum') }} 95 96 - name: Login to DockerHub 97 uses: docker/login-action@v1 98 with: 99 username: ${{ secrets.DOCKERHUB_USERNAME }} 100 password: ${{ secrets.DOCKERHUB_TOKEN }} 101 102 - id: commit 103 uses: prompt/actions-commit-hash@v3 104 105 - name: Release 106 uses: goreleaser/goreleaser-action@v4 107 with: 108 distribution: goreleaser 109 version: latest 110 args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow-init.yml --snapshot 111 env: 112 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 113 ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}} 114 ANALYTICS_API_KEY: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_SECRET}} 115 SLACK_BOT_CLIENT_ID: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_ID}} 116 SLACK_BOT_CLIENT_SECRET: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_SECRET}} 117 SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_SEGMENTIO_KEY}} 118 CLOUD_SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_CLOUD_SEGMENTIO_KEY}} 119 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 120 DOCKER_BUILDX_CACHE_FROM: "type=gha" 121 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 122 ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} 123 BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }} 124 IMAGE_TAG_SHA: true 125 126 - name: Push Docker images 127 run: | 128 docker push kubeshop/testkube-tw-init:${{ steps.commit.outputs.short }} 129 130 testworkflow-toolkit: 131 runs-on: ubuntu-latest 132 steps: 133 - name: Checkout 134 uses: actions/checkout@v4 135 136 - name: Set up Docker Buildx 137 id: buildx 138 uses: docker/setup-buildx-action@v1 139 140 - name: Set-up Go 141 uses: actions/setup-go@v4 142 with: 143 go-version: ${{ env.GO_VERSION }} 144 cache: false 145 146 - name: Go Cache 147 uses: actions/cache@v2 148 with: 149 path: | 150 ~/go/pkg/mod 151 ~/.cache/go-build 152 key: testkube-tw-toolkit-go-${{ hashFiles('**/go.sum') }} 153 154 - name: Login to DockerHub 155 uses: docker/login-action@v1 156 with: 157 username: ${{ secrets.DOCKERHUB_USERNAME }} 158 password: ${{ secrets.DOCKERHUB_TOKEN }} 159 160 - id: commit 161 uses: prompt/actions-commit-hash@v3 162 163 - name: Release 164 uses: goreleaser/goreleaser-action@v4 165 with: 166 distribution: goreleaser 167 version: latest 168 args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow-toolkit.yml --snapshot 169 env: 170 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 171 ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}} 172 ANALYTICS_API_KEY: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_SECRET}} 173 SLACK_BOT_CLIENT_ID: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_ID}} 174 SLACK_BOT_CLIENT_SECRET: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_SECRET}} 175 SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_SEGMENTIO_KEY}} 176 CLOUD_SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_CLOUD_SEGMENTIO_KEY}} 177 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 178 DOCKER_BUILDX_CACHE_FROM: "type=gha" 179 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 180 ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} 181 BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }} 182 IMAGE_TAG_SHA: true 183 184 - name: Push Docker images 185 run: | 186 docker push kubeshop/testkube-tw-toolkit:${{ steps.commit.outputs.short }} 187 188 single_executor: 189 strategy: 190 matrix: 191 executor: [artillery, curl, example, ginkgo, k6, kubepug, postman, soapui, init, scraper, template, tracetest, zap ] 192 193 runs-on: ubuntu-latest 194 steps: 195 - name: Checkout 196 uses: actions/checkout@v4 197 198 - name: Set up Docker Buildx 199 id: buildx 200 uses: docker/setup-buildx-action@v1 201 202 - name: Set-up Go 203 uses: actions/setup-go@v4 204 with: 205 go-version: ${{ env.GO_VERSION }} 206 cache: false 207 208 - name: Go Cache 209 uses: actions/cache@v2 210 with: 211 path: | 212 ~/go/pkg/mod 213 ~/.cache/go-build 214 key: ${{ matrix.executor }}-go-${{ hashFiles('**/go.sum') }} 215 restore-keys: | 216 ${{ runner.os }}-go- 217 218 - id: commit 219 uses: prompt/actions-commit-hash@v3 220 221 - name: Login to DockerHub 222 uses: docker/login-action@v1 223 with: 224 username: ${{ secrets.DOCKERHUB_USERNAME }} 225 password: ${{ secrets.DOCKERHUB_TOKEN }} 226 227 - name: Release 228 uses: goreleaser/goreleaser-action@v4 229 with: 230 distribution: goreleaser 231 version: latest 232 args: release -f goreleaser_files/.goreleaser-docker-build-executor.yml --snapshot 233 env: 234 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 235 EXECUTOR: ${{ matrix.executor }} 236 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 237 DOCKER_BUILDX_CACHE_FROM: "type=gha" 238 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 239 ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }} 240 BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }} 241 IMAGE_TAG_SHA: true 242 243 - name: Push Docker images 244 run: | 245 docker push kubeshop/testkube-${{ matrix.executor }}-executor:${{ steps.commit.outputs.short }} 246 247 executor_jmeter: 248 runs-on: ubuntu-latest 249 steps: 250 251 - name: Checkout 252 uses: actions/checkout@v4 253 254 - name: Set up Docker Buildx 255 id: buildx 256 uses: docker/setup-buildx-action@v1 257 258 - name: Set-up Go 259 uses: actions/setup-go@v4 260 with: 261 go-version: ${{ env.GO_VERSION }} 262 cache: false 263 264 - name: Go Cache 265 uses: actions/cache@v2 266 with: 267 path: | 268 ~/go/pkg/mod 269 ~/.cache/go-build 270 key: jmeter-go-${{ hashFiles('**/go.sum') }} 271 restore-keys: | 272 ${{ runner.os }}-go- 273 274 - name: Login to DockerHub 275 uses: docker/login-action@v1 276 with: 277 username: ${{ secrets.DOCKERHUB_USERNAME }} 278 password: ${{ secrets.DOCKERHUB_TOKEN }} 279 280 - id: commit 281 uses: prompt/actions-commit-hash@v3 282 283 - name: Release 284 uses: goreleaser/goreleaser-action@v4 285 with: 286 distribution: goreleaser 287 version: latest 288 args: release -f goreleaser_files/.goreleaser-docker-build-executor-jmeter.yml --snapshot 289 env: 290 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 291 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 292 DOCKER_BUILDX_CACHE_FROM: "type=gha" 293 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 294 IMAGE_TAG_SHA: true 295 296 - name: Push Docker images 297 run: | 298 docker push kubeshop/testkube-jmeter-executor:${{ steps.commit.outputs.short }} 299 300 executor_jmeterd: 301 runs-on: ubuntu-latest 302 steps: 303 304 - name: Checkout 305 uses: actions/checkout@v2 306 307 - name: Set up Docker Buildx 308 id: buildx 309 uses: docker/setup-buildx-action@v1 310 311 - name: Set-up Go 312 uses: actions/setup-go@v4 313 with: 314 go-version: ${{ env.GO_VERSION }} 315 cache: false 316 317 - name: Go Cache 318 uses: actions/cache@v2 319 with: 320 path: | 321 ~/go/pkg/mod 322 ~/.cache/go-build 323 key: jmeterd-go-${{ hashFiles('**/go.sum') }} 324 restore-keys: | 325 ${{ runner.os }}-go- 326 327 - name: Login to DockerHub 328 uses: docker/login-action@v1 329 with: 330 username: ${{ secrets.DOCKERHUB_USERNAME }} 331 password: ${{ secrets.DOCKERHUB_TOKEN }} 332 333 - id: commit 334 uses: prompt/actions-commit-hash@v3 335 336 - name: Release 337 uses: goreleaser/goreleaser-action@v4 338 with: 339 distribution: goreleaser 340 version: latest 341 args: release -f goreleaser_files/.goreleaser-docker-build-executor-jmeterd.yml --clean --snapshot 342 env: 343 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 344 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 345 DOCKER_BUILDX_CACHE_FROM: "type=gha" 346 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 347 IMAGE_TAG_SHA: true 348 349 - name: Push Docker images 350 run: | 351 docker push kubeshop/testkube-jmeterd-executor:${{ steps.commit.outputs.short }} 352 353 jmeterd_slave: 354 runs-on: ubuntu-latest 355 steps: 356 - name: Checkout 357 uses: actions/checkout@v4 358 359 - name: Set up Docker Buildx 360 id: buildx 361 uses: docker/setup-buildx-action@v1 362 363 - name: Docker Cache 364 uses: actions/cache@v2 365 with: 366 path: /tmp/.buildx-cache 367 key: ${{ runner.os }}-buildx-${{ github.sha }} 368 restore-keys: | 369 ${{ runner.os }}-buildx- 370 371 - id: commit 372 uses: prompt/actions-commit-hash@v3 373 374 - name: Login to DockerHub 375 uses: docker/login-action@v1 376 with: 377 username: ${{ secrets.DOCKERHUB_USERNAME }} 378 password: ${{ secrets.DOCKERHUB_TOKEN }} 379 380 - name: Build and push 381 uses: docker/build-push-action@v5 382 with: 383 context: . 384 file: ./contrib/executor/jmeterd/build/slaves/Dockerfile 385 push: true 386 tags: kubeshop/testkube-jmeterd-slave:${{ steps.commit.outputs.short }} 387 platforms: linux/amd64,linux/arm64 388 389 executor_maven: 390 runs-on: ubuntu-latest 391 steps: 392 - name: Checkout 393 uses: actions/checkout@v4 394 395 - name: Set up Docker Buildx 396 id: buildx 397 uses: docker/setup-buildx-action@v1 398 399 - name: Set-up Go 400 uses: actions/setup-go@v4 401 with: 402 go-version: ${{ env.GO_VERSION }} 403 cache: false 404 405 - name: Go Cache 406 uses: actions/cache@v2 407 with: 408 path: | 409 ~/go/pkg/mod 410 ~/.cache/go-build 411 key: maven-go-${{ hashFiles('**/go.sum') }} 412 restore-keys: | 413 ${{ runner.os }}-go- 414 415 - name: Login to DockerHub 416 uses: docker/login-action@v1 417 with: 418 username: ${{ secrets.DOCKERHUB_USERNAME }} 419 password: ${{ secrets.DOCKERHUB_TOKEN }} 420 421 - id: commit 422 uses: prompt/actions-commit-hash@v3 423 424 - name: Release 425 uses: goreleaser/goreleaser-action@v4 426 with: 427 distribution: goreleaser 428 version: latest 429 args: release -f goreleaser_files/.goreleaser-docker-build-executor-maven.yml --snapshot 430 env: 431 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 432 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 433 DOCKER_BUILDX_CACHE_FROM: "type=gha" 434 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 435 IMAGE_TAG_SHA: true 436 437 - name: Push Docker images 438 run: | 439 docker push kubeshop/testkube-maven-executor:${{ steps.commit.outputs.short }} 440 441 executor_gradle: 442 runs-on: ubuntu-latest 443 steps: 444 - name: Checkout 445 uses: actions/checkout@v4 446 447 - name: Set up Docker Buildx 448 id: buildx 449 uses: docker/setup-buildx-action@v1 450 451 - name: Set-up Go 452 uses: actions/setup-go@v4 453 with: 454 go-version: ${{ env.GO_VERSION }} 455 cache: false 456 457 - name: Go Cache 458 uses: actions/cache@v2 459 with: 460 path: | 461 ~/go/pkg/mod 462 ~/.cache/go-build 463 key: gradle-go-${{ hashFiles('**/go.sum') }} 464 restore-keys: | 465 ${{ runner.os }}-go- 466 467 - name: Login to DockerHub 468 uses: docker/login-action@v1 469 with: 470 username: ${{ secrets.DOCKERHUB_USERNAME }} 471 password: ${{ secrets.DOCKERHUB_TOKEN }} 472 473 - id: commit 474 uses: prompt/actions-commit-hash@v3 475 476 - name: Release 477 uses: goreleaser/goreleaser-action@v4 478 with: 479 distribution: goreleaser 480 version: latest 481 args: release -f goreleaser_files/.goreleaser-docker-build-executor-gradle.yml --snapshot 482 env: 483 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 484 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 485 DOCKER_BUILDX_CACHE_FROM: "type=gha" 486 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 487 IMAGE_TAG_SHA: true 488 489 - name: Push Docker images 490 run: | 491 docker push kubeshop/testkube-gradle-executor:${{ steps.commit.outputs.short }} 492 493 executor_cypress: 494 runs-on: ubuntu-latest 495 steps: 496 - name: Checkout 497 uses: actions/checkout@v4 498 499 - name: Set up Docker Buildx 500 id: buildx 501 uses: docker/setup-buildx-action@v1 502 503 - name: Set-up Go 504 uses: actions/setup-go@v4 505 with: 506 go-version: ${{ env.GO_VERSION }} 507 cache: false 508 509 - name: Go Cache 510 uses: actions/cache@v2 511 with: 512 path: | 513 ~/go/pkg/mod 514 ~/.cache/go-build 515 key: cypress-go-${{ hashFiles('**/go.sum') }} 516 restore-keys: | 517 ${{ runner.os }}-go- 518 519 - name: Login to DockerHub 520 uses: docker/login-action@v1 521 with: 522 username: ${{ secrets.DOCKERHUB_USERNAME }} 523 password: ${{ secrets.DOCKERHUB_TOKEN }} 524 525 - id: commit 526 uses: prompt/actions-commit-hash@v3 527 528 - name: Release 529 uses: goreleaser/goreleaser-action@v4 530 with: 531 distribution: goreleaser 532 version: latest 533 args: release -f goreleaser_files/.goreleaser-docker-build-executor-cypress-commit-only.yml --snapshot 534 env: 535 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 536 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 537 DOCKER_BUILDX_CACHE_FROM: "type=gha" 538 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 539 540 - name: Push image to the Registry 541 run: | 542 docker push kubeshop/testkube-cypress-executor:${{ steps.commit.outputs.short }} 543 544 executor_playwright: 545 runs-on: ubuntu-latest 546 steps: 547 - name: Checkout 548 uses: actions/checkout@v4 549 550 - name: Set up Docker Buildx 551 id: buildx 552 uses: docker/setup-buildx-action@v1 553 554 - name: Set-up Go 555 uses: actions/setup-go@v4 556 with: 557 go-version: ${{ env.GO_VERSION }} 558 cache: false 559 560 - name: Go Cache 561 uses: actions/cache@v2 562 with: 563 path: | 564 ~/go/pkg/mod 565 ~/.cache/go-build 566 key: playwright-go-${{ hashFiles('**/go.sum') }} 567 restore-keys: | 568 ${{ runner.os }}-go- 569 570 - name: Login to DockerHub 571 uses: docker/login-action@v1 572 with: 573 username: ${{ secrets.DOCKERHUB_USERNAME }} 574 password: ${{ secrets.DOCKERHUB_TOKEN }} 575 576 - id: commit 577 uses: prompt/actions-commit-hash@v3 578 579 - name: Release 580 uses: goreleaser/goreleaser-action@v4 581 with: 582 distribution: goreleaser 583 version: latest 584 args: release -f goreleaser_files/.goreleaser-docker-build-executor-playwright.yml --snapshot 585 env: 586 GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }} 587 DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}" 588 DOCKER_BUILDX_CACHE_FROM: "type=gha" 589 DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max" 590 IMAGE_TAG_SHA: true 591 592 - name: Push image to the Registry 593 run: | 594 docker push kubeshop/testkube-playwright-executor:${{ steps.commit.outputs.short }} 595 596 workflow_dispatch: 597 needs: [api, single_executor, executor_jmeter, executor_jmeterd, jmeterd_slave, executor_maven, executor_gradle, executor_cypress, executor_playwright] 598 runs-on: ubuntu-latest 599 steps: 600 - name: Checkout 601 uses: actions/checkout@v2 602 603 - name: Get commit sha 604 id: github_sha 605 run: echo "::set-output name=sha_short::${GITHUB_SHA::7}" 606 607 - name: Repository Dispatch 608 uses: peter-evans/repository-dispatch@v2 609 with: 610 token: ${{ secrets.CI_BOT_TOKEN }} 611 repository: kubeshop/helm-charts 612 event-type: trigger-workflow-api-develop 613 client-payload: '{"image_tag_api": "${{ steps.github_sha.outputs.sha_short }}"}'