github.com/influxdata/influxdb/v2@v2.7.6/.circleci/config.yml (about) 1 version: "2.1" 2 3 orbs: 4 aws-s3: circleci/aws-s3@2.0.0 5 terraform: circleci/terraform@2.1.0 6 7 parameters: 8 cross-container-tag: 9 type: string 10 default: go1.21.9-latest 11 12 workflow: 13 type: string 14 default: build 15 16 executors: 17 cross-builder: 18 docker: 19 # NOTE: To upgrade the Go version, first push the upgrade to the cross-builder Dockerfile 20 # in the edge repo, then update the version here to match. 21 - image: quay.io/influxdb/cross-builder:<< pipeline.parameters.cross-container-tag >> 22 resource_class: large 23 linux-amd64: 24 machine: 25 image: ubuntu-2204:current 26 resource_class: large 27 linux-arm64: 28 machine: 29 image: ubuntu-2204:current 30 resource_class: arm.large 31 darwin: 32 resource_class: macos.m1.medium.gen1 33 macos: 34 xcode: 15.0.0 35 shell: /bin/bash -eo pipefail 36 windows: 37 machine: 38 image: windows-server-2019-vs2019:stable 39 resource_class: windows.medium 40 shell: bash.exe -eo pipefail 41 42 # Unlike when a commit is pushed to a branch, CircleCI does not automatically 43 # execute a workflow when a tag is pushed to a repository. These filters 44 # allow the corresponding workflow to execute on any branch or tag. 45 any_filter: &any_filter 46 filters: 47 tags: 48 only: /.*/ 49 branches: 50 only: /.*/ 51 52 release_filter: &release_filter 53 filters: 54 tags: 55 # This regex matches what is found in 'scripts/get-version' with the 56 # '[[:digit:]]' transformed into '\d'. This also excludes release 57 # candidate detection, because this filter only matches against 58 # full releases. 59 only: /^v(\d+)(?:\.(\d+))?(?:\.(\d+))?$/ 60 branches: 61 ignore: /.*/ 62 63 nofork_filter: &nofork_filter 64 filters: 65 branches: 66 ignore: /pull\/[0-9]+/ 67 68 69 workflows: 70 version: 2 71 build: 72 when: 73 equal: [ << pipeline.parameters.workflow >>, build ] 74 jobs: 75 - test-race: 76 <<: *any_filter 77 - test-build: 78 <<: *any_filter 79 name: test-build-<< matrix.os >>-<< matrix.arch >> 80 matrix: 81 parameters: 82 os: [ linux, darwin, windows ] 83 arch: [ amd64, arm64 ] 84 exclude: 85 - { os: darwin, arch: arm64 } 86 - { os: windows, arch: arm64 } 87 # linux/amd64 can be tested directly from our cross-builder image 88 # to save time & enable running with the race detector. 89 - { os: linux, arch: amd64 } 90 - test-prebuilt: 91 <<: *any_filter 92 name: test-linux-arm64 93 executor: linux-arm64 94 requires: 95 - test-build-linux-arm64 96 - test-prebuilt: 97 <<: *any_filter 98 name: test-darwin 99 executor: darwin 100 requires: 101 - test-build-darwin-amd64 102 - test-prebuilt: 103 <<: *any_filter 104 name: test-windows 105 executor: windows 106 requires: 107 - test-build-windows-amd64 108 - fluxtest: 109 <<: *any_filter 110 - tlstest: 111 <<: *any_filter 112 - lint: 113 <<: *any_filter 114 - build: 115 <<: *any_filter 116 name: build-<< matrix.os >>-<< matrix.arch >> 117 build-type: snapshot 118 matrix: 119 parameters: 120 os: [ linux, darwin, windows ] 121 arch: [ amd64, arm64 ] 122 exclude: 123 - { os: darwin, arch: arm64 } 124 - { os: windows, arch: arm64 } 125 - build-packages: 126 <<: *any_filter 127 requires: 128 - build-linux-amd64 129 - build-linux-arm64 130 - build-darwin-amd64 131 - build-windows-amd64 132 - check_package_deb_amd64: 133 requires: 134 - build-packages 135 - check_package_deb_arm64: 136 requires: 137 - build-packages 138 - check_package_rpm: 139 <<: *nofork_filter 140 name: 141 check_package_rpm-<< matrix.arch >> 142 matrix: 143 parameters: 144 arch: [ x86_64, aarch64 ] 145 requires: 146 - build-packages 147 - test-downgrade: 148 <<: *any_filter 149 requires: 150 - build-linux-amd64 151 - e2e-monitor-ci: 152 <<: *nofork_filter 153 requires: 154 - build-linux-amd64 155 - test-linux-packages: 156 <<: *nofork_filter 157 requires: 158 - build-packages 159 - sign-packages: 160 <<: *release_filter 161 requires: 162 - build-packages 163 - s3-publish-packages: 164 <<: *release_filter 165 requires: 166 - test-linux-packages 167 - build-packages 168 - sign-packages 169 - changelog: 170 <<: *release_filter 171 workflow: release 172 - changelog-upload: 173 <<: *release_filter 174 workflow: release 175 requires: 176 - changelog 177 - perf-test: 178 record_results: true 179 requires: 180 - build-packages 181 filters: 182 branches: 183 only: 184 - master 185 - grace-test: 186 <<: *any_filter 187 requires: 188 - build-linux-amd64 189 - litmus-smoke-test: 190 <<: *any_filter 191 requires: 192 - build-linux-amd64 193 - litmus-full-test: 194 requires: 195 - build-linux-amd64 196 filters: 197 branches: 198 only: master 199 - share-testing-image: 200 filters: 201 branches: 202 only: 203 - master 204 requires: 205 - e2e-monitor-ci 206 207 aws-destroy-daily: 208 triggers: 209 - schedule: 210 # run every day at 10pm -- note: use spaces, not tabs 211 cron: "0 22 * * *" 212 filters: 213 branches: 214 only: 215 - "master" 216 jobs: 217 - aws-destroy-by-date 218 219 nightly: 220 when: 221 and: 222 # This requires a pipeline trigger with a custom "workflow" parameter 223 # set to "nightly". Since we want to trigger this workflow on several 224 # branches, we cannot use the trigger name as suggested by the 225 # documentation. 226 # 227 # For more information: 228 # https://circleci.com/docs/scheduled-pipelines/ 229 - equal: [ << pipeline.trigger_source >>, scheduled_pipeline ] 230 - equal: [ << pipeline.parameters.workflow >>, nightly ] 231 jobs: 232 - changelog: 233 workflow: nightly 234 - changelog-upload: 235 workflow: nightly 236 requires: 237 - changelog 238 - test-race 239 - test-build: 240 name: test-build-<< matrix.os >>-<< matrix.arch >> 241 matrix: 242 parameters: 243 os: [ linux, darwin, windows ] 244 arch: [ amd64, arm64 ] 245 exclude: 246 - { os: darwin, arch: arm64 } 247 - { os: windows, arch: arm64 } 248 # linux/amd64 can be tested directly from our cross-builder image 249 # to save time & enable running with the race detector. 250 - { os: linux, arch: amd64 } 251 - test-prebuilt: 252 name: test-linux-arm64 253 executor: linux-arm64 254 requires: 255 - test-build-linux-arm64 256 - test-prebuilt: 257 name: test-darwin 258 executor: darwin 259 requires: 260 - test-build-darwin-amd64 261 - test-prebuilt: 262 name: test-windows 263 executor: windows 264 requires: 265 - test-build-windows-amd64 266 - lint 267 - fluxtest 268 - tlstest 269 - build: 270 name: build-nightly-<< matrix.os >>-<< matrix.arch >> 271 build-type: nightly 272 matrix: 273 parameters: 274 os: [ linux, darwin, windows ] 275 arch: [ amd64, arm64 ] 276 exclude: 277 - { os: darwin, arch: arm64 } 278 - { os: windows, arch: arm64 } 279 - build-docker-nightly: 280 name: build-docker-nightly-arm64 281 resource_class: arm.medium 282 arch: arm64 283 arch_docker: arm64v8 284 requires: 285 - build-nightly-linux-arm64 286 - build-docker-nightly: 287 name: build-docker-nightly-amd64 288 resource_class: medium 289 arch: amd64 290 arch_docker: amd64 291 requires: 292 - build-nightly-linux-amd64 293 - docker-nightly-manifest: 294 requires: 295 - build-docker-nightly-amd64 296 - build-docker-nightly-arm64 297 - build-packages: 298 requires: 299 - build-nightly-linux-amd64 300 - build-nightly-linux-arm64 301 - build-nightly-darwin-amd64 302 - build-nightly-windows-amd64 303 - litmus-full-test: 304 requires: 305 - build-nightly-linux-amd64 306 - grace-test: 307 requires: 308 - build-nightly-linux-amd64 309 310 commands: 311 quay_login: 312 steps: 313 - run: 314 name: Log in to Quay 315 command: docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io 316 317 jobs: 318 lint: 319 executor: cross-builder 320 steps: 321 - checkout 322 - run: 323 name: Check go version 324 command: ./scripts/ci/check-system-go-matches-go-mod.sh 325 when: always 326 - run: 327 name: Check flag generation 328 command: ./scripts/ci/lint/flags.bash 329 when: always 330 - run: 331 name: Check SQL migrations 332 command: make checksqlmigrations 333 when: always 334 - run: 335 name: Check formatting 336 command: make checkfmt 337 when: always 338 - run: 339 name: Check codegen 340 command: make checkgenerate 341 when: always 342 - run: 343 name: vet 344 command: make vet 345 when: always 346 - run: 347 name: staticcheck 348 command: | 349 go install honnef.co/go/tools/cmd/staticcheck 350 staticcheck ./... 351 when: always 352 353 test-race: 354 executor: cross-builder 355 parallelism: 8 356 steps: 357 - checkout 358 - run: 359 name: Run race tests 360 command: ./scripts/ci/run-race-tests.sh $(pwd)/test-results 361 - store_test_results: 362 path: ./test-results 363 - store_artifacts: 364 path: ./test-results 365 destination: raw-test-results 366 367 test-build: 368 executor: cross-builder 369 resource_class: large 370 parameters: 371 os: 372 type: string 373 arch: 374 type: string 375 steps: 376 - checkout 377 - run: 378 name: Build test binaries 379 environment: 380 GOOS: << parameters.os >> 381 GOARCH: << parameters.arch >> 382 command: ./scripts/ci/build-tests.sh ./test-bin 383 - persist_to_workspace: 384 root: . 385 paths: 386 - test-bin 387 388 test-prebuilt: 389 parameters: 390 executor: 391 type: executor 392 executor: << parameters.executor >> 393 parallelism: 8 394 steps: 395 - checkout 396 - attach_workspace: 397 at: . 398 - run: 399 name: Install Rosetta 400 command: .circleci/scripts/install-rosetta 401 - run: 402 name: Run tests 403 command: ./scripts/ci/run-prebuilt-tests.sh $(pwd)/test-bin $(pwd)/test-results 404 - store_test_results: 405 path: ./test-results 406 - store_artifacts: 407 path: ./test-results 408 destination: raw-test-results 409 410 fluxtest: 411 executor: cross-builder 412 steps: 413 - checkout 414 - run: make test-flux 415 416 tlstest: 417 executor: cross-builder 418 steps: 419 - checkout 420 - run: make test-tls 421 422 build: 423 executor: cross-builder 424 parameters: 425 os: 426 type: string 427 arch: 428 type: string 429 build-type: 430 type: string 431 steps: 432 - checkout 433 - run: 434 name: Install Package Dependencies 435 command: | 436 export DEBIAN_FRONTEND=noninteractive 437 apt-get update 438 apt-get install --yes git 439 - run: 440 name: Get InfluxDB Version 441 command: | 442 PREFIX=2.x .circleci/scripts/get-version 443 - run: 444 name: Generate UI assets 445 command: make generate-web-assets 446 - run: 447 name: Build binaries 448 command: | 449 build_type="<< parameters.build-type >>" 450 451 # release builds occur from the "build" pipeline 452 if [[ ${build_type} == snapshot ]] 453 then 454 # `get-version` determines whether this is a release build. If 455 # this is a release build, ensure that the proper version is 456 # templated into the go binary. 457 if [[ ${RELEASE:-} ]] 458 then 459 build_type=release 460 fi 461 fi 462 463 export GOOS=<< parameters.os >> 464 export GOARCH=<< parameters.arch >> 465 ./scripts/ci/build.sh "bin/influxd_$(go env GOOS)_$(go env GOARCH)" "${build_type}" ./cmd/influxd 466 - store_artifacts: 467 path: bin 468 - persist_to_workspace: 469 root: . 470 paths: 471 - bin 472 473 build-packages: 474 machine: 475 image: ubuntu-2204:current 476 steps: 477 - attach_workspace: 478 at: /tmp/workspace 479 - checkout 480 - run: | 481 export DEBIAN_FRONTEND=noninteractive 482 sudo -E apt-get update 483 sudo -E apt-get install --no-install-recommends --yes \ 484 asciidoc \ 485 build-essential \ 486 git \ 487 python3 \ 488 rpm \ 489 ruby-dev \ 490 xmlto 491 492 sudo gem install fpm 493 494 python3 -m pip install -r .circleci/scripts/package/requirements.txt 495 496 # Unfortunately, this must be executed as root. This is so permission 497 # modifying commands (chown, chmod, etc.) succeed. 498 sudo --preserve-env=CIRCLE_TAG,CIRCLE_SHA1 .circleci/scripts/package/build.py 499 - store_artifacts: 500 path: artifacts/ 501 - persist_to_workspace: 502 root: . 503 paths: 504 - artifacts 505 506 sign-packages: 507 circleci_ip_ranges: true 508 docker: 509 - image: quay.io/influxdb/rsign:latest 510 auth: 511 username: $QUAY_RSIGN_USERNAME 512 password: $QUAY_RSIGN_PASSWORD 513 steps: 514 - add_ssh_keys: 515 fingerprints: 516 - fc:7b:6e:a6:38:7c:63:5a:13:be:cb:bb:fa:33:b3:3c 517 - attach_workspace: 518 at: /tmp/workspace 519 - run: | 520 for target in /tmp/workspace/artifacts/* 521 do 522 case "${target}" 523 in 524 # rsign is shipped on Alpine Linux which uses "busybox ash" instead 525 # of bash. ash is somewhat more posix compliant and is missing some 526 # extensions and niceties from bash. 527 *.deb|*.rpm|*.tar.gz|*.zip) 528 rsign "${target}" 529 ;; 530 esac 531 532 if [ -f "${target}" ] 533 then 534 # Since all artifacts are present, sign them here. This saves Circle 535 # credits over spinning up another instance just to separate out the 536 # checksum job. Individual checksums are written by the 537 # "build_packages" script. 538 sha256sum "${target}" >> "/tmp/workspace/artifacts/influxdb2.${CIRCLE_TAG}.digests" 539 fi 540 done 541 - persist_to_workspace: 542 root: /tmp/workspace 543 paths: 544 - artifacts 545 - store_artifacts: 546 path: /tmp/workspace/artifacts 547 548 s3-publish-packages: 549 docker: 550 - image: ubuntu:latest 551 steps: 552 - attach_workspace: 553 at: /tmp/workspace 554 - checkout 555 - run: 556 name: Publish Packages to S3 557 command: | 558 export DEBIAN_FRONTEND=noninteractive 559 apt-get update 560 apt-get install --yes awscli git 561 562 PREFIX=2.x .circleci/scripts/get-version 563 source "${BASH_ENV}" 564 565 # required for sha256sum generate the correct paths 566 pushd /tmp/workspace/artifacts 567 568 # Since the artifacts are generated in parallel, the checksums 569 # cannot be calculated until all artifacts are complete. This 570 # excludes `CHANGELOG.md`. Historically, `CHANGELOG.md` was 571 # not included in the checksums. 572 sha256sum * | tee influxdb.${VERSION}.sha256 573 574 aws s3 sync . 's3://dl.influxdata.com/influxdb/releases' 575 576 build-docker-nightly: 577 parameters: 578 resource_class: 579 type: string 580 arch: 581 type: string 582 arch_docker: 583 type: string 584 machine: 585 image: ubuntu-2004:current 586 resource_class: << parameters.resource_class >> 587 steps: 588 - attach_workspace: 589 at: /tmp/workspace 590 - checkout 591 - quay_login 592 - run: 593 name: Install Dependencies 594 command: | 595 export DEBIAN_FRONTEND=noninteractive 596 sudo apt-get update 597 sudo apt-get install -y docker 598 - run: 599 name: Build Docker Container 600 command: | 601 # The Dockerfile requires `influxd` to build the container. This 602 # is written into `/tmp/workspace/bin/` by `build-binaries`. For 603 # the Dockerfile to build successfully, copy `influxd` to 604 # the current directory. 605 cp /tmp/workspace/bin/influxd_linux_<< parameters.arch >>/influxd . 606 607 docker build -f docker/influxd/Dockerfile -t quay.io/influxdb/influxdb-<< parameters.arch_docker >>:nightly . 608 609 docker push quay.io/influxdb/influxdb-<< parameters.arch_docker >>:nightly 610 611 docker-nightly-manifest: 612 machine: 613 image: ubuntu-2004:current 614 steps: 615 - run: 616 name: Install Dependencies 617 command: | 618 export DEBIAN_FRONTEND=noninteractive 619 sudo apt-get update 620 sudo apt-get install -y docker 621 - quay_login 622 - run: 623 name: Update Docker Manifests 624 command: | 625 docker manifest create \ 626 quay.io/influxdb/influxdb:nightly \ 627 quay.io/influxdb/influxdb-amd64:nightly \ 628 quay.io/influxdb/influxdb-arm64v8:nightly 629 docker manifest push \ 630 quay.io/influxdb/influxdb:nightly 631 632 test-linux-packages: 633 executor: terraform/default 634 steps: 635 - attach_workspace: 636 at: /tmp/workspace 637 - checkout 638 - add_ssh_keys: 639 fingerprints: 640 - 3a:d1:7a:b7:57:d7:85:0b:76:79:85:51:38:f3:e4:67 641 - terraform/validate: 642 path: scripts/ci/ 643 - run: 644 name: Terraform apply 645 command: | 646 set -x 647 export DEBNAME="$(find /tmp/workspace/artifacts/influxdb2*amd64.deb)" 648 terraform -chdir=scripts/ci init -input=false 649 AWS_ACCESS_KEY_ID=$TEST_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$TEST_AWS_SECRET_ACCESS_KEY terraform \ 650 -chdir=scripts/ci \ 651 apply \ 652 -auto-approve \ 653 -var package_path=${DEBNAME} \ 654 -var instance_name=circleci-terraform-${CIRCLE_SHA1} \ 655 -var additional_files_dir=${PWD}/scripts/ci/tests/ 656 - run: 657 name: Install deb 658 command: | 659 set -x 660 export ec2_ip=$(terraform -chdir=scripts/ci output -raw test_node_ssh) 661 ssh -o "StrictHostKeyChecking=no" ubuntu@$ec2_ip \<< EOF 662 sudo apt-get update && sudo apt-get install -y /home/ubuntu/influxdb.deb 663 EOF 664 - run: 665 name: Run tests 666 command: | 667 set -x 668 export ec2_ip=$(terraform -chdir=scripts/ci output -raw test_node_ssh) 669 files=$(ssh -o "StrictHostKeyChecking=no" ubuntu@$ec2_ip 'find /home/ubuntu/files/ -maxdepth 1 -mindepth 1 | sort') 670 for file in $files; do 671 ssh -o "StrictHostKeyChecking=no" ubuntu@$ec2_ip "sudo $file" 672 done 673 - run: 674 name: Terraform destroy 675 when: always 676 command: | 677 AWS_ACCESS_KEY_ID=$TEST_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$TEST_AWS_SECRET_ACCESS_KEY terraform \ 678 -chdir=scripts/ci \ 679 destroy \ 680 -auto-approve 681 682 perf-test: 683 docker: 684 - image: cimg/base:2022.04 685 resource_class: small 686 parameters: 687 record_results: 688 type: boolean 689 steps: 690 - attach_workspace: 691 at: /tmp/workspace 692 - checkout 693 # To ssh into aws without failing host key checks 694 - add_ssh_keys: 695 fingerprints: 696 - 3a:d1:7a:b7:57:d7:85:0b:76:79:85:51:38:f3:e4:67 697 - run: 698 name: Set up AWS CLI 699 command: | 700 ./scripts/ci/install-aws-cli.sh 701 echo "export AWS_ACCESS_KEY_ID=${TEST_AWS_ACCESS_KEY_ID}" >> vars.sh 702 echo "export AWS_SECRET_ACCESS_KEY=${TEST_AWS_SECRET_ACCESS_KEY}" >> vars.sh 703 echo "export TEST_RECORD_RESULTS=<< parameters.record_results >>" >> vars.sh 704 echo 'export DATA_I_TYPE="r5.2xlarge"' >> vars.sh 705 - run: 706 name: Set up AWS instance 707 command: | 708 scripts/ci/perf_test.sh 709 - run: 710 name: Run perf test 711 no_output_timeout: 20m 712 command: | 713 source vars.sh 714 set -x 715 ssh "ubuntu@$EC2_IP" "sudo ./run_perftest.sh" 716 - run: 717 name: Tear down AWS instance 718 when: always 719 command: | 720 source vars.sh 721 set -x 722 if [[ -n "$EC2_INSTANCE_ID" ]] ; then 723 aws --region us-west-2 ec2 terminate-instances --instance-ids "$EC2_INSTANCE_ID" 724 fi 725 726 aws-destroy-by-date: 727 executor: linux-amd64 728 steps: 729 - attach_workspace: 730 at: /tmp/workspace 731 - checkout 732 - add_ssh_keys: 733 fingerprints: 734 - 3a:d1:7a:b7:57:d7:85:0b:76:79:85:51:38:f3:e4:67 735 - run: 736 name: Destroy AWS instances with datestring more than a day old 737 no_output_timeout: 20m 738 command: | 739 set -x 740 yesterday_date=$(date --date "yesterday" +%Y%m%d) 741 instance_info=$(AWS_ACCESS_KEY_ID=${TEST_AWS_ACCESS_KEY_ID} \ 742 AWS_SECRET_ACCESS_KEY=${TEST_AWS_SECRET_ACCESS_KEY} \ 743 aws --region us-west-2 ec2 describe-instances \ 744 --filters "Name=tag:Name,Values=oss-perftest-*" \ 745 --query "Reservations[].Instances[].[InstanceId, Tags[?Key=='Name']|[0].Value]" \ 746 --output text) 747 while [ -n "$instance_info" ]; do 748 instance_id=$(echo $instance_info | tr -s ' ' | cut -d ' ' -f1) 749 name=$(echo $instance_info | tr -s ' ' | cut -d ' ' -f2) 750 instance_info=$(echo $instance_info | tr -s ' ' | cut -d ' ' -f3-) 751 date=$(echo $name | cut -d '-' -f3) 752 if [ $date -le $yesterday_date ]; then 753 AWS_ACCESS_KEY_ID=${TEST_AWS_ACCESS_KEY_ID} AWS_SECRET_ACCESS_KEY=${TEST_AWS_SECRET_ACCESS_KEY} aws --region us-west-2 ec2 terminate-instances --instance-ids $instance_id 754 fi 755 done 756 757 e2e-monitor-ci: 758 docker: 759 - image: cimg/base:stable 760 steps: 761 - checkout 762 - attach_workspace: 763 at: . 764 - setup_remote_docker 765 - quay_login 766 - run: 767 name: Build and push candidate docker image 768 command: | 769 cp bin/influxd_linux_amd64/influxd . 770 docker build -f docker/influxd/Dockerfile -t quay.io/influxdb/oss-acceptance:${CIRCLE_SHA1} . 771 docker push quay.io/influxdb/oss-acceptance:${CIRCLE_SHA1} 772 - run: 773 name: Run the tests 774 command: API_KEY=${MONITOR_CI_API_KEY} MONITOR_CI_BRANCH="master" OSS_SHA=${CIRCLE_SHA1} RUN_WORKFLOW="build_oss" ./scripts/ci/run-monitor-ci-tests.bash 775 - store_artifacts: 776 path: monitor-ci/test-artifacts/results/build-oss-image 777 destination: test_artifacts/results/build-oss-image 778 - store_artifacts: 779 path: monitor-ci/test-artifacts/results/oss-e2e 780 destination: test_artifacts/results/oss-e2e 781 - store_artifacts: 782 path: monitor-ci/test-artifacts/results/shared 783 destination: test_artifacts/results/shared 784 785 litmus-smoke-test: 786 executor: linux-amd64 787 steps: 788 - attach_workspace: 789 at: ~/project 790 - run: docker run --entrypoint "./run_litmus_tests_oss.sh" -e ONE_TEST=src/cloud/rest_api/smoke/test_smoke.py -e BINARYPATH=/Litmus/result/bin/influxd_linux_amd64/influxd -e BOLTPATH=/Litmus/result/influxd_test/influxd.bolt -e ENGINEPATH=/Litmus/result/influxd_test --net host -v /var/run/docker.sock:/var/run/docker.sock -v ~/project:/Litmus/result quay.io/influxdb/litmus:latest 791 - store_artifacts: 792 path: ~/project 793 destination: raw-daily-output 794 - store_test_results: 795 path: ~/project 796 797 litmus-full-test: 798 executor: linux-amd64 799 steps: 800 - attach_workspace: 801 at: ~/project 802 - run: docker run --entrypoint "./run_litmus_tests_oss.sh" -e TEST_LIST=tests_lists/gateway_api_tests.list -e BINARYPATH=/Litmus/result/bin/influxd_linux_amd64/influxd -e BOLTPATH=/tmp/influxd_test/influxd.bolt -e ENGINEPATH=/tmp/influxd_test --net host -v /var/run/docker.sock:/var/run/docker.sock -v ~/project:/Litmus/result quay.io/influxdb/litmus:latest 803 - store_artifacts: 804 path: ~/project 805 destination: raw-daily-output 806 - store_test_results: 807 path: ~/project 808 809 grace-test: 810 executor: linux-amd64 811 steps: 812 - attach_workspace: 813 at: ~/project 814 - run: 815 command: ./bin/influxd_linux_amd64/influxd --store=memory --log-level=debug 816 background: true 817 - run: mkdir -p ~/project/results 818 - run: 819 name: Wait for influxd to bind HTTP port 820 command: | 821 attempts=0 822 max_attempts=30 823 while ! curl localhost:8086/health; do 824 attempts=$((attempts+1)) 825 if [[ $attempts = $max_attempts ]]; then 826 >&2 echo influxd "didn't" start in time 827 exit 1 828 fi 829 sleep 1 830 done 831 - run: 832 name: Run grace test driver 833 command: | 834 docker run -v ~/project/results:/grace/test-results/grace-results \ 835 --env GRACE_BASE_URL="http://172.17.0.1:8086" \ 836 --env GRACE_ORG_NAME="daily-org" \ 837 --env GRACE_BUCKET_NAME="daily-bucket" \ 838 --env GRACE_USER="daily@influxdata.com" \ 839 --env GRACE_PASS="dailyPassword" \ 840 --env GRACE_VALIDATE_OPENAPI=1 \ 841 quay.io/influxdb/grace:latest-cd 842 - store_artifacts: 843 path: ~/project/results 844 - store_test_results: 845 path: ~/project/results 846 847 test-downgrade: 848 executor: cross-builder 849 steps: 850 - checkout 851 - attach_workspace: 852 at: . 853 - run: 854 name: Run downgrade tests 855 command: | 856 ./scripts/ci/test-downgrade.sh $(pwd)/bin/influxd_linux_amd64/influxd 857 858 share-testing-image: 859 docker: 860 - image: cimg/base:stable 861 steps: 862 - setup_remote_docker 863 - quay_login 864 - run: 865 name: Push the image to Quay 866 command: | 867 docker pull quay.io/influxdb/oss-acceptance:${CIRCLE_SHA1} 868 docker tag quay.io/influxdb/oss-acceptance:${CIRCLE_SHA1} quay.io/influxdb/oss-acceptance:latest 869 docker push quay.io/influxdb/oss-acceptance:latest 870 871 changelog: 872 parameters: 873 workflow: 874 type: string 875 docker: 876 - image: quay.io/influxdb/changelogger:latest 877 steps: 878 - checkout 879 - when: 880 condition: 881 or: 882 - equal: [ << parameters.workflow >>, nightly ] 883 - equal: [ << parameters.workflow >>, snapshot ] 884 steps: 885 - run: changelogger --product OSS 886 - when: 887 condition: 888 equal: [ << parameters.workflow >>, release ] 889 steps: 890 - run: | 891 export DESCRIPTION="In addition to the list of changes below, please also see the [official release \ 892 notes](https://docs.influxdata.com/influxdb/${CIRCLE_BRANCH}/reference/release-notes/influxdb/) for \ 893 other important information about this release." 894 895 changelogger --product OSS --release "<< pipeline.git.tag >>" --description "${DESCRIPTION}" 896 - store_artifacts: 897 path: changelog_artifacts/ 898 - persist_to_workspace: 899 root: changelog_artifacts/ 900 paths: 901 - . 902 903 changelog-upload: 904 parameters: 905 workflow: 906 type: string 907 docker: 908 - image: cimg/python:3.6 909 steps: 910 - attach_workspace: 911 at: /tmp/workspace 912 - when: 913 condition: 914 equal: [ << parameters.workflow >>, release ] 915 steps: 916 - aws-s3/copy: 917 aws-region: AWS_S3_REGION 918 aws-access-key-id: AWS_ACCESS_KEY_ID 919 aws-secret-access-key: AWS_SECRET_ACCESS_KEY 920 to: "s3://dl.influxdata.com/influxdb/releases/CHANGELOG.<< pipeline.git.tag >>.md" 921 from: /tmp/workspace/CHANGELOG.md 922 - when: 923 condition: 924 equal: [ << parameters.workflow >>, nightly ] 925 steps: 926 - aws-s3/copy: 927 aws-region: AWS_S3_REGION 928 aws-access-key-id: AWS_ACCESS_KEY_ID 929 aws-secret-access-key: AWS_SECRET_ACCESS_KEY 930 to: "s3://dl.influxdata.com/platform/nightlies/<< pipeline.git.branch >>/CHANGELOG.md" 931 from: /tmp/workspace/CHANGELOG.md 932 933 check_package_deb_amd64: 934 machine: 935 image: ubuntu-2204:current 936 resource_class: medium 937 steps: 938 - attach_workspace: 939 at: /tmp/workspace 940 - checkout 941 - run: 942 name: Validate Debian Package (AMD64) 943 command: | 944 sudo .circleci/scripts/package-validation/debian \ 945 /tmp/workspace/artifacts/influxdb2*amd64.deb 946 947 check_package_deb_arm64: 948 machine: 949 image: ubuntu-2204:current 950 resource_class: arm.medium 951 steps: 952 - attach_workspace: 953 at: /tmp/workspace 954 - checkout 955 - run: 956 name: Validate Debian Package (ARM64) 957 command: | 958 sudo .circleci/scripts/package-validation/debian \ 959 /tmp/workspace/artifacts/influxdb2*arm64.deb 960 961 check_package_rpm: 962 executor: linux-amd64 963 parameters: 964 arch: 965 type: string 966 steps: 967 - attach_workspace: 968 at: /tmp/workspace 969 - add_ssh_keys: 970 fingerprints: 971 - 3a:d1:7a:b7:57:d7:85:0b:76:79:85:51:38:f3:e4:67 972 - checkout 973 - run: | 974 AWS_ACCESS_KEY_ID=$TEST_AWS_ACCESS_KEY_ID \ 975 AWS_SECRET_ACCESS_KEY=$TEST_AWS_SECRET_ACCESS_KEY \ 976 .circleci/scripts/package-validation/redhat << parameters.arch >> /tmp/workspace/artifacts/influxdb2*.<< parameters.arch >>.rpm