From 79ed240e54e99b4b762b616518d8366b8b4485bd Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Wed, 12 Apr 2023 18:40:49 -0400 Subject: [PATCH] circleci: remove frontend (#16988) Signed-off-by: Dan Bond Co-authored-by: Dan Bond --- .circleci/config.yml | 210 ++++--------------------------------------- 1 file changed, 19 insertions(+), 191 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d1218e5589..33d3b45f36 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,16 @@ parameters: description: "Commit to run load tests against" references: + paths: + test-results: &TEST_RESULTS_DIR /tmp/test-results + environment: &ENVIRONMENT + TEST_RESULTS_DIR: *TEST_RESULTS_DIR + EMAIL: noreply@hashicorp.com + GIT_AUTHOR_NAME: circleci-consul + GIT_COMMITTER_NAME: circleci-consul + S3_ARTIFACT_BUCKET: consul-dev-artifacts-v2 + BASH_ENV: .circleci/bash_env.sh + GO_VERSION: 1.20.1 envoy-versions: &supported_envoy_versions - &default_envoy_version "1.22.11" - "1.23.8" @@ -26,36 +36,17 @@ references: - "1.10.9" - "1.9.10" consul-versions: &consul_versions - - "1.15" - "1.14" + - "1.15" images: # When updating the Go version, remember to also update the versions in the # workflows section for go-test-lib jobs. go: &GOLANG_IMAGE docker.mirror.hashicorp.services/cimg/go:1.20.1 ember: &EMBER_IMAGE docker.mirror.hashicorp.services/circleci/node:16-browsers ubuntu: &UBUNTU_CI_IMAGE ubuntu-2004:202201-02 - - paths: - test-results: &TEST_RESULTS_DIR /tmp/test-results - cache: yarn: &YARN_CACHE_KEY consul-ui-v9-{{ checksum "ui/yarn.lock" }} - consul_exec_contexts: &consul_exec_contexts - - team-consul - - consul-enterprise-licensing - - environment: &ENVIRONMENT - TEST_RESULTS_DIR: *TEST_RESULTS_DIR - EMAIL: noreply@hashicorp.com - GIT_AUTHOR_NAME: circleci-consul - GIT_COMMITTER_NAME: circleci-consul - S3_ARTIFACT_BUCKET: consul-dev-artifacts-v2 - S3_ARTIFACT_BUCKET_CLOUD: consul-enterprise-dev-artifacts-v2 - BASH_ENV: .circleci/bash_env.sh - GOPRIVATE: github.com/hashicorp - GO_VERSION: 1.20.1 - steps: install-gotestsum: &install-gotestsum name: install gotestsum @@ -337,143 +328,6 @@ jobs: path: *TEST_RESULTS_DIR - run: *notify-slack-failure - # build frontend yarn cache - frontend-cache: - docker: - - image: *EMBER_IMAGE - steps: - - checkout - - # cache yarn deps - - restore_cache: - key: *YARN_CACHE_KEY - - - run: - name: install yarn packages - command: cd ui && make deps - - - save_cache: - key: *YARN_CACHE_KEY - paths: - - ui/node_modules - - ui/packages/consul-ui/node_modules - - run: *notify-slack-failure - - # build ember so frontend tests run faster - ember-build-oss: &ember-build-oss - docker: - - image: *EMBER_IMAGE - environment: - JOBS: 2 # limit parallelism for broccoli-babel-transpiler - CONSUL_NSPACES_ENABLED: 0 - steps: - - checkout - - restore_cache: - key: *YARN_CACHE_KEY - - run: cd ui/packages/consul-ui && make build-ci - - # saves the build to a workspace to be passed to a downstream job - - persist_to_workspace: - root: ui - paths: - - packages/consul-ui/dist - - run: *notify-slack-failure - - # build ember so frontend tests run faster - ember-build-ent: - <<: *ember-build-oss - environment: - JOBS: 2 # limit parallelism for broccoli-babel-transpiler - CONSUL_NSPACES_ENABLED: 1 - - # run node tests - node-tests: - docker: - - image: *EMBER_IMAGE - steps: - - checkout - - restore_cache: - key: *YARN_CACHE_KEY - - attach_workspace: - at: ui - - run: - working_directory: ui/packages/consul-ui - command: make test-node - - run: *notify-slack-failure - # run yarn workspace wide checks/tests - workspace-tests: - docker: - - image: *EMBER_IMAGE - steps: - - checkout - - restore_cache: - key: *YARN_CACHE_KEY - - attach_workspace: - at: ui - - run: - working_directory: ui - command: make test-workspace - - run: *notify-slack-failure - - # run ember frontend tests - ember-test-oss: - docker: - - image: *EMBER_IMAGE - environment: - EMBER_TEST_REPORT: test-results/report-oss.xml #outputs test report for CircleCI test summary - EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam - CONSUL_NSPACES_ENABLED: 0 - parallelism: 4 - steps: - - checkout - - restore_cache: - key: *YARN_CACHE_KEY - - attach_workspace: - at: ui - - run: - working_directory: ui/packages/consul-ui - command: node_modules/.bin/ember exam --split=$CIRCLE_NODE_TOTAL --partition=`expr $CIRCLE_NODE_INDEX + 1` --path dist --silent -r xunit - - store_test_results: - path: ui/packages/consul-ui/test-results - - run: *notify-slack-failure - - # run ember frontend tests - ember-test-ent: - docker: - - image: *EMBER_IMAGE - environment: - EMBER_TEST_REPORT: test-results/report-ent.xml #outputs test report for CircleCI test summary - EMBER_TEST_PARALLEL: true #enables test parallelization with ember-exam - CONSUL_NSPACES_ENABLED: 1 - parallelism: 4 - steps: - - checkout - - restore_cache: - key: *YARN_CACHE_KEY - - attach_workspace: - at: ui - - run: - working_directory: ui/packages/consul-ui - command: node_modules/.bin/ember exam --split=$CIRCLE_NODE_TOTAL --partition=`expr $CIRCLE_NODE_INDEX + 1` --path dist --silent -r xunit - - store_test_results: - path: ui/packages/consul-ui/test-results - - run: *notify-slack-failure - - # run ember frontend unit tests to produce coverage report - ember-coverage: - docker: - - image: *EMBER_IMAGE - steps: - - checkout - - restore_cache: - key: *YARN_CACHE_KEY - - attach_workspace: - at: ui - - run: - working_directory: ui/packages/consul-ui - command: make test-coverage-ci - - run: *notify-slack-failure - compatibility-integration-test: machine: image: *UBUNTU_CI_IMAGE @@ -511,7 +365,7 @@ jobs: -p=4 \ -timeout=30m \ -json \ - ./... \ + `go list ./... | grep -v upgrade` \ --target-image consul \ --target-version local \ --latest-image consul \ @@ -734,37 +588,11 @@ workflows: - compatibility-integration-test: requires: - dev-build - - noop - frontend: - jobs: - - frontend-cache: - filters: - branches: - only: - - main - - /^ui\/.*/ - - /^backport\/ui\/.*/ - - workspace-tests: - requires: - - frontend-cache - - node-tests: - requires: - - frontend-cache - - ember-build-oss: - requires: - - frontend-cache - - ember-build-ent: - requires: - - frontend-cache - - ember-test-oss: - requires: - - ember-build-oss - - ember-test-ent: - requires: - - ember-build-ent - # ember-coverage in CI uses the dist/ folder to run tests so it requires - # either/or ent/oss to be built first - - ember-coverage: - requires: - - ember-build-ent + - upgrade-integration-test: + requires: + - dev-build + matrix: + parameters: + consul-version: *consul_versions + - noop