diff --git a/.circleci/config.yml b/.circleci/config.yml index 30f93fa1035..6fdc1532e9c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -329,55 +329,50 @@ jobs: - artifacts - store_artifacts: path: artifacts/ - test-linux-packages: - executor: terraform/default + check_package_deb_amd64: + machine: + image: ubuntu-2204:current + resource_class: medium steps: - attach_workspace: at: /tmp/workspace - checkout - - add_ssh_keys: - fingerprints: - - 3a:d1:7a:b7:57:d7:85:0b:76:79:85:51:38:f3:e4:67 - - terraform/validate: - path: scripts/ci/ - run: - name: Terraform apply + name: Validate Debian Package (AMD64) command: | - set -x - export DEBNAME="$(find /tmp/workspace/artifacts/influxdb3*amd64.deb)" - terraform -chdir=scripts/ci init -input=false - AWS_ACCESS_KEY_ID=$TEST_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$TEST_AWS_SECRET_ACCESS_KEY terraform \ - -chdir=scripts/ci \ - apply \ - -auto-approve \ - -var package_path=${DEBNAME} \ - -var instance_name=circleci-terraform-${CIRCLE_SHA1} \ - -var additional_files_dir=${PWD}/scripts/ci/tests/ - - run: - name: Install deb - command: | - set -x - export ec2_ip=$(terraform -chdir=scripts/ci output -raw test_node_ssh) - ssh -o "StrictHostKeyChecking=no" ubuntu@$ec2_ip \<< EOF - sudo apt-get update && sudo apt-get install -y /home/ubuntu/influxdb.deb - EOF - - run: - name: Run tests - command: | - set -x - export ec2_ip=$(terraform -chdir=scripts/ci output -raw test_node_ssh) - files=$(ssh -o "StrictHostKeyChecking=no" ubuntu@$ec2_ip 'find /home/ubuntu/files/ -maxdepth 1 -mindepth 1 | sort') - for file in $files; do - ssh -o "StrictHostKeyChecking=no" ubuntu@$ec2_ip "sudo $file" - done + sudo .circleci/scripts/package-validation/debian \ + /tmp/workspace/artifacts/influxdb3*amd64.deb + check_package_deb_arm64: + machine: + image: ubuntu-2204:current + resource_class: arm.medium + steps: + - attach_workspace: + at: /tmp/workspace + - checkout - run: - name: Terraform destroy - when: always + name: Validate Debian Package (ARM64) command: | - AWS_ACCESS_KEY_ID=$TEST_AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$TEST_AWS_SECRET_ACCESS_KEY terraform \ - -chdir=scripts/ci \ - destroy \ - -auto-approve + sudo .circleci/scripts/package-validation/debian \ + /tmp/workspace/artifacts/influxdb3*arm64.deb + check_package_rpm: + machine: + image: ubuntu-2204:current + resource_class: arm.medium + parameters: + arch: + type: string + steps: + - attach_workspace: + at: /tmp/workspace + - add_ssh_keys: + fingerprints: + - 3a:d1:7a:b7:57:d7:85:0b:76:79:85:51:38:f3:e4:67 + - checkout + - run: | + AWS_ACCESS_KEY_ID=$TEST_AWS_ACCESS_KEY_ID \ + AWS_SECRET_ACCESS_KEY=$TEST_AWS_SECRET_ACCESS_KEY \ + .circleci/scripts/package-validation/redhat << parameters.arch >> /tmp/workspace/artifacts/influxdb3*.<< parameters.arch >>.rpm sign-packages: circleci_ip_ranges: true docker: @@ -528,16 +523,35 @@ workflows: <<: *any_filter requires: - build-release - - test-linux-packages: - <<: *nofork_filter + - check_package_deb_arm64: + # <<: *release_filter + <<: *any_filter + requires: + - build-packages + - check_package_deb_amd64: + # <<: *release_filter + <<: *any_filter requires: - build-packages + - check_package_rpm: + # <<: *nofork_filter + <<: *any_filter + name: + check_package_rpm-<< matrix.arch >> + matrix: + parameters: + arch: [ x86_64, aarch64 ] + requires: + - build-packages + - sign-packages: # <<: *release_filter <<: *any_filter requires: - build-packages - - test-linux-packages + - check_package_rpm + - check_package_deb_arm64 + - check_package_deb_amd64 - test - publish-packages: # <<: *release_filter