diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7e5d74ed5..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,263 +0,0 @@ -# PHP CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-php/ for more details -# -version: 2.1 -orbs: - wp-product-orb: wpengine/wp-product-orb@1.3.0 - php: circleci/php@1.1.0 - node: circleci/node@4.1.0 - -jobs: - checkout: - executor: wp-product-orb/default - steps: - - checkout - - persist_to_workspace: - root: . - paths: - - . - - plugin-checkout: - executor: wp-product-orb/default - working_directory: ~/project/plugins/<> - environment: - WPE_SESSION_DIR: ./.wpe - parameters: - slug: - type: string - filename: - type: string - steps: - - attach_workspace: - at: ~/project - - run: - name: Make artifacts build directory - command: | - [ ! -d "build" ] && mkdir build &>/dev/null - - wp-product-orb/get-version-from-php: - filename: <> - return_var: BUILD_VERSION - - wp-product-orb/variable: - var: BUILD_VERSION - value: $BUILD_VERSION - - persist_to_workspace: - root: ~/project - paths: - - plugins/<> - - plugin-composer: - executor: php/default - working_directory: ~/project/plugins/<> - parameters: - slug: - type: string - steps: - - attach_workspace: - at: ~/project - - php/install-composer - - php/install-packages: - app-dir: . - - run: - name: Composer PHP lint and code sniffer - command: | - /usr/local/bin/composer lint && /usr/local/bin/composer phpcs - rm -v composer-setup.php - working_directory: . - - persist_to_workspace: - root: ~/project - paths: - - plugins/<> - - plugin-test: - working_directory: ~/project/plugins/<> - docker: - - image: cimg/php:7.4 - - image: circleci/mysql:5.7 - environment: - MYSQL_DATABASE: wp_database - MYSQL_USER: wp_user - MYSQL_PASSWORD: wp_pass - MYSQL_ROOT_PASSWORD: password - parameters: - slug: - type: string - steps: - - attach_workspace: - at: ~/project - - php/install-composer - - php/install-packages: - app-dir: . - - run: - name: Install Subversion package - command: | - sudo apt-get update -yq - sudo apt-get install subversion -yq - - run: - name: Setup WordPress testing framework - command: | - /bin/bash bin/install-wp-tests.sh wp_database wp_user wp_pass 127.0.0.1 latest true - working_directory: . - - run: - name: Run testing suite - command: | - composer test - working_directory: . - - plugin-bundle-zip: - executor: wp-product-orb/default - working_directory: ~/project/plugins/<> - environment: - WPE_SESSION_DIR: ./.wpe - parameters: - slug: - type: string - steps: - - attach_workspace: - at: ~/project - - wp-product-orb/variable-load - - run: - name: "Bundle plugin files into a zip" - command: | - cd .. - zip --verbose -x@<>/.zipignore -x *.wpe/* */build/ -r "<>/build/<>.$BUILD_VERSION.zip" <> - - store_artifacts: - path: build - - persist_to_workspace: - root: ~/project - paths: - - plugins/<>/build - - plugin-bundle-json: - executor: wp-product-orb/parser - working_directory: ~/project/plugins/<> - environment: - WPE_SESSION_DIR: ./.wpe - parameters: - slug: - type: string - steps: - - attach_workspace: - at: ~/project - - wp-product-orb/variable-load - - wp-product-orb/parse-wp-readme: - infile: readme.txt - outfile: build/<>.$BUILD_VERSION.json - - store_artifacts: - path: build - - persist_to_workspace: - root: ~/project - paths: - - plugins/<>/build - - plugin-deploy: - executor: wp-product-orb/authenticate - working_directory: ~/project/plugins/<> - environment: - WPE_SESSION_DIR: ./.wpe - parameters: - auth_url: - type: string - upload_url: - type: string - slug: - type: string - steps: - - attach_workspace: - at: ~/project - - wp-product-orb/variable-load - - wp-product-orb/authenticate: - user: WPE_LDAP_USER - pass: WPE_LDAP_PASS - url: <> - - wp-product-orb/post-zip: - url: <>/<> - zip: build/<>.$BUILD_VERSION.zip - json: build/<>.$BUILD_VERSION.json - version: $BUILD_VERSION - -workflows: - # Workflows defined for each package and plugin. - # tag example for deploying an update for wpe-headless: plugin/wpe-headless/1.0.0 - plugin-wpe-headless: - jobs: - - checkout: - filters: - tags: - only: /.*/ - - plugin-checkout: - name: plugin-checkout-wpe-headless - slug: wpe-headless - filename: wpe-headless.php - requires: - - checkout - # Enable running this job when a tag is published - filters: - tags: - only: /.*/ - - plugin-composer: - name: plugin-composer-wpe-headless - slug: wpe-headless - requires: - - plugin-checkout-wpe-headless - # Enable running this job when a tag is published - filters: - tags: - only: /.*/ - - plugin-test: - name: plugin-test-wpe-headless - slug: wpe-headless - requires: - - plugin-composer-wpe-headless - # Enable running this job when a tag is published - filters: - tags: - only: /.*/ - - plugin-bundle-zip: - name: plugin-bundle-zip-wpe-headless - slug: wpe-headless - requires: - - plugin-test-wpe-headless - # Run this job on every commit/PR so the plugin is available as a build artifact - filters: - tags: - only: /.*/ - - plugin-bundle-json: - name: plugin-bundle-json-wpe-headless - slug: wpe-headless - requires: - - plugin-test-wpe-headless - # Run this job on every commit/PR to make sure it's in working order prior to deploying - filters: - tags: - only: /.*/ - - plugin-deploy: - name: "Deploy zip to api (staging) wpe-headless" - slug: wpe-headless - requires: - - plugin-bundle-zip-wpe-headless - - plugin-bundle-json-wpe-headless - filters: - branches: - only: - - main - - canary - tags: - only: /.*/ - context: wpe-ldap-creds - auth_url: https://auth-staging.wpengine.io/v1/tokens - upload_url: https://wp-product-info-staging.wpesvc.net/v1/plugins - - plugin-deploy: - name: "Deploy zip to api (production) wpe-headless" - slug: wpe-headless - requires: - - "Deploy zip to api (staging) wpe-headless" - filters: - branches: - ignore: /.*/ - tags: - # tag ex. plugin/wpe-headless/1.0.0 - only: /^plugin\/wpe-headless\/\S+/ - context: wpe-ldap-creds - auth_url: https://auth.wpengine.io/v1/tokens - upload_url: https://wp-product-info.wpesvc.net/v1/plugins