From 3f2c58c5a3c7a65871d5acecac9b93a8e4cb44d5 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 10 Mar 2021 17:01:59 -1000 Subject: [PATCH 01/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e508885..871ec8d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: - image: circleci/python:3.6-jessie-browsers steps: # - checkout - - run: sudo ping cmsuat.canamins.com + - run: echo $CIRCLE_PULL_REQUEST # - run: echo "hello world" # - run: mkdir tests # - run: cd tests && touch my_test_1.txt From 23a09e3dd5fb64b816fd995c27d857aa30e77414 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 9 May 2022 12:43:52 -1000 Subject: [PATCH 02/66] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 871ec8d..9ccf976 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,8 +4,8 @@ jobs: docker: - image: circleci/python:3.6-jessie-browsers steps: -# - checkout - - run: echo $CIRCLE_PULL_REQUEST + - setup_remote_docker: + version: 20.10.7 # - run: echo "hello world" # - run: mkdir tests # - run: cd tests && touch my_test_1.txt From 8d9721573dce11f73d120904186ce36680f30f08 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 9 May 2022 15:15:36 -1000 Subject: [PATCH 03/66] Update config.yml --- .circleci/config.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ccf976..51af05d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,10 +2,11 @@ version: 2.1 jobs: build: docker: - - image: circleci/python:3.6-jessie-browsers + - image: circleci/node:10.18 steps: - - setup_remote_docker: - version: 20.10.7 + - setup_remote_docker + - run : docker version + # - run: echo "hello world" # - run: mkdir tests # - run: cd tests && touch my_test_1.txt @@ -18,7 +19,13 @@ jobs: # command: echo "conditional step" # # when: on_fail # Uploads code coverage results, pass or fail # - + test: + docker: + - image: cimg/node:10.18 + steps: + - setup_remote_docker + - run : docker version + workflows: @@ -26,6 +33,7 @@ workflows: build_and_push: jobs: - build + - test From f6df3ce2dc33813073ed8013e5a403e258fb791b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 20 May 2022 07:38:10 -1000 Subject: [PATCH 04/66] Update config.yml --- .circleci/config.yml | 46 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 51af05d..de6d613 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,49 +32,15 @@ workflows: version: 2.1 build_and_push: jobs: - - build + - build: + filters: + tags: + only: test + branches: + only: HennaAbbas-patch-1-1 - test -# version: 2.1 -# executors: -# machine-executor: -# machine: true -# environment: -# RUN_TESTS: foobar - -# node: -# docker: -# - image: circleci/node - - -# jobs: -# build: -# parameters: -# my-executor: -# default: machine-executor -# type: string -# executor: << parameters.my-executor >> -# steps: -# - checkout -# - run: echo "hello world" - -# workflows: -# build_and_push: -# jobs: -# - build -# - build: -# my-executor: node - - -# version: 2.1 -# jobs: -# build: -# docker: -# - image: image: circleci/python:3.6-jessie-browsers -# steps: -# - checkout -# - run: sudo ping cmsuat.canamins.com From 91c00f0dc0bb1bef00b52bea395d6c451de00893 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 20 May 2022 07:39:19 -1000 Subject: [PATCH 05/66] Update config.yml --- .circleci/config.yml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index de6d613..c9522d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,27 +4,8 @@ jobs: docker: - image: circleci/node:10.18 steps: - - setup_remote_docker - - run : docker version + - run : "hello world!" -# - run: echo "hello world" -# - run: mkdir tests -# - run: cd tests && touch my_test_1.txt -# - run: echo "this is a test" > my_test_1.txt -# - store_artifacts: -# path: tests -# - run: wqr -# - run: -# name: conditional step -# command: echo "conditional step" -# # when: on_fail # Uploads code coverage results, pass or fail - # - test: - docker: - - image: cimg/node:10.18 - steps: - - setup_remote_docker - - run : docker version @@ -38,7 +19,7 @@ workflows: only: test branches: only: HennaAbbas-patch-1-1 - - test + From e048363598df2805b8e05a6f3272f0f1f86ee2f4 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 20 May 2022 07:40:03 -1000 Subject: [PATCH 06/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c9522d4..9042583 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: docker: - image: circleci/node:10.18 steps: - - run : "hello world!" + - run : echo "hello world!" From 007013d2e935eeb16ff74963c6a85d47b3e430fc Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 20 May 2022 12:51:39 -1000 Subject: [PATCH 07/66] Update config.yml --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9042583..1567e98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,11 @@ jobs: - image: circleci/node:10.18 steps: - run : echo "hello world!" - + - run: touch new_builds.txt + - persist_to_workspace: + paths: + - new_builds.txt + root: /home/circleci/project From fb6d9711c5f69c8ba0aa0466695e49a413e4c1ba Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 20 May 2022 12:52:35 -1000 Subject: [PATCH 08/66] Update config.yml --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1567e98..979f700 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,6 @@ jobs: - image: circleci/node:10.18 steps: - run : echo "hello world!" - - run: touch new_builds.txt - persist_to_workspace: paths: - new_builds.txt From 3a83a2cddfdf068d5ec2aef09d3d1e2dd453f7c6 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 23 May 2022 10:54:03 -1000 Subject: [PATCH 09/66] Update config.yml --- .circleci/config.yml | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 979f700..073601b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,30 +1,11 @@ version: 2.1 +workflows: + testing: + jobs: + - runner-test jobs: - build: - docker: - - image: circleci/node:10.18 + runner-test: + machine: true + resource_class: mikhailtymchukft/engineering-default steps: - - run : echo "hello world!" - - persist_to_workspace: - paths: - - new_builds.txt - root: /home/circleci/project - - - -workflows: - version: 2.1 - build_and_push: - jobs: - - build: - filters: - tags: - only: test - branches: - only: HennaAbbas-patch-1-1 - - - - - - + - run: echo "I'm on runner!" From 63b54566f25fd825c96fae48a92cb4c809d55a87 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 16 Jun 2022 09:30:29 -1000 Subject: [PATCH 10/66] Update config.yml --- .circleci/config.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 073601b..5fc100d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,11 +1,20 @@ version: 2.1 +orbs: + android: circleci/android@1.0.3 + docker: circleci/docker@1.4.0 + workflows: - testing: + docker-image-test: jobs: - - runner-test + - testing-that-one-docker-image + jobs: - runner-test: - machine: true - resource_class: mikhailtymchukft/engineering-default + testing-that-one-docker-image: + docker: + - image: cimg/node:18.1.0 + resource_class: large steps: - - run: echo "I'm on runner!" + - checkout + - setup_remote_docker: + version: 20.10.14 + - run: docker build -t revomarine/testing . From 1e9482187ae71416677dba8b1b3d4250edfb8bf9 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 24 Jun 2022 13:06:29 -1000 Subject: [PATCH 11/66] Update config.yml --- .circleci/config.yml | 61 ++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5fc100d..469644b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,20 +1,47 @@ -version: 2.1 -orbs: - android: circleci/android@1.0.3 - docker: circleci/docker@1.4.0 +version: 2 +jobs: + install-pyenv: + macos: + xcode: 12.5.1 + resource_class: macos.x86.medium.gen2 + steps: + - run: + name: Install pyenv using brew + command: | + set -x + if command -v pyenv; then + echo "pyenv already installed." + exit 0 + fi + + echo "Installing pyenv and python build dependencies..." + HOMEBREW_NO_AUTO_UPDATE=1 brew install pyenv openssl readline sqlite3 xz zlib tcl-tk + + echo "Setting up pyenv environment" + echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $BASH_ENV + echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $BASH_ENV + echo 'eval "$(pyenv init --path)"' >> $BASH_ENV + - run: + name: Validate pyenv installation + command: | + set -x + echo "Validating pyenv installation" + if ! command -v pyenv; then + echo "pyenv installation failed." + exit 1 + fi + echo "pyenv installation successful" + pyenv versions + pyenv root + - run: + name: Install python + command: "set -x\n\necho \"Installing python 2.7.18\"\npyenv install -v 2.7.18 \n\necho \"Listing installed python versions\"\npyenv versions\n\necho \"Using python 2.7.18\"\npyenv local 2.7.18\npython --version\n" + - run: + name: Validate python installation + command: "set -x\necho \"Validating that python is set up\"\nPYTHON_VERSION=$(python --version 2>&1)\nif [[ \"$PYTHON_VERSION\" =~ \"2.7.18\" ]]; then \n echo \"Python 2.7.18 is active.\"\nelse\n echo \"Failed! $PYTHON_VERSION is active, not the expected version: 2.7.18\"\n exit 1;\nfi\n" workflows: - docker-image-test: + test: jobs: - - testing-that-one-docker-image - -jobs: - testing-that-one-docker-image: - docker: - - image: cimg/node:18.1.0 - resource_class: large - steps: - - checkout - - setup_remote_docker: - version: 20.10.14 - - run: docker build -t revomarine/testing . + - install-pyenv + version: 2 From 35fcf40489948d968567221debdfc3f34ee28a9f Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Mon, 8 Aug 2022 09:55:31 -1000 Subject: [PATCH 12/66] Update config.yml --- .circleci/config.yml | 694 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 650 insertions(+), 44 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 469644b..60f9196 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,47 +1,653 @@ -version: 2 +# +# CircleCI configuration for salesforcedx-vscode +# +# The following environment variables are required in the 'vscode-test' context +# when running tests for Windows: +# SFDX_CI_DEVHUB_CLIENTID -- connected app client ID for the dev hub +# SFDX_CI_DEVHUB_JWT_KEY -- private key for the connected app (base64 encoded) +# SFDX_CI_DEVHUB_USERNAME -- username of an authorized user of the dev hub +# +version: 2.1 + +orbs: + win: circleci/windows@2.4.0 + release-management: salesforce/npm-release-management@4 + slack: circleci/slack@3.4.2 + github-cli: circleci/github-cli@2.1.0 + +parameters: + # Configurable Versions + cli-version: + type: string + default: '7.45.1' + lerna-version: + type: string + default: '3.13.1' + node-version: + type: string + # node > 16.13 doesn't exist on legacy CircleCI image https://hub.docker.com/r/circleci/node/tags + # Need to migrate from legacy CircleCI image (W-11027467) + default: '16.13.0' + # Constants + cache-version: + type: string + default: 'dependency-cache-v4-' + domain-retry: + description: 'SFDX Domain Retry Wait in Seconds' + type: integer + default: 300 + fingerprint: + type: string + default: '3b:68:69:7d:19:a4:50:69:ad:b8:db:57:f9:9c:f0:3f' + # Workflow Triggers + create-release: + type: boolean + default: false + publish: + type: boolean + default: false + publish-type: + type: string + default: minor + pre-publish: + type: boolean + default: false + +commands: + build-artifacts: + description: 'Building and archiving extension artifacts.' + steps: + - checkout + - restore_dependency_cache + - install + - compile + - package-extensions + - stage-and-store-artifacts + - save_dependency_cache + + build-win: + description: 'Build for Windows.' + steps: + - run: git config --global core.autocrlf false + - checkout + - restore_dependency_cache: + base-cache-path: << pipeline.parameters.cache-version >>-win + - run: + name: 'Install node' + shell: bash.exe + command: | + nvm install $NODE_VERSION + nvm use $NODE_VERSION + nvm install-latest-npm + - run: + name: 'Install dependent modules' + shell: bash.exe + command: | + npm config set scripts-prepend-node-path true + npm install + npm install -g sfdx-cli@<< pipeline.parameters.cli-version >> + npm install -g junit-merge + - run: + name: 'Compile' + shell: bash.exe + command: npm run compile + - save_dependency_cache: + base-cache-path: << pipeline.parameters.cache-version >>-win + - run: + name: 'Run lint' + shell: bash.exe + command: | + npm run lint + + compile: + parameters: + compile-mode: + type: string + default: production + steps: + - run: + name: 'Compile in << parameters.compile-mode >> mode' + environment: + - NODE_ENV: << parameters.compile-mode >> + command: | + npm run compile + + gh-config: + parameters: + cache_timeout: + description: 'Cache timeout in seconds' + type: integer + default: 120 + gh_email: + description: 'GitHub email' + type: string + default: $GH_EMAIL + gh_username: + description: 'GitHub username' + type: string + default: 'Release Bot' + steps: + - run: + name: 'Configuring GitHub' + command: | + git config credential.helper 'cache --timeout=<< parameters.cache_timeout >>' + git config user.email "<< parameters.gh_email >>" + git config user.name "<< parameters.gh_username >>" + git config --global pull.rebase true + + install: + description: 'Installing dependencies' + steps: + - run: npm ci + - run: npm --version + - run: node --version + + merge-validation: + description: 'Verify the release branch is not older than main' + parameters: + package-json-path: + type: string + default: './packages/salesforcedx-vscode/package.json' + steps: + - run: + name: 'Validate release version against main' + command: | + git checkout main + echo "export MAIN_RELEASE_VERSION="$(node -pe "require('<< parameters.package-json-path >>').version")"" >> $BASH_ENV + source $BASH_ENV + echo "MAIN_RELEASE_VERSION is: ${MAIN_RELEASE_VERSION}" + LOWER_VERSION="`echo -e "${MAIN_RELEASE_VERSION}\n${RELEASE_VERSION}" | sort -V | cut --delimiter $'\n' --fields 1`" + echo "Lower version was: ${LOWER_VERSION}" + if [ ${LOWER_VERSION} != ${MAIN_RELEASE_VERSION} ] + then + echo "The release branch is older than main. We do not want to rebase off of an old branch. Exiting." + exit 1; + fi + + package-extensions: + steps: + - run: + name: 'Packaging extensions' + command: npm run vscode:package + + prepare-gus-environment-variables: + parameters: + package-json-path: + type: string + default: './packages/salesforcedx-vscode/package.json' + release-tag-name: + type: string + default: 'offcore.tooling' + steps: + - run: + name: 'Prepare environment variables for GUS Change Case Management' + command: | + export GUS_BUILD="$(node -pe "require('<< parameters.package-json-path >>').version")" + echo "export SF_CHANGE_CASE_SCHEDULE_BUILD=<< parameters.release-tag-name >>.$GUS_BUILD" >> $BASH_ENV + source $BASH_ENV + + prepare-release-environment-variables: + parameters: + package-json-path: + type: string + default: './packages/salesforcedx-vscode/package.json' + steps: + - run: + name: 'Prepare release branch environment variable' + command: | + echo "export RELEASE_VERSION="$(node -pe "require('<< parameters.package-json-path >>').version")"" >> $BASH_ENV + source $BASH_ENV + echo "RELEASE_VERSION is: ${RELEASE_VERSION}" + + restore_dependency_cache: + # This logic cannot be done within the node orb currently. This is due to the fact that we use + # the package.json instead of the package-lock.json for our checksum. + parameters: + base-cache-path: + type: string + default: << pipeline.parameters.cache-version >> + steps: + - restore_cache: + keys: + - << parameters.base-cache-path >>{{ checksum "package.json" }} + + save_dependency_cache: + parameters: + base-cache-path: + type: string + default: << pipeline.parameters.cache-version >> + path-to-save: + type: string + default: 'node_modules' + steps: + - save_cache: + key: << parameters.base-cache-path >>{{ checksum "package.json" }} + paths: + - << parameters.path-to-save >> + + ssh-config: + steps: + - add_ssh_keys: + fingerprints: + - << pipeline.parameters.fingerprint >> + + stage-and-store-artifacts: + parameters: + location: + type: string + default: 'extensions' + steps: + - run: + name: 'Staging artifacts' + command: | + mkdir << parameters.location >> + find packages -name "*.vsix" -type f -exec cp {} ./<< parameters.location >> \; + - store_artifacts: + path: ./<< parameters.location >> + + store-crash-logs: + parameters: + location: + type: string + default: 'vscode-crash-logs' + steps: + - store_artifacts: + path: ./<< parameters.location >> + + updating-sha-for-publish: + steps: + - run: + name: 'Generating the SHA256 and appending to the file.' + command: npm run vscode:sha256 + - run: + name: 'Concatenating the contents to the proper SHA256.md' + command: scripts/concatenate-sha256.js + - run: + name: 'Removing the temp SHA256 file.' + command: rm ./SHA256 + - run: + name: 'Adding the SHA256 to git.' + command: | + git add SHA256.md + git commit -m "chore: updated SHA256 v${RELEASE_VERSION}" + +executors: + default-executor: + parameters: + # We are unable to use the recommended cimg docker images since they use the root path instead of home + image: + type: string + default: circleci/node:<< pipeline.parameters.node-version >> + working-dir: + type: string + default: ~/cli + docker: + - image: << parameters.image >> + working_directory: << parameters.working-dir >> + jobs: - install-pyenv: - macos: - xcode: 12.5.1 - resource_class: macos.x86.medium.gen2 - steps: - - run: - name: Install pyenv using brew - command: | - set -x - if command -v pyenv; then - echo "pyenv already installed." - exit 0 - fi - - echo "Installing pyenv and python build dependencies..." - HOMEBREW_NO_AUTO_UPDATE=1 brew install pyenv openssl readline sqlite3 xz zlib tcl-tk - - echo "Setting up pyenv environment" - echo 'export PYENV_ROOT="$HOME/.pyenv"' >> $BASH_ENV - echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> $BASH_ENV - echo 'eval "$(pyenv init --path)"' >> $BASH_ENV - - run: - name: Validate pyenv installation - command: | - set -x - echo "Validating pyenv installation" - if ! command -v pyenv; then - echo "pyenv installation failed." - exit 1 - fi - - echo "pyenv installation successful" - pyenv versions - pyenv root - - run: - name: Install python - command: "set -x\n\necho \"Installing python 2.7.18\"\npyenv install -v 2.7.18 \n\necho \"Listing installed python versions\"\npyenv versions\n\necho \"Using python 2.7.18\"\npyenv local 2.7.18\npython --version\n" - - run: - name: Validate python installation - command: "set -x\necho \"Validating that python is set up\"\nPYTHON_VERSION=$(python --version 2>&1)\nif [[ \"$PYTHON_VERSION\" =~ \"2.7.18\" ]]; then \n echo \"Python 2.7.18 is active.\"\nelse\n echo \"Failed! $PYTHON_VERSION is active, not the expected version: 2.7.18\"\n exit 1;\nfi\n" + build-all: + description: 'Build artifacts in a non-Windows environment' + executor: + name: default-executor + working-dir: ~/project + environment: + - SFDX_URL_LINUX: https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz + - SFDX_AUTOUPDATE_DISABLE: true + - SFDX_USE_GENERIC_UNIX_KEYCHAIN: true + - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> + steps: + - build-artifacts + + unit-tests: + description: 'Run tests on Windows' + executor: win/default + environment: + - SFDX_AUTOUPDATE_DISABLE: true + - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> + - NODE_VERSION: << pipeline.parameters.node-version >> + steps: + - build-win + - run: + name: 'Running unit tests' + shell: cmd.exe + command: npm run test:unit + - run: + name: 'Aggregate test results' + shell: bash.exe + command: | + set -e + npm run aggregateJUnit -- -t unit + junit-merge -d junit-aggregate -o junit-aggregate.xml + - store_test_results: + path: ./junit-aggregate/ + - run: + name: 'Check for Test Failures' + shell: powershell.exe + command: | + [xml]$results = Get-Content junit-aggregate.xml + $failure = $results.SelectSingleNode("//failure") + if ($failure -ne $null) { + Write-Host "Forcing build failure due to test failure(s) :'(" + $host.SetShouldExit(1) + } + + soql-ui-tests: + description: 'Run E2E SOQL UI Tests' + executor: win/default + environment: + - SFDX_AUTOUPDATE_DISABLE: true + - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> + - NODE_VERSION: << pipeline.parameters.node-version >> + steps: + - build-win + - run: + name: 'Run SOQL UI Tests if Needed' + shell: bash.exe + command: | + set -e + npm run test:ui + + integration-tests: + description: 'Run tests on Windows' + executor: win/default + environment: + - SFDX_AUTOUPDATE_DISABLE: true + - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> + - NODE_VERSION: << pipeline.parameters.node-version >> + steps: + - build-win + - run: + name: 'Authenticate to the default DevHub' + shell: bash.exe + command: | + echo $SFDX_CI_DEVHUB_JWTKEY | base64 --decode > devhub.key + sfdx force:auth:jwt:grant --clientid ${SFDX_CI_DEVHUB_CLIENTID} --username ${SFDX_CI_DEVHUB_USERNAME} --jwtkeyfile devhub.key --setdefaultdevhubusername --setalias devhub + rm devhub.key + - run: + name: 'Running integration tests' + shell: cmd.exe + command: npm run test:integration-tests-without-system-tests + - run: + name: 'Assert all tests ran and aggregate results' + shell: bash.exe + command: | + set -e + npm run aggregateJUnit -- -t integration vscode-integration + junit-merge -d junit-aggregate -o junit-aggregate.xml + - store_test_results: + path: ./junit-aggregate/ + - store-crash-logs + - run: + name: 'Check for Test Failures' + shell: powershell.exe + command: | + [xml]$results = Get-Content junit-aggregate.xml + $failure = $results.SelectSingleNode("//failure") + if ($failure -ne $null) { + Write-Host "Forcing build failure due to test failure(s) :'(" + $host.SetShouldExit(1) + } + + merge-release-branch: + parameters: + e: + type: executor + executor: << parameters.e >> + steps: + - slack/notify: + channel: 'pdt_releases' + color: '#FFDEAD' + message: 'Merging release branch into main' + - ssh-config + - checkout + - gh-config + - prepare-release-environment-variables + - merge-validation + - run: + name: 'Rebasing main off of release branch' + command: | + echo "Rebasing main off of release branch ${RELEASE_VERSION}" + git checkout main + git rebase -Xtheirs release/v${RELEASE_VERSION} + git push + - slack/notify: + channel: 'pdt_releases' + color: '#d8bfd8' + message: 'Main should now be rebased off of the release branch ${RELEASE_VERSION}' + - slack/status: + channel: 'pdt_releases' + fail_only: true + + publish: + parameters: + e: + type: executor + executor: << parameters.e >> + steps: + - slack/notify: + channel: 'pdt_releases' + color: '#FFDEAD' + message: 'Starting publish for VSCode Extensions' + - ssh-config + - checkout + - prepare-release-environment-variables + - prepare-gus-environment-variables + - restore_dependency_cache + - gh-config + - run: + name: 'Setup gus case management' + command: | + sudo npm install -g @salesforce/change-case-management@latest + - release-management/change-case-create + - install + - compile + - package-extensions + - updating-sha-for-publish + - stage-and-store-artifacts + - run: + name: 'Publishing to the VS Code Marketplace.' + command: npm run vscode:publish + - run: + name: 'Create git tag (e.g. v48.1.0) & push changes back to main branch' + command: | + git tag v${RELEASE_VERSION} + git push origin v${RELEASE_VERSION} + git push origin main + - github-cli/setup + - run: + name: 'Create release on git tag' + command: | + gh release create v${RELEASE_VERSION} ./packages/**/*.vsix --title "Release v${RELEASE_VERSION}" --notes-file ./packages/salesforcedx-vscode/CHANGELOG.md + - slack/notify: + channel: 'pdt_releases' + color: '#9bcd9b' + message: 'VSCode Extensions v${RELEASE_VERSION} have been published to the marketplace' + - slack/notify: + channel: 'pdt_releases' + color: '#FFDEAD' + message: 'VSCode Extensions v${RELEASE_VERSION} Post Publish - Starting merge of main into develop' + - run: + name: 'Merge changes from main back into develop' + command: | + git checkout develop + git pull + git merge main --commit --no-edit + git push origin develop + - slack/notify: + channel: 'pdt_releases' + color: '#9bcd9b' + message: 'VSCode Extensions v${RELEASE_VERSION} Post Publish - Succeeded' + - slack/status: + channel: 'pdt_releases' + fail_only: true + - run: + when: on_fail + name: Close CTC case as Not Implemented + command: | + if [ -z "${SF_CHANGE_CASE_SFDX_AUTH_URL}" ] || [ -z "${SF_CHANGE_CASE_TEMPLATE_ID}" ] || [ -z "${SF_CHANGE_CASE_SCHEDULE_BUILD}" ]; then + echo "Environment not configured for CTC" + else + sfchangecase close --location "https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" --status "Not Implemented" + fi + - run: + when: on_success + name: All Good! Close CTC case/implementations + command: | + if [ -z "${SF_CHANGE_CASE_SFDX_AUTH_URL}" ] || [ -z "${SF_CHANGE_CASE_TEMPLATE_ID}" ] || [ -z "${SF_CHANGE_CASE_SCHEDULE_BUILD}" ]; then + echo "Environment not configured for CTC" + else + sfchangecase close --location "https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" + fi + + create-release-branch: + parameters: + e: + type: executor + executor: << parameters.e >> + steps: + - slack/notify: + channel: 'pdt_releases' + color: '#FFDEAD' + message: 'Starting creation of release branch for VSCode Extensions' + - ssh-config + - checkout + - restore_dependency_cache + - gh-config + - run: + name: 'Install npm 8.12' + command: sudo npm install -g npm@8.12.1 + - install + - run: + name: Install Lerna + command: sudo npm install -g lerna@<< pipeline.parameters.lerna-version >> + - run: + name: Create release branch + command: | + git branch + scripts/create-release-branch.js -r << pipeline.parameters.publish-type >> + - slack/notify: + channel: 'pdt_releases' + color: '#d8bfd8' + message: 'VSCode Extensions release branch has been cut' + - slack/status: + channel: 'pdt_releases' + fail_only: true + workflows: - test: + version: 2.1 + + # run a build and a windows test on every commit + commit-workflow: + when: + and: + - not: << pipeline.parameters.create-release >> + - not: << pipeline.parameters.publish >> + - not: << pipeline.parameters.pre-publish >> + jobs: + - build-all + - unit-tests + - integration-tests + + pre-publish-workflow: + when: << pipeline.parameters.pre-publish >> + jobs: + - slack/approval-notification: + context: + - salesforce-ide + message: Pending Approval for merge of release branch into main + channel: 'pdt_releases' + color: '#0E1111' + - hold: # Requires manual approval in Circle Ci + type: approval + - merge-release-branch: + e: default-executor + context: + - salesforce-ide + requires: + - hold + filters: + branches: + only: + - /^release/v.*/ + + publish-workflow: + when: << pipeline.parameters.publish >> + jobs: + - slack/approval-notification: + context: + - salesforce-ide + message: Pending Approval for Publish + channel: 'pdt_releases' + color: '#0E1111' + - build-all + - unit-tests + - integration-tests + - hold: # Requires manual approval in Circle Ci + type: approval + - publish: + e: default-executor + context: + - salesforce-ide + - NPM_Salesforce-Releases + - CLI_CTC + requires: + - build-all + - unit-tests + - integration-tests + - hold + filters: + branches: + only: + - main + + create-release-branch-workflow: + when: << pipeline.parameters.create-release >> + jobs: + - slack/approval-notification: + context: + - salesforce-ide + message: Pending Approval for Creation of Release Branch + channel: 'pdt_releases' + color: '#0E1111' + - hold: # Requires manual approval in Circle Ci + type: approval + - create-release-branch: + e: default-executor + context: + - salesforce-ide + requires: + - hold + filters: + branches: + only: + - develop + + # run a build/test every mid-night + scheduled-workflow: + triggers: + - schedule: + cron: '0 0 * * *' + filters: + branches: + only: + - develop + - main + jobs: + - build-all + - unit-tests + - integration-tests + - soql-ui-tests + + cut-release: + triggers: + - schedule: + cron: '0 13 * * 1' + filters: + branches: + only: + - develop jobs: - - install-pyenv - version: 2 + - create-release-branch: + e: default-executor + # TODO: Re-enable after issue wi From 80614bdb19448700fad3e12da319f96f7e72e20e Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:17:28 -0700 Subject: [PATCH 13/66] Update config.yml --- .circleci/config.yml | 679 +++---------------------------------------- 1 file changed, 33 insertions(+), 646 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 60f9196..d374091 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,653 +1,40 @@ -# -# CircleCI configuration for salesforcedx-vscode -# -# The following environment variables are required in the 'vscode-test' context -# when running tests for Windows: -# SFDX_CI_DEVHUB_CLIENTID -- connected app client ID for the dev hub -# SFDX_CI_DEVHUB_JWT_KEY -- private key for the connected app (base64 encoded) -# SFDX_CI_DEVHUB_USERNAME -- username of an authorized user of the dev hub -# version: 2.1 -orbs: - win: circleci/windows@2.4.0 - release-management: salesforce/npm-release-management@4 - slack: circleci/slack@3.4.2 - github-cli: circleci/github-cli@2.1.0 - -parameters: - # Configurable Versions - cli-version: - type: string - default: '7.45.1' - lerna-version: - type: string - default: '3.13.1' - node-version: - type: string - # node > 16.13 doesn't exist on legacy CircleCI image https://hub.docker.com/r/circleci/node/tags - # Need to migrate from legacy CircleCI image (W-11027467) - default: '16.13.0' - # Constants - cache-version: - type: string - default: 'dependency-cache-v4-' - domain-retry: - description: 'SFDX Domain Retry Wait in Seconds' - type: integer - default: 300 - fingerprint: - type: string - default: '3b:68:69:7d:19:a4:50:69:ad:b8:db:57:f9:9c:f0:3f' - # Workflow Triggers - create-release: - type: boolean - default: false - publish: - type: boolean - default: false - publish-type: - type: string - default: minor - pre-publish: - type: boolean - default: false - -commands: - build-artifacts: - description: 'Building and archiving extension artifacts.' - steps: - - checkout - - restore_dependency_cache - - install - - compile - - package-extensions - - stage-and-store-artifacts - - save_dependency_cache - - build-win: - description: 'Build for Windows.' - steps: - - run: git config --global core.autocrlf false - - checkout - - restore_dependency_cache: - base-cache-path: << pipeline.parameters.cache-version >>-win - - run: - name: 'Install node' - shell: bash.exe - command: | - nvm install $NODE_VERSION - nvm use $NODE_VERSION - nvm install-latest-npm - - run: - name: 'Install dependent modules' - shell: bash.exe - command: | - npm config set scripts-prepend-node-path true - npm install - npm install -g sfdx-cli@<< pipeline.parameters.cli-version >> - npm install -g junit-merge - - run: - name: 'Compile' - shell: bash.exe - command: npm run compile - - save_dependency_cache: - base-cache-path: << pipeline.parameters.cache-version >>-win - - run: - name: 'Run lint' - shell: bash.exe - command: | - npm run lint - - compile: - parameters: - compile-mode: - type: string - default: production - steps: - - run: - name: 'Compile in << parameters.compile-mode >> mode' - environment: - - NODE_ENV: << parameters.compile-mode >> - command: | - npm run compile - - gh-config: - parameters: - cache_timeout: - description: 'Cache timeout in seconds' - type: integer - default: 120 - gh_email: - description: 'GitHub email' - type: string - default: $GH_EMAIL - gh_username: - description: 'GitHub username' - type: string - default: 'Release Bot' - steps: - - run: - name: 'Configuring GitHub' - command: | - git config credential.helper 'cache --timeout=<< parameters.cache_timeout >>' - git config user.email "<< parameters.gh_email >>" - git config user.name "<< parameters.gh_username >>" - git config --global pull.rebase true - - install: - description: 'Installing dependencies' - steps: - - run: npm ci - - run: npm --version - - run: node --version - - merge-validation: - description: 'Verify the release branch is not older than main' - parameters: - package-json-path: - type: string - default: './packages/salesforcedx-vscode/package.json' - steps: - - run: - name: 'Validate release version against main' - command: | - git checkout main - echo "export MAIN_RELEASE_VERSION="$(node -pe "require('<< parameters.package-json-path >>').version")"" >> $BASH_ENV - source $BASH_ENV - echo "MAIN_RELEASE_VERSION is: ${MAIN_RELEASE_VERSION}" - LOWER_VERSION="`echo -e "${MAIN_RELEASE_VERSION}\n${RELEASE_VERSION}" | sort -V | cut --delimiter $'\n' --fields 1`" - echo "Lower version was: ${LOWER_VERSION}" - if [ ${LOWER_VERSION} != ${MAIN_RELEASE_VERSION} ] - then - echo "The release branch is older than main. We do not want to rebase off of an old branch. Exiting." - exit 1; - fi - - package-extensions: - steps: - - run: - name: 'Packaging extensions' - command: npm run vscode:package - - prepare-gus-environment-variables: - parameters: - package-json-path: - type: string - default: './packages/salesforcedx-vscode/package.json' - release-tag-name: - type: string - default: 'offcore.tooling' - steps: - - run: - name: 'Prepare environment variables for GUS Change Case Management' - command: | - export GUS_BUILD="$(node -pe "require('<< parameters.package-json-path >>').version")" - echo "export SF_CHANGE_CASE_SCHEDULE_BUILD=<< parameters.release-tag-name >>.$GUS_BUILD" >> $BASH_ENV - source $BASH_ENV - - prepare-release-environment-variables: - parameters: - package-json-path: - type: string - default: './packages/salesforcedx-vscode/package.json' - steps: - - run: - name: 'Prepare release branch environment variable' - command: | - echo "export RELEASE_VERSION="$(node -pe "require('<< parameters.package-json-path >>').version")"" >> $BASH_ENV - source $BASH_ENV - echo "RELEASE_VERSION is: ${RELEASE_VERSION}" - - restore_dependency_cache: - # This logic cannot be done within the node orb currently. This is due to the fact that we use - # the package.json instead of the package-lock.json for our checksum. - parameters: - base-cache-path: - type: string - default: << pipeline.parameters.cache-version >> - steps: - - restore_cache: - keys: - - << parameters.base-cache-path >>{{ checksum "package.json" }} - - save_dependency_cache: - parameters: - base-cache-path: - type: string - default: << pipeline.parameters.cache-version >> - path-to-save: - type: string - default: 'node_modules' - steps: - - save_cache: - key: << parameters.base-cache-path >>{{ checksum "package.json" }} - paths: - - << parameters.path-to-save >> - - ssh-config: - steps: - - add_ssh_keys: - fingerprints: - - << pipeline.parameters.fingerprint >> - - stage-and-store-artifacts: - parameters: - location: - type: string - default: 'extensions' - steps: - - run: - name: 'Staging artifacts' - command: | - mkdir << parameters.location >> - find packages -name "*.vsix" -type f -exec cp {} ./<< parameters.location >> \; - - store_artifacts: - path: ./<< parameters.location >> - - store-crash-logs: - parameters: - location: - type: string - default: 'vscode-crash-logs' - steps: - - store_artifacts: - path: ./<< parameters.location >> - - updating-sha-for-publish: - steps: - - run: - name: 'Generating the SHA256 and appending to the file.' - command: npm run vscode:sha256 - - run: - name: 'Concatenating the contents to the proper SHA256.md' - command: scripts/concatenate-sha256.js - - run: - name: 'Removing the temp SHA256 file.' - command: rm ./SHA256 - - run: - name: 'Adding the SHA256 to git.' - command: | - git add SHA256.md - git commit -m "chore: updated SHA256 v${RELEASE_VERSION}" - -executors: - default-executor: - parameters: - # We are unable to use the recommended cimg docker images since they use the root path instead of home - image: - type: string - default: circleci/node:<< pipeline.parameters.node-version >> - working-dir: - type: string - default: ~/cli - docker: - - image: << parameters.image >> - working_directory: << parameters.working-dir >> - jobs: - build-all: - description: 'Build artifacts in a non-Windows environment' - executor: - name: default-executor - working-dir: ~/project - environment: - - SFDX_URL_LINUX: https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz - - SFDX_AUTOUPDATE_DISABLE: true - - SFDX_USE_GENERIC_UNIX_KEYCHAIN: true - - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> - steps: - - build-artifacts - - unit-tests: - description: 'Run tests on Windows' - executor: win/default - environment: - - SFDX_AUTOUPDATE_DISABLE: true - - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> - - NODE_VERSION: << pipeline.parameters.node-version >> - steps: - - build-win - - run: - name: 'Running unit tests' - shell: cmd.exe - command: npm run test:unit - - run: - name: 'Aggregate test results' - shell: bash.exe - command: | - set -e - npm run aggregateJUnit -- -t unit - junit-merge -d junit-aggregate -o junit-aggregate.xml - - store_test_results: - path: ./junit-aggregate/ - - run: - name: 'Check for Test Failures' - shell: powershell.exe - command: | - [xml]$results = Get-Content junit-aggregate.xml - $failure = $results.SelectSingleNode("//failure") - if ($failure -ne $null) { - Write-Host "Forcing build failure due to test failure(s) :'(" - $host.SetShouldExit(1) - } - - soql-ui-tests: - description: 'Run E2E SOQL UI Tests' - executor: win/default - environment: - - SFDX_AUTOUPDATE_DISABLE: true - - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> - - NODE_VERSION: << pipeline.parameters.node-version >> - steps: - - build-win - - run: - name: 'Run SOQL UI Tests if Needed' - shell: bash.exe - command: | - set -e - npm run test:ui - - integration-tests: - description: 'Run tests on Windows' - executor: win/default - environment: - - SFDX_AUTOUPDATE_DISABLE: true - - SFDX_DOMAIN_RETRY: << pipeline.parameters.domain-retry >> - - NODE_VERSION: << pipeline.parameters.node-version >> - steps: - - build-win - - run: - name: 'Authenticate to the default DevHub' - shell: bash.exe - command: | - echo $SFDX_CI_DEVHUB_JWTKEY | base64 --decode > devhub.key - sfdx force:auth:jwt:grant --clientid ${SFDX_CI_DEVHUB_CLIENTID} --username ${SFDX_CI_DEVHUB_USERNAME} --jwtkeyfile devhub.key --setdefaultdevhubusername --setalias devhub - rm devhub.key - - run: - name: 'Running integration tests' - shell: cmd.exe - command: npm run test:integration-tests-without-system-tests - - run: - name: 'Assert all tests ran and aggregate results' - shell: bash.exe - command: | - set -e - npm run aggregateJUnit -- -t integration vscode-integration - junit-merge -d junit-aggregate -o junit-aggregate.xml - - store_test_results: - path: ./junit-aggregate/ - - store-crash-logs - - run: - name: 'Check for Test Failures' - shell: powershell.exe - command: | - [xml]$results = Get-Content junit-aggregate.xml - $failure = $results.SelectSingleNode("//failure") - if ($failure -ne $null) { - Write-Host "Forcing build failure due to test failure(s) :'(" - $host.SetShouldExit(1) - } - - merge-release-branch: - parameters: - e: - type: executor - executor: << parameters.e >> - steps: - - slack/notify: - channel: 'pdt_releases' - color: '#FFDEAD' - message: 'Merging release branch into main' - - ssh-config - - checkout - - gh-config - - prepare-release-environment-variables - - merge-validation - - run: - name: 'Rebasing main off of release branch' - command: | - echo "Rebasing main off of release branch ${RELEASE_VERSION}" - git checkout main - git rebase -Xtheirs release/v${RELEASE_VERSION} - git push - - slack/notify: - channel: 'pdt_releases' - color: '#d8bfd8' - message: 'Main should now be rebased off of the release branch ${RELEASE_VERSION}' - - slack/status: - channel: 'pdt_releases' - fail_only: true - - publish: - parameters: - e: - type: executor - executor: << parameters.e >> - steps: - - slack/notify: - channel: 'pdt_releases' - color: '#FFDEAD' - message: 'Starting publish for VSCode Extensions' - - ssh-config - - checkout - - prepare-release-environment-variables - - prepare-gus-environment-variables - - restore_dependency_cache - - gh-config - - run: - name: 'Setup gus case management' - command: | - sudo npm install -g @salesforce/change-case-management@latest - - release-management/change-case-create - - install - - compile - - package-extensions - - updating-sha-for-publish - - stage-and-store-artifacts - - run: - name: 'Publishing to the VS Code Marketplace.' - command: npm run vscode:publish - - run: - name: 'Create git tag (e.g. v48.1.0) & push changes back to main branch' - command: | - git tag v${RELEASE_VERSION} - git push origin v${RELEASE_VERSION} - git push origin main - - github-cli/setup - - run: - name: 'Create release on git tag' - command: | - gh release create v${RELEASE_VERSION} ./packages/**/*.vsix --title "Release v${RELEASE_VERSION}" --notes-file ./packages/salesforcedx-vscode/CHANGELOG.md - - slack/notify: - channel: 'pdt_releases' - color: '#9bcd9b' - message: 'VSCode Extensions v${RELEASE_VERSION} have been published to the marketplace' - - slack/notify: - channel: 'pdt_releases' - color: '#FFDEAD' - message: 'VSCode Extensions v${RELEASE_VERSION} Post Publish - Starting merge of main into develop' - - run: - name: 'Merge changes from main back into develop' - command: | - git checkout develop - git pull - git merge main --commit --no-edit - git push origin develop - - slack/notify: - channel: 'pdt_releases' - color: '#9bcd9b' - message: 'VSCode Extensions v${RELEASE_VERSION} Post Publish - Succeeded' - - slack/status: - channel: 'pdt_releases' - fail_only: true - - run: - when: on_fail - name: Close CTC case as Not Implemented - command: | - if [ -z "${SF_CHANGE_CASE_SFDX_AUTH_URL}" ] || [ -z "${SF_CHANGE_CASE_TEMPLATE_ID}" ] || [ -z "${SF_CHANGE_CASE_SCHEDULE_BUILD}" ]; then - echo "Environment not configured for CTC" - else - sfchangecase close --location "https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" --status "Not Implemented" - fi - - run: - when: on_success - name: All Good! Close CTC case/implementations - command: | - if [ -z "${SF_CHANGE_CASE_SFDX_AUTH_URL}" ] || [ -z "${SF_CHANGE_CASE_TEMPLATE_ID}" ] || [ -z "${SF_CHANGE_CASE_SCHEDULE_BUILD}" ]; then - echo "Environment not configured for CTC" - else - sfchangecase close --location "https://github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" - fi - - create-release-branch: - parameters: - e: - type: executor - executor: << parameters.e >> - steps: - - slack/notify: - channel: 'pdt_releases' - color: '#FFDEAD' - message: 'Starting creation of release branch for VSCode Extensions' - - ssh-config - - checkout - - restore_dependency_cache - - gh-config - - run: - name: 'Install npm 8.12' - command: sudo npm install -g npm@8.12.1 - - install - - run: - name: Install Lerna - command: sudo npm install -g lerna@<< pipeline.parameters.lerna-version >> - - run: - name: Create release branch - command: | - git branch - scripts/create-release-branch.js -r << pipeline.parameters.publish-type >> - - slack/notify: - channel: 'pdt_releases' - color: '#d8bfd8' - message: 'VSCode Extensions release branch has been cut' - - slack/status: - channel: 'pdt_releases' - fail_only: true + say-date: + executor + docker: + - image: cimg/base:stable + parameters: + date: + type: string + default: none + steps: + - checkout + - run: + name: set var + command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV + - run: echo "$DATETIME" + - run: mkdir -p workspace + - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars + - run: echo "export BOB=$BAZ" >> workspace/new-env-vars + - run: cat workspace/new-env-vars + - run: cat workspace/new-env-vars >> $BASH_ENV + - run: echo ${DATETIME:-NULL} + - run: + name: make test artifacts + command: | + mkdir /tmp/artifacts; + echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt + - store_artifacts: + path: /tmp/artifacts + - persist_to_workspace: + root: workspace + paths: + - new-env-vars workflows: - version: 2.1 - - # run a build and a windows test on every commit - commit-workflow: - when: - and: - - not: << pipeline.parameters.create-release >> - - not: << pipeline.parameters.publish >> - - not: << pipeline.parameters.pre-publish >> - jobs: - - build-all - - unit-tests - - integration-tests - - pre-publish-workflow: - when: << pipeline.parameters.pre-publish >> - jobs: - - slack/approval-notification: - context: - - salesforce-ide - message: Pending Approval for merge of release branch into main - channel: 'pdt_releases' - color: '#0E1111' - - hold: # Requires manual approval in Circle Ci - type: approval - - merge-release-branch: - e: default-executor - context: - - salesforce-ide - requires: - - hold - filters: - branches: - only: - - /^release/v.*/ - - publish-workflow: - when: << pipeline.parameters.publish >> - jobs: - - slack/approval-notification: - context: - - salesforce-ide - message: Pending Approval for Publish - channel: 'pdt_releases' - color: '#0E1111' - - build-all - - unit-tests - - integration-tests - - hold: # Requires manual approval in Circle Ci - type: approval - - publish: - e: default-executor - context: - - salesforce-ide - - NPM_Salesforce-Releases - - CLI_CTC - requires: - - build-all - - unit-tests - - integration-tests - - hold - filters: - branches: - only: - - main - - create-release-branch-workflow: - when: << pipeline.parameters.create-release >> - jobs: - - slack/approval-notification: - context: - - salesforce-ide - message: Pending Approval for Creation of Release Branch - channel: 'pdt_releases' - color: '#0E1111' - - hold: # Requires manual approval in Circle Ci - type: approval - - create-release-branch: - e: default-executor - context: - - salesforce-ide - requires: - - hold - filters: - branches: - only: - - develop - - # run a build/test every mid-night - scheduled-workflow: - triggers: - - schedule: - cron: '0 0 * * *' - filters: - branches: - only: - - develop - - main - jobs: - - build-all - - unit-tests - - integration-tests - - soql-ui-tests - - cut-release: - triggers: - - schedule: - cron: '0 13 * * 1' - filters: - branches: - only: - - develop + say-date-workflow: jobs: - - create-release-branch: - e: default-executor + - say-date # TODO: Re-enable after issue wi From b31ee59d9a9a9f8a44c478f0671f0c7f6c0f0d3e Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:18:55 -0700 Subject: [PATCH 14/66] Update config.yml --- .circleci/config.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d374091..46ebe42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,9 +2,8 @@ version: 2.1 jobs: say-date: - executor - docker: - - image: cimg/base:stable + docker: + - image: cimg/base:stable parameters: date: type: string From ec344dea01eca04e4f0a20fb9ab2bab1b5bbeef0 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:20:31 -0700 Subject: [PATCH 15/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 46ebe42..2cfc028 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 jobs: - say-date: + say-date: docker: - image: cimg/base:stable parameters: From c7dcf20c03f57c49fd9cd5eb5a33587fb2ff4cab Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:22:01 -0700 Subject: [PATCH 16/66] Update config.yml --- .circleci/config.yml | 58 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2cfc028..fd534db 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,36 +1,36 @@ version: 2.1 - jobs: say-date: docker: - - image: cimg/base:stable - parameters: - date: - type: string - default: none - steps: - - checkout - - run: - name: set var - command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV - - run: echo "$DATETIME" - - run: mkdir -p workspace - - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars - - run: echo "export BOB=$BAZ" >> workspace/new-env-vars - - run: cat workspace/new-env-vars - - run: cat workspace/new-env-vars >> $BASH_ENV - - run: echo ${DATETIME:-NULL} - - run: - name: make test artifacts - command: | - mkdir /tmp/artifacts; - echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt - - store_artifacts: - path: /tmp/artifacts - - persist_to_workspace: - root: workspace - paths: - - new-env-vars + - image: cimg/base:stable + parameters: + + date: + type: string + default: none + steps: + - checkout + - run: + name: set var + command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV + - run: echo "$DATETIME" + - run: mkdir -p workspace + - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars + - run: echo "export BOB=$BAZ" >> workspace/new-env-vars + - run: cat workspace/new-env-vars + - run: cat workspace/new-env-vars >> $BASH_ENV + - run: echo ${DATETIME:-NULL} + - run: + name: make test artifacts + command: | + mkdir /tmp/artifacts; + echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt + - store_artifacts: + path: /tmp/artifacts + - persist_to_workspace: + root: workspace + paths: + - new-env-vars workflows: say-date-workflow: From 5ea027519a7c3efd005f8c2a46d606c4507ee07a Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:22:56 -0700 Subject: [PATCH 17/66] Update config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd534db..7a110b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,11 +3,11 @@ jobs: say-date: docker: - image: cimg/base:stable - parameters: +# parameters: - date: - type: string - default: none +# date: +# type: string +# default: none steps: - checkout - run: From 0fa301807677e3b28ef2963fb827816014a4e95a Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:24:13 -0700 Subject: [PATCH 18/66] Update config.yml --- .circleci/config.yml | 48 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a110b2..343635d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,36 +1,38 @@ version: 2.1 + jobs: say-date: docker: - - image: cimg/base:stable + - image: cimg/base:stable + # parameters: # date: # type: string # default: none steps: - - checkout - - run: - name: set var - command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV - - run: echo "$DATETIME" - - run: mkdir -p workspace - - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars - - run: echo "export BOB=$BAZ" >> workspace/new-env-vars - - run: cat workspace/new-env-vars - - run: cat workspace/new-env-vars >> $BASH_ENV - - run: echo ${DATETIME:-NULL} - - run: - name: make test artifacts - command: | - mkdir /tmp/artifacts; - echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt - - store_artifacts: - path: /tmp/artifacts - - persist_to_workspace: - root: workspace - paths: - - new-env-vars + - checkout + - run: + name: set var + command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV + - run: echo "$DATETIME" + - run: mkdir -p workspace + - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars + - run: echo "export BOB=$BAZ" >> workspace/new-env-vars + - run: cat workspace/new-env-vars + - run: cat workspace/new-env-vars >> $BASH_ENV + - run: echo ${DATETIME:-NULL} + - run: + name: make test artifacts + command: | + mkdir /tmp/artifacts; + echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt + - store_artifacts: + path: /tmp/artifacts + - persist_to_workspace: + root: workspace + paths: + - new-env-vars workflows: say-date-workflow: From 2d986b820b137677fa8d1236dbbd9a6fb4cf612f Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:25:03 -0700 Subject: [PATCH 19/66] Update config.yml --- .circleci/config.yml | 52 +++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 343635d..1fc637d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,41 +1,23 @@ version: 2.1 - +commands: # a reusable command with parameters + greeting: + parameters: + to: + default: "world" + type: string + steps: + - run: echo "Hello <>" jobs: - say-date: + my-job: docker: - image: cimg/base:stable - -# parameters: - -# date: -# type: string -# default: none - steps: - - checkout - - run: - name: set var - command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV - - run: echo "$DATETIME" - - run: mkdir -p workspace - - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars - - run: echo "export BOB=$BAZ" >> workspace/new-env-vars - - run: cat workspace/new-env-vars - - run: cat workspace/new-env-vars >> $BASH_ENV - - run: echo ${DATETIME:-NULL} - - run: - name: make test artifacts - command: | - mkdir /tmp/artifacts; - echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt - - store_artifacts: - path: /tmp/artifacts - - persist_to_workspace: - root: workspace - paths: - - new-env-vars - + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + steps: + - greeting: + to: "My-Name" workflows: - say-date-workflow: + my-workflow: jobs: - - say-date - # TODO: Re-enable after issue wi + - my-job From 0eabb461a1068e33920948edc70653a70d62c2bd Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:25:33 -0700 Subject: [PATCH 20/66] Update config.yml --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1fc637d..fa4ff1e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,9 +11,6 @@ jobs: my-job: docker: - image: cimg/base:stable - auth: - username: mydockerhub-user - password: $DOCKERHUB_PASSWORD # context / project UI env-var reference steps: - greeting: to: "My-Name" From 887e26f6d50cee6dfb5e05a1a378fa39a392fc4c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:28:50 -0700 Subject: [PATCH 21/66] Update config.yml --- .circleci/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index fa4ff1e..d7b3661 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,10 @@ jobs: my-job: docker: - image: cimg/base:stable + parameters: + date: + type: string + default: none steps: - greeting: to: "My-Name" From 4fd538c16e492a19236d00dbdcf7c90df1c202fc Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:30:29 -0700 Subject: [PATCH 22/66] Update config.yml --- .circleci/config.yml | 45 ++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7b3661..c99b2f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,14 @@ version: 2.1 -commands: # a reusable command with parameters - greeting: - parameters: - to: - default: "world" - type: string - steps: - - run: echo "Hello <>" +# commands: # a reusable command with parameters +# greeting: +# parameters: +# to: +# default: "world" +# type: string +# steps: +# - run: echo "Hello <>" jobs: - my-job: + say-date: docker: - image: cimg/base:stable parameters: @@ -16,9 +16,30 @@ jobs: type: string default: none steps: - - greeting: - to: "My-Name" + - checkout + - run: + name: set var + command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV + - run: echo "$DATETIME" + - run: mkdir -p workspace + - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars + - run: echo "export BOB=$BAZ" >> workspace/new-env-vars + - run: cat workspace/new-env-vars + - run: cat workspace/new-env-vars >> $BASH_ENV + - run: echo ${DATETIME:-NULL} + - run: + name: make test artifacts + command: | + mkdir /tmp/artifacts; + echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt + - store_artifacts: + path: /tmp/artifacts + - persist_to_workspace: + root: workspace + paths: + - new-env-vars + workflows: my-workflow: jobs: - - my-job + - say-date From 1cff53d5b4c80b0be281ec578af5de70173527b2 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:31:04 -0700 Subject: [PATCH 23/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c99b2f5..e7c1506 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout - run: name: set var - command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV + command: echo "export DATETIME=`date 413`" >> $BASH_ENV - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From 247f1584b9f329f34ff7f017ba6f503bb642339b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:32:24 -0700 Subject: [PATCH 24/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e7c1506..5b5c0ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout - run: name: set var - command: echo "export DATETIME=`date 413`" >> $BASH_ENV + command: echo "export DATETIME='date +%Y%m%d.%H%M'" >> $BASH_ENV - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From 53e3ec1b899010e6d63a79ae743594b138d39579 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:32:57 -0700 Subject: [PATCH 25/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b5c0ce..c6f82a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout - run: name: set var - command: echo "export DATETIME='date +%Y%m%d.%H%M'" >> $BASH_ENV + command: echo "export DATETIME=date +%Y%m%d.%H%M" >> $BASH_ENV - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From c1647c58419276e2fcda7ca01f17a034b49b73d3 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:33:22 -0700 Subject: [PATCH 26/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6f82a4..747e8ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout - run: name: set var - command: echo "export DATETIME=date +%Y%m%d.%H%M" >> $BASH_ENV + command: echo "export DATETIME=Hi" >> $BASH_ENV - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From cc1be5b09f2ca6e0835af633a7ee1ee266b2cefb Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:34:43 -0700 Subject: [PATCH 27/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 747e8ba..c79a1f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout - run: name: set var - command: echo "export DATETIME=Hi" >> $BASH_ENV + command: echo 'export DATETIME="FOO"' >> $BASH_ENV - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From 0f5e5c87afb748d3388f57fa45480207e3426c34 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:35:43 -0700 Subject: [PATCH 28/66] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c79a1f4..b5d9f83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,8 @@ jobs: - checkout - run: name: set var - command: echo 'export DATETIME="FOO"' >> $BASH_ENV + command: echo 'export DATETIME="FOO"' >> "$BASH_ENV" +# echo 'export MY_ENV_VAR="FOO"' >> "$BASH_ENV" - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From 04c8dbe82cca9b03fc790b115e0eb0e7acdd2d4b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:36:27 -0700 Subject: [PATCH 29/66] Update config.yml --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b5d9f83..3db6e07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,8 +19,9 @@ jobs: - checkout - run: name: set var - command: echo 'export DATETIME="FOO"' >> "$BASH_ENV" -# echo 'export MY_ENV_VAR="FOO"' >> "$BASH_ENV" +# command: echo 'export DATETIME="FOO"' >> "$BASH_ENV" + command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> "$BASH_ENV" + - run: echo "$DATETIME" - run: mkdir -p workspace - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars From c764d821047c05444b5c9a0c1a8fdc3b3e396d9d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:37:57 -0700 Subject: [PATCH 30/66] Update config.yml --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3db6e07..e22bbc6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,6 @@ jobs: - checkout - run: name: set var -# command: echo 'export DATETIME="FOO"' >> "$BASH_ENV" command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> "$BASH_ENV" - run: echo "$DATETIME" From 5d82cde4d75a82da3aa79e37976e1752c0a764e8 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:38:13 -0700 Subject: [PATCH 31/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e22bbc6..3ddb0f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,7 +18,7 @@ jobs: steps: - checkout - run: - name: set var + name: set var command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> "$BASH_ENV" - run: echo "$DATETIME" From 31d198a8a19fdb316527f4f8484d848fe69388f0 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:50:39 -0700 Subject: [PATCH 32/66] Update config.yml --- .circleci/config.yml | 113 ++++++++++++++++++++++++++++--------------- 1 file changed, 73 insertions(+), 40 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3ddb0f9..ae93d2a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,46 +1,79 @@ -version: 2.1 -# commands: # a reusable command with parameters -# greeting: +# version: 2.1 +# jobs: +# say-date: +# docker: +# - image: cimg/base:stable # parameters: -# to: -# default: "world" +# date: # type: string +# default: none # steps: -# - run: echo "Hello <>" -jobs: - say-date: - docker: - - image: cimg/base:stable - parameters: - date: - type: string - default: none - steps: - - checkout - - run: - name: set var - command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> "$BASH_ENV" +# - checkout +# - run: +# name: set var +# command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> "$BASH_ENV" - - run: echo "$DATETIME" - - run: mkdir -p workspace - - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars - - run: echo "export BOB=$BAZ" >> workspace/new-env-vars - - run: cat workspace/new-env-vars - - run: cat workspace/new-env-vars >> $BASH_ENV - - run: echo ${DATETIME:-NULL} - - run: - name: make test artifacts - command: | - mkdir /tmp/artifacts; - echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt - - store_artifacts: - path: /tmp/artifacts - - persist_to_workspace: - root: workspace - paths: - - new-env-vars +# - run: echo "$DATETIME" +# - run: mkdir -p workspace +# - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars +# - run: echo "export BOB=$BAZ" >> workspace/new-env-vars +# - run: cat workspace/new-env-vars +# - run: cat workspace/new-env-vars >> $BASH_ENV +# - run: echo ${DATETIME:-NULL} +# - run: +# name: make test artifacts +# command: | +# mkdir /tmp/artifacts; +# echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt +# - store_artifacts: +# path: /tmp/artifacts +# - persist_to_workspace: +# root: workspace +# paths: +# - new-env-vars +# workflows: +# my-workflow: +# jobs: +# - say-date +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference + +version: 2.1 + +jobs: +say-date: +  docker: +  - image: cimg/base:stable +parameters: +date: +    type: string +    default: none +  steps: +    - checkout +    - run: +name: set var +command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV +  - run: echo "$DATETIME" +    - run: mkdir -p workspace +    - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars +  - run: echo "export BOB=$BAZ" >> workspace/new-env-vars +  - run: cat workspace/new-env-vars +  - run: cat workspace/new-env-vars >> $BASH_ENV +  - run: echo ${DATETIME:-NULL} +  - run: +      name: make test artifacts +command: | +mkdir /tmp/artifacts; +echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt +- store_artifacts: +path: /tmp/artifacts +- persist_to_workspace: +root: workspace +paths: +- new-env-vars + workflows: - my-workflow: - jobs: - - say-date +  say-date-workflow: +    jobs: +      - say-date From 9d845c494510d557ac0675bdab4a26f6c20f88c5 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:51:57 -0700 Subject: [PATCH 33/66] Update config.yml --- .circleci/config.yml | 66 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae93d2a..b7245aa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,38 +42,38 @@ version: 2.1 jobs: -say-date: -  docker: -  - image: cimg/base:stable -parameters: -date: -    type: string -    default: none -  steps: -    - checkout -    - run: -name: set var -command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV -  - run: echo "$DATETIME" -    - run: mkdir -p workspace -    - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars -  - run: echo "export BOB=$BAZ" >> workspace/new-env-vars -  - run: cat workspace/new-env-vars -  - run: cat workspace/new-env-vars >> $BASH_ENV -  - run: echo ${DATETIME:-NULL} -  - run: -      name: make test artifacts -command: | -mkdir /tmp/artifacts; -echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt -- store_artifacts: -path: /tmp/artifacts -- persist_to_workspace: -root: workspace -paths: -- new-env-vars + say-date: + docker: + - image: cimg/base:stable + parameters: + date: + type: string + default: none + steps: + - checkout + - run: + name: set var + command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV + - run: echo "$DATETIME" + - run: mkdir -p workspace + - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars + - run: echo "export BOB=$BAZ" >> workspace/new-env-vars + - run: cat workspace/new-env-vars + - run: cat workspace/new-env-vars >> $BASH_ENV + - run: echo ${DATETIME:-NULL} + - run: + name: make test artifacts + command: | + mkdir /tmp/artifacts; + echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt + - store_artifacts: + path: /tmp/artifacts + - persist_to_workspace: + root: workspace + paths: + - new-env-vars workflows: -  say-date-workflow: -    jobs: -      - say-date + say-date-workflow: + jobs: + - say-date From 0b5f0dbf271303e5cd46a851645a365d2773681a Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:16:06 -1000 Subject: [PATCH 34/66] Update config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index b7245aa..647e57f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,6 +51,8 @@ jobs: default: none steps: - checkout + - setup_remote_docker: + version: 20.10.17 - run: name: set var command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV From dfac9159d201a010382febaa639e0db326f0608f Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:49:32 -1000 Subject: [PATCH 35/66] Update config.yml --- .circleci/config.yml | 135 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 647e57f..91b1776 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,6 +39,8 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. # See: https://circleci.com/docs/2.0/configuration-reference + + version: 2.1 jobs: @@ -74,8 +76,141 @@ jobs: root: workspace paths: - new-env-vars + docker-build-and-push-fr-web: + docker: + - image: cimg/python:3.9-node + environment: + - BUILDKIT_PROGRESS: plain + steps: + - run: + command: | + mkdir -p ~/.ssh; + ssh-keyscan -H github.com >> ~/.ssh/known_hosts; + git clone --depth 50 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" .; + git checkout --force -B "$CIRCLE_BRANCH" "$CIRCLE_SHA1"; + name: Checkout code + - run: + command: | + if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi + + if [ ! "$(which aws)" ] || [ "$PARAM_AWS_CLI_OVERRIDE" = 1 ]; then + # setup + if [ ! "$PARAM_AWS_CLI_VERSION" = "latest" ]; then export AWS_CLI_VER_STRING="-$PARAM_AWS_CLI_VERSION"; fi + + # Uninstall existing AWS CLI if override is enabled. + if [ "$PARAM_AWS_CLI_OVERRIDE" = 1 ]; then + AWS_CLI_PATH=$(which aws) + if [ -n "$AWS_CLI_PATH" ]; then + EXISTING_AWS_VERSION=$(aws --version) + echo "Uninstalling ${EXISTING_AWS_VERSION}" + # shellcheck disable=SC2012 + if [ -L "$AWS_CLI_PATH" ]; then + AWS_SYMLINK_PATH=$(ls -l "$AWS_CLI_PATH" | sed -e 's/.* -> //') + fi + $SUDO rm -rf "$AWS_CLI_PATH" "$AWS_SYMLINK_PATH" "$HOME/.aws/" "/usr/local/bin/aws" "/usr/local/bin/aws_completer" "/usr/local/aws-cli" + else + echo "No AWS install found" + fi + fi + + echo "Installing AWS CLI v2" + cd /tmp || exit + # Platform check + if uname -a | grep "Darwin"; then + export SYS_ENV_PLATFORM=macos + elif uname -a | grep "x86_64 GNU/Linux"; then + export SYS_ENV_PLATFORM=linux_x86 + elif uname -a | grep "aarch64 GNU/Linux"; then + export SYS_ENV_PLATFORM=linux_arm + else + echo "This platform appears to be unsupported." + uname -a + exit 1 + fi + echo "Platform $SYS_ENV_PLATFORM" + # Install per platform + case $SYS_ENV_PLATFORM in + linux_x86) + curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64${AWS_CLI_VER_STRING}.zip" -o "awscliv2.zip" + unzip -q -o awscliv2.zip + $SUDO ./aws/install + rm awscliv2.zip + ;; + macos) + curl -sSL "https://awscli.amazonaws.com/AWSCLIV2${AWS_CLI_VER_STRING}.pkg" -o "AWSCLIV2.pkg" + $SUDO installer -pkg AWSCLIV2.pkg -target / + rm AWSCLIV2.pkg + ;; + linux_arm) + curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-aarch64${AWS_CLI_VER_STRING}.zip" -o "awscliv2.zip" + unzip -q -o awscliv2.zip + $SUDO ./aws/install + rm awscliv2.zip + ;; + *) + echo "This orb does not currently support your platform. If you believe it should, please consider opening an issue on the GitHub repository:" + echo "https://github.com/CircleCI-Public/aws-cli-orb/issues/new" + exit 1 + ;; + esac + # Toggle AWS Pager + if [ "$PARAM_AWS_CLI_DISABLE_PAGER" = 1 ]; then + if [ -z "${AWS_PAGER+x}" ]; then + echo 'export AWS_PAGER=""' >> "$BASH_ENV" + echo "AWS_PAGER is being set to the empty string to disable all output paging for AWS CLI commands." + echo "You can set the 'disable-aws-pager' parameter to 'false' to disable this behavior." + fi + fi + else + echo "AWS CLI is already installed, skipping installation." + aws --version + fi + environment: + PARAM_AWS_CLI_DISABLE_PAGER: true + PARAM_AWS_CLI_OVERRIDE: false + PARAM_AWS_CLI_VERSION: latest + name: Install AWS CLI - latest + - run: + command: |- + PARAM_AWS_CLI_ACCESS_KEY_ID=$(eval echo "\$$PARAM_AWS_CLI_ACCESS_KEY_ID") + PARAM_AWS_CLI_SECRET_ACCESS_KEY=$(eval echo "\$$PARAM_AWS_CLI_SECRET_ACCESS_KEY") + PARAM_AWS_CLI_REGION=$(eval echo "\$$PARAM_AWS_CLI_REGION") + + aws configure set aws_access_key_id \ + "$PARAM_AWS_CLI_ACCESS_KEY_ID" \ + --profile "$PARAM_AWS_CLI_PROFILE_NAME" + aws configure set aws_secret_access_key \ + "$PARAM_AWS_CLI_SECRET_ACCESS_KEY" \ + --profile "$PARAM_AWS_CLI_PROFILE_NAME" + + if [ "$PARAM_AWS_CLI_CONFIG_DEFAULT_REGION" = "1" ]; then + aws configure set default.region "$PARAM_AWS_CLI_REGION" \ + --profile "$PARAM_AWS_CLI_PROFILE_NAME" + fi + + if [ "$PARAM_AWS_CLI_CONFIG_PROFILE_REGION" = "1" ]; then + aws configure set region "$PARAM_AWS_CLI_REGION" \ + --profile "$PARAM_AWS_CLI_PROFILE_NAME" + fi + + if [ -n "$PARAM_AWS_CLI_ROLE_ARN" ]; then + aws configure set role_arn "$PARAM_AWS_CLI_ROLE_ARN" \ + --profile "$PARAM_AWS_CLI_PROFILE_NAME" + fi + environment: + PARAM_AWS_CLI_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID + PARAM_AWS_CLI_CONFIG_DEFAULT_REGION: true + PARAM_AWS_CLI_CONFIG_PROFILE_REGION: true + PARAM_AWS_CLI_PROFILE_NAME: default + PARAM_AWS_CLI_REGION: AWS_DEFAULT_REGION + PARAM_AWS_CLI_ROLE_ARN: '' + PARAM_AWS_CLI_SECRET_ACCESS_KEY: AWS_SECRET_ACCESS_KEY + name: Configure AWS Access Key ID + - setup_remote_docker: + version: 20.10.17 workflows: say-date-workflow: jobs: - say-date + - docker-build-and-push-fr-web From 9b0ed2dceaf70e25e99eaf42e180835f5355478a Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:50:48 -1000 Subject: [PATCH 36/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 91b1776..13d629c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: parameters: date: type: string - default: none + default: "henna" steps: - checkout - setup_remote_docker: From da88ec37abb9d4c087c4d97e41413154810c0dd0 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:52:06 -1000 Subject: [PATCH 37/66] Update config.yml --- .circleci/config.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 13d629c..814a430 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,35 +47,10 @@ jobs: say-date: docker: - image: cimg/base:stable - parameters: - date: - type: string - default: "henna" steps: - checkout - setup_remote_docker: version: 20.10.17 - - run: - name: set var - command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> $BASH_ENV - - run: echo "$DATETIME" - - run: mkdir -p workspace - - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars - - run: echo "export BOB=$BAZ" >> workspace/new-env-vars - - run: cat workspace/new-env-vars - - run: cat workspace/new-env-vars >> $BASH_ENV - - run: echo ${DATETIME:-NULL} - - run: - name: make test artifacts - command: | - mkdir /tmp/artifacts; - echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt - - store_artifacts: - path: /tmp/artifacts - - persist_to_workspace: - root: workspace - paths: - - new-env-vars docker-build-and-push-fr-web: docker: - image: cimg/python:3.9-node From 68150bd5e75fc4eea917764d5f50c89b5fcd631f Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Tue, 18 Oct 2022 12:53:09 -1000 Subject: [PATCH 38/66] Update config.yml --- .circleci/config.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 814a430..5ccb782 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -48,9 +48,7 @@ jobs: docker: - image: cimg/base:stable steps: - - checkout - - setup_remote_docker: - version: 20.10.17 + - checkout docker-build-and-push-fr-web: docker: - image: cimg/python:3.9-node @@ -188,4 +186,3 @@ workflows: say-date-workflow: jobs: - say-date - - docker-build-and-push-fr-web From 5e4b03170415f048178641fbce7abd2282623b04 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:10:41 -0700 Subject: [PATCH 39/66] Update config.yml --- .circleci/config.yml | 1475 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 1296 insertions(+), 179 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5ccb782..783918b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,188 +1,1305 @@ -# version: 2.1 -# jobs: -# say-date: -# docker: -# - image: cimg/base:stable -# parameters: -# date: -# type: string -# default: none -# steps: -# - checkout -# - run: -# name: set var -# command: echo "export DATETIME=`date +%Y%m%d.%H%M`" >> "$BASH_ENV" - -# - run: echo "$DATETIME" -# - run: mkdir -p workspace -# - run: echo "export DATETIME=datetime.`date +%Y%m%d.%H%M%S`" >>workspace/new-env-vars -# - run: echo "export BOB=$BAZ" >> workspace/new-env-vars -# - run: cat workspace/new-env-vars -# - run: cat workspace/new-env-vars >> $BASH_ENV -# - run: echo ${DATETIME:-NULL} -# - run: -# name: make test artifacts -# command: | -# mkdir /tmp/artifacts; -# echo "my artifact files in a dir" > /tmp/artifacts/encap-staging-no-color_${DATETIME:-NULL}.txt -# - store_artifacts: -# path: /tmp/artifacts -# - persist_to_workspace: -# root: workspace -# paths: -# - new-env-vars - -# workflows: -# my-workflow: -# jobs: -# - say-date -# Use the latest 2.1 version of CircleCI pipeline process engine. # See: https://circleci.com/docs/2.0/configuration-reference - - - version: 2.1 +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +orbs: + browser-tools: circleci/browser-tools@1.4.4 + node: circleci/node@5.1.0 + slack: circleci/slack@4.6.3 jobs: - say-date: - docker: - - image: cimg/base:stable - steps: - - checkout - docker-build-and-push-fr-web: + test: &BASE_QA + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: - - image: cimg/python:3.9-node - environment: - - BUILDKIT_PROGRESS: plain + - image: cimg/node:18.17.1-browsers + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + # - browser-tools/install-chrome + # - browser-tools/install-chromedriver + - browser-tools/install-browser-tools: + chrome-version: 117.0.5938.88 # TODO: remove when chromedriver downloads are fixed + # https://googlechromelabs.github.io/chrome-for-testing/ + - run: + name: "NPM version" + command: | + npm -v + - run: + name: "Node version" + command: | + node -v + # - run: + # name: "Chrome version" + # command: | + # google-chrome --version + # chromedriver --version + - run: + name: "Install Packages" + command: | + npm install + - run: + name: Print Env + command: env + - run: + name: "Running Tests" + command: | + if [ -z "${COUNTRY}" ] || [ -z "${SUITE}" ] || [ -z "${TARGET}" ] + then + exit + else + npm run test "${COUNTRY}" "${SUITE}" "${TARGET}" + fi + - store_artifacts: + path: tests/reports/screenshots + name: Screenshots + - store_artifacts: + path: tests/reports/report + name: HTML Report + - run: + name: Get Artifacts + when: always + command: | + set -x + artifacts=$(curl -X GET "https://circleci.com/api/v2/project/bitbucket/rituals/frontend-automation/$CIRCLE_BUILD_NUM/artifacts" \ + -H "Accept: application/json" \ + -H "Circle-Token: ${CIRCLE_API_TOKEN}" | grep -o 'https://[^"]*/index.html') + # generate a heredoc in BASH_ENV + # the '\<<' is a CircleCI escape + echo "read -r -d '' STORED_ARTIFACTS \<< 'EOF_ARTIFACTS'" >> $BASH_ENV + echo "$artifacts" >> $BASH_ENV + echo "EOF_ARTIFACTS" >> $BASH_ENV + - slack/notify: + event: fail + custom: | + { + "blocks": [ + { + "type": "divider" + }, + { + "type": "header", + "text": { + "type": "plain_text", + "text": "${CIRCLE_JOB} Failed. :x:", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Branch*: ${CIRCLE_BRANCH}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*There is a report ready:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "HTML Report :receipt:", + "emoji": true + }, + "value": "Report", + "url": "$STORED_ARTIFACTS", + "action_id": "button-action" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*CircleCI workflow Job:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "CircleCI :hammer_and_wrench:", + "emoji": true + }, + "value": "View Job", + "url": "${CIRCLE_BUILD_URL}", + "action_id": "button-action" + } + }, + { + "type": "divider" + } + ] + } + - slack/notify: + event: pass + channel: "C02AD8HR2UR" + custom: | + { + "blocks": [ + { + "type": "divider" + }, + { + "type": "header", + "text": { + "type": "plain_text", + "text": "${CIRCLE_JOB} Succeeded. :white_check_mark:", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Branch*: ${CIRCLE_BRANCH}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*There is a report ready:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "HTML Report :receipt:", + "emoji": true + }, + "value": "Report", + "url": "$STORED_ARTIFACTS", + "action_id": "button-action" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*CircleCI workflow Job:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "CircleCI :hammer_and_wrench:", + "emoji": true + }, + "value": "View Job", + "url": "${CIRCLE_BUILD_URL}", + "action_id": "button-action" + } + }, + { + "type": "divider" + } + ] + } + + develop: &BASE_QA_DEV + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: cimg/node:18.17.1-browsers + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - - run: - command: | - mkdir -p ~/.ssh; - ssh-keyscan -H github.com >> ~/.ssh/known_hosts; - git clone --depth 50 "$CIRCLE_REPOSITORY_URL" --branch "$CIRCLE_BRANCH" .; - git checkout --force -B "$CIRCLE_BRANCH" "$CIRCLE_SHA1"; - name: Checkout code - - run: - command: | - if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi - - if [ ! "$(which aws)" ] || [ "$PARAM_AWS_CLI_OVERRIDE" = 1 ]; then - # setup - if [ ! "$PARAM_AWS_CLI_VERSION" = "latest" ]; then export AWS_CLI_VER_STRING="-$PARAM_AWS_CLI_VERSION"; fi - - # Uninstall existing AWS CLI if override is enabled. - if [ "$PARAM_AWS_CLI_OVERRIDE" = 1 ]; then - AWS_CLI_PATH=$(which aws) - if [ -n "$AWS_CLI_PATH" ]; then - EXISTING_AWS_VERSION=$(aws --version) - echo "Uninstalling ${EXISTING_AWS_VERSION}" - # shellcheck disable=SC2012 - if [ -L "$AWS_CLI_PATH" ]; then - AWS_SYMLINK_PATH=$(ls -l "$AWS_CLI_PATH" | sed -e 's/.* -> //') - fi - $SUDO rm -rf "$AWS_CLI_PATH" "$AWS_SYMLINK_PATH" "$HOME/.aws/" "/usr/local/bin/aws" "/usr/local/bin/aws_completer" "/usr/local/aws-cli" - else - echo "No AWS install found" - fi - fi - - echo "Installing AWS CLI v2" - cd /tmp || exit - # Platform check - if uname -a | grep "Darwin"; then - export SYS_ENV_PLATFORM=macos - elif uname -a | grep "x86_64 GNU/Linux"; then - export SYS_ENV_PLATFORM=linux_x86 - elif uname -a | grep "aarch64 GNU/Linux"; then - export SYS_ENV_PLATFORM=linux_arm - else - echo "This platform appears to be unsupported." - uname -a - exit 1 - fi - echo "Platform $SYS_ENV_PLATFORM" - # Install per platform - case $SYS_ENV_PLATFORM in - linux_x86) - curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64${AWS_CLI_VER_STRING}.zip" -o "awscliv2.zip" - unzip -q -o awscliv2.zip - $SUDO ./aws/install - rm awscliv2.zip - ;; - macos) - curl -sSL "https://awscli.amazonaws.com/AWSCLIV2${AWS_CLI_VER_STRING}.pkg" -o "AWSCLIV2.pkg" - $SUDO installer -pkg AWSCLIV2.pkg -target / - rm AWSCLIV2.pkg - ;; - linux_arm) - curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-aarch64${AWS_CLI_VER_STRING}.zip" -o "awscliv2.zip" - unzip -q -o awscliv2.zip - $SUDO ./aws/install - rm awscliv2.zip - ;; - *) - echo "This orb does not currently support your platform. If you believe it should, please consider opening an issue on the GitHub repository:" - echo "https://github.com/CircleCI-Public/aws-cli-orb/issues/new" - exit 1 - ;; - esac - # Toggle AWS Pager - if [ "$PARAM_AWS_CLI_DISABLE_PAGER" = 1 ]; then - if [ -z "${AWS_PAGER+x}" ]; then - echo 'export AWS_PAGER=""' >> "$BASH_ENV" - echo "AWS_PAGER is being set to the empty string to disable all output paging for AWS CLI commands." - echo "You can set the 'disable-aws-pager' parameter to 'false' to disable this behavior." - fi - fi - else - echo "AWS CLI is already installed, skipping installation." - aws --version - fi - environment: - PARAM_AWS_CLI_DISABLE_PAGER: true - PARAM_AWS_CLI_OVERRIDE: false - PARAM_AWS_CLI_VERSION: latest - name: Install AWS CLI - latest - - run: - command: |- - PARAM_AWS_CLI_ACCESS_KEY_ID=$(eval echo "\$$PARAM_AWS_CLI_ACCESS_KEY_ID") - PARAM_AWS_CLI_SECRET_ACCESS_KEY=$(eval echo "\$$PARAM_AWS_CLI_SECRET_ACCESS_KEY") - PARAM_AWS_CLI_REGION=$(eval echo "\$$PARAM_AWS_CLI_REGION") - - aws configure set aws_access_key_id \ - "$PARAM_AWS_CLI_ACCESS_KEY_ID" \ - --profile "$PARAM_AWS_CLI_PROFILE_NAME" - aws configure set aws_secret_access_key \ - "$PARAM_AWS_CLI_SECRET_ACCESS_KEY" \ - --profile "$PARAM_AWS_CLI_PROFILE_NAME" - - if [ "$PARAM_AWS_CLI_CONFIG_DEFAULT_REGION" = "1" ]; then - aws configure set default.region "$PARAM_AWS_CLI_REGION" \ - --profile "$PARAM_AWS_CLI_PROFILE_NAME" - fi - - if [ "$PARAM_AWS_CLI_CONFIG_PROFILE_REGION" = "1" ]; then - aws configure set region "$PARAM_AWS_CLI_REGION" \ - --profile "$PARAM_AWS_CLI_PROFILE_NAME" - fi - - if [ -n "$PARAM_AWS_CLI_ROLE_ARN" ]; then - aws configure set role_arn "$PARAM_AWS_CLI_ROLE_ARN" \ - --profile "$PARAM_AWS_CLI_PROFILE_NAME" - fi - environment: - PARAM_AWS_CLI_ACCESS_KEY_ID: AWS_ACCESS_KEY_ID - PARAM_AWS_CLI_CONFIG_DEFAULT_REGION: true - PARAM_AWS_CLI_CONFIG_PROFILE_REGION: true - PARAM_AWS_CLI_PROFILE_NAME: default - PARAM_AWS_CLI_REGION: AWS_DEFAULT_REGION - PARAM_AWS_CLI_ROLE_ARN: '' - PARAM_AWS_CLI_SECRET_ACCESS_KEY: AWS_SECRET_ACCESS_KEY - name: Configure AWS Access Key ID - - setup_remote_docker: - version: 20.10.17 + - checkout + + - run: sudo apt-get update + - browser-tools/install-browser-tools: + chrome-version: 117.0.5938.88 # TODO: remove when chromedriver downloads are fixed + - run: + name: "NPM version" + command: | + npm -v + - run: + name: "Node version" + command: | + node -v + + - run: + name: "Install Packages" + command: | + npm install + - run: + name: Print Env + command: env + - run: + name: "Running Tests" + command: | + if [ -z "${COUNTRY}" ] || [ -z "${SUITE}" ] || [ -z "${TARGET}" ] + then + exit + else + npm run test "${COUNTRY}" "${SUITE}" "${TARGET}" + fi + - store_artifacts: + path: tests/reports/screenshots + name: Screenshots + - store_artifacts: + path: tests/reports/report + name: HTML Report + - run: + name: Get Artifacts + when: always + command: | + set -x + artifacts=$(curl -X GET "https://circleci.com/api/v2/project/bitbucket/rituals/frontend-automation/$CIRCLE_BUILD_NUM/artifacts" \ + -H "Accept: application/json" \ + -H "Circle-Token: ${CIRCLE_API_TOKEN}" | grep -o 'https://[^"]*/index.html') + # generate a heredoc in BASH_ENV + # the '\<<' is a CircleCI escape + echo "read -r -d '' STORED_ARTIFACTS \<< 'EOF_ARTIFACTS'" >> $BASH_ENV + echo "$artifacts" >> $BASH_ENV + echo "EOF_ARTIFACTS" >> $BASH_ENV + - slack/notify: + event: fail + channel: "C02AD8HR2UR" + custom: | + { + "blocks": [ + { + "type": "divider" + }, + { + "type": "header", + "text": { + "type": "plain_text", + "text": "${CIRCLE_JOB} Failed. :x:", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Branch*: ${CIRCLE_BRANCH}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*There is a report ready:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "HTML Report :receipt:", + "emoji": true + }, + "value": "Report", + "url": "$STORED_ARTIFACTS", + "action_id": "button-action" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*CircleCI workflow Job:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "CircleCI :hammer_and_wrench:", + "emoji": true + }, + "value": "View Job", + "url": "${CIRCLE_BUILD_URL}", + "action_id": "button-action" + } + }, + { + "type": "divider" + } + ] + } + - slack/notify: + event: pass + channel: "C02AD8HR2UR" + custom: | + { + "blocks": [ + { + "type": "divider" + }, + { + "type": "header", + "text": { + "type": "plain_text", + "text": "${CIRCLE_JOB} Succeeded. :white_check_mark:", + "emoji": true + } + }, + { + "type": "section", + "fields": [ + { + "type": "mrkdwn", + "text": "*Branch*: ${CIRCLE_BRANCH}" + } + ] + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*There is a report ready:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "HTML Report :receipt:", + "emoji": true + }, + "value": "Report", + "url": "$STORED_ARTIFACTS", + "action_id": "button-action" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*CircleCI workflow Job:*" + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "CircleCI :hammer_and_wrench:", + "emoji": true + }, + "value": "View Job", + "url": "${CIRCLE_BUILD_URL}", + "action_id": "button-action" + } + }, + { + "type": "divider" + } + ] + } + # ----- TEST STAGING ------ + # -------------------------- + AT_QA_ACCOUNTS_STAG: + environment: + COUNTRY: AT + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + NL_QA_ACCOUNTS_STAG: + environment: + COUNTRY: NL + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + CH_QA_ACCOUNTS_STAG: + environment: + COUNTRY: CH + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + DE_QA_ACCOUNTS_STAG: + environment: + COUNTRY: DE + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + ES_QA_ACCOUNTS_STAG: + environment: + COUNTRY: ES + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + BE_QA_ACCOUNTS_STAG: + environment: + COUNTRY: BE + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + UK_QA_ACCOUNTS_STAG: + environment: + COUNTRY: UK + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + SE_QA_ACCOUNTS_STAG: + environment: + COUNTRY: SE + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + FR_QA_ACCOUNTS_STAG: + environment: + COUNTRY: FR + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + NOR_QA_ACCOUNTS_STAG: + environment: + COUNTRY: NOR + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + US_QA_ACCOUNTS_STAG: + environment: + COUNTRY: US + SUITE: Accounts + TARGET: stag + <<: *BASE_QA + + NL_QA_PAYMENTS_STAG: + environment: + COUNTRY: NL + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + DE_QA_PAYMENTS_STAG: + environment: + COUNTRY: DE + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + BE_QA_PAYMENTS_STAG: + environment: + COUNTRY: BE + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + UK_QA_PAYMENTS_STAG: + environment: + COUNTRY: UK + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + SE_QA_PAYMENTS_STAG: + environment: + COUNTRY: SE + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + FR_QA_PAYMENTS_STAG: + environment: + COUNTRY: FR + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + CH_QA_PAYMENTS_STAG: + environment: + COUNTRY: CH + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + AT_QA_PAYMENTS_STAG: + environment: + COUNTRY: AT + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + NOR_QA_PAYMENTS_STAG: + environment: + COUNTRY: NOR + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + ES_QA_PAYMENTS_STAG: + environment: + COUNTRY: ES + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + US_QA_PAYMENTS_STAG: + environment: + COUNTRY: US + SUITE: Payments + TARGET: stag + <<: *BASE_QA + + # NL_QA_SESSIONS: + # environment: + # COUNTRY: NL + # SUITE: Sessions + # TARGET: stag + # <<: *BASE_QA + + # ------------------ PROD ------------------ + # ------------------------------------------ + NL_QA_PAYMENTS_PROD: + environment: + COUNTRY: NL + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + DE_QA_PAYMENTS_PROD: + environment: + COUNTRY: DE + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + BE_QA_PAYMENTS_PROD: + environment: + COUNTRY: BE + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + UK_QA_PAYMENTS_PROD: + environment: + COUNTRY: UK + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + SE_QA_PAYMENTS_PROD: + environment: + COUNTRY: SE + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + FR_QA_PAYMENTS_PROD: + environment: + COUNTRY: FR + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + CH_QA_PAYMENTS_PROD: + environment: + COUNTRY: CH + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + AT_QA_PAYMENTS_PROD: + environment: + COUNTRY: AT + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + NOR_QA_PAYMENTS_PROD: + environment: + COUNTRY: NOR + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + ES_QA_PAYMENTS_PROD: + environment: + COUNTRY: ES + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + US_QA_PAYMENTS_PROD: + environment: + COUNTRY: US + SUITE: Payments + TARGET: prod + <<: *BASE_QA + + + + # ----- DEVELOPMENT ------- + # ------------------------- + QA: + <<: *BASE_QA_DEV + # ----- ACCOUNTS STAGING DEVELOPMENT -------- + AT_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: AT + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + NL_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: NL + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + CH_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: CH + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + DE_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: DE + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + ES_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: ES + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + BE_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: BE + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + UK_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: UK + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + SE_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: SE + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + FR_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: FR + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + NOR_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: NOR + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV + + US_QA_ACCOUNTS_STAG-DEV: + environment: + COUNTRY: US + SUITE: Accounts + TARGET: stag + <<: *BASE_QA_DEV +# ----- PAYMENTS STAGING DEVELOPMENT ---------- + NL_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: NL + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + DE_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: DE + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + BE_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: BE + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + UK_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: UK + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + SE_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: SE + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + FR_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: FR + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + CH_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: CH + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + AT_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: AT + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + NOR_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: NOR + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + ES_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: ES + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + + US_QA_PAYMENTS_STAG-DEV: + environment: + COUNTRY: US + SUITE: Payments + TARGET: stag + <<: *BASE_QA_DEV + # -------- PAYMENTS PRODUCTION ---------- + NL_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: NL + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + DE_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: DE + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + BE_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: BE + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + UK_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: UK + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + SE_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: SE + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + FR_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: FR + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + CH_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: CH + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + AT_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: AT + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + NOR_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: NOR + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + ES_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: ES + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + + US_QA_PAYMENTS_PROD-DEV: + environment: + COUNTRY: US + SUITE: Payments + TARGET: prod + <<: *BASE_QA_DEV + workflows: - say-date-workflow: + Tests: jobs: - - say-date + - AT_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - BE_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - CH_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - DE_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - ES_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - FR_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - NL_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - NOR_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - SE_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - UK_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - US_QA_ACCOUNTS_STAG-DEV: + filters: + branches: + ignore: + - master + - NL_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - DE_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - BE_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - UK_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - SE_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - FR_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - CH_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - AT_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - NOR_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - ES_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - US_QA_PAYMENTS_STAG-DEV: + filters: + branches: + ignore: + - master + - NL_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - DE_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - BE_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - UK_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - SE_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - FR_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - CH_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - AT_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - NOR_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - ES_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + - US_QA_PAYMENTS_PROD-DEV: + filters: + branches: + ignore: + - master + + + Daily_NL: + triggers: + - schedule: + cron: "01 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - NL_QA_ACCOUNTS_STAG + - NL_QA_PAYMENTS_STAG + # - NL_QA_SESSIONS + + Daily_DE: + triggers: + - schedule: + cron: "10 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - DE_QA_ACCOUNTS_STAG + - DE_QA_PAYMENTS_STAG + + Daily_BE: + triggers: + - schedule: + cron: "15 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - BE_QA_ACCOUNTS_STAG + - BE_QA_PAYMENTS_STAG + + Daily_UK: + triggers: + - schedule: + cron: "20 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - UK_QA_ACCOUNTS_STAG + - UK_QA_PAYMENTS_STAG + + Daily_SE: + triggers: + - schedule: + cron: "25 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - SE_QA_ACCOUNTS_STAG + - SE_QA_PAYMENTS_STAG + + Daily_FR: + triggers: + - schedule: + cron: "30 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - FR_QA_ACCOUNTS_STAG + - FR_QA_PAYMENTS_STAG + + Daily_CH: + triggers: + - schedule: + cron: "35 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - CH_QA_ACCOUNTS_STAG + - CH_QA_PAYMENTS_STAG + + Daily_AT: + triggers: + - schedule: + cron: "40 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - AT_QA_ACCOUNTS_STAG + - AT_QA_PAYMENTS_STAG + + Daily_NOR: + triggers: + - schedule: + cron: "45 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - NOR_QA_ACCOUNTS_STAG + - NOR_QA_PAYMENTS_STAG + + Daily_ES: + triggers: + - schedule: + cron: "50 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - ES_QA_ACCOUNTS_STAG + - ES_QA_PAYMENTS_STAG + + Daily_US: + triggers: + - schedule: + cron: "55 6,15 * * 1-5" + filters: + branches: + only: + - master + jobs: + - US_QA_ACCOUNTS_STAG + - US_QA_PAYMENTS_STAG + +# --------------- PROD ------------ +# --------------------------------- + Daily_NL_PROD: + triggers: + - schedule: + cron: "01 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - NL_QA_PAYMENTS_PROD + + Daily_AT_PROD: + triggers: + - schedule: + cron: "05 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - AT_QA_PAYMENTS_PROD + + Daily_BE_PROD: + triggers: + - schedule: + cron: "10 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - BE_QA_PAYMENTS_PROD + + Daily_CH_PROD: + triggers: + - schedule: + cron: "15 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - CH_QA_PAYMENTS_PROD + + Daily_DE_PROD: + triggers: + - schedule: + cron: "20 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - DE_QA_PAYMENTS_PROD + + Daily_FR_PROD: + triggers: + - schedule: + cron: "15 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - FR_QA_PAYMENTS_PROD + + Daily_ES_PROD: + triggers: + - schedule: + cron: "15 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - ES_QA_PAYMENTS_PROD + + Daily_NOR_PROD: + triggers: + - schedule: + cron: "20 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - NOR_QA_PAYMENTS_PROD + + Daily_SE_PROD: + triggers: + - schedule: + cron: "25 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - SE_QA_PAYMENTS_PROD + + Daily_UK_PROD: + triggers: + - schedule: + cron: "30 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - UK_QA_PAYMENTS_PROD + + Daily_US_PROD: + triggers: + - schedule: + cron: "30 6,12 * * 1-5" + filters: + branches: + only: + - master + jobs: + - US_QA_PAYMENTS_PROD + + + From 0280a1b617c274b3cb5072064131ac3574582ee5 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 28 Sep 2023 21:11:08 -0700 Subject: [PATCH 40/66] Update config.yml --- .circleci/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 783918b..7896feb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,11 +30,6 @@ jobs: name: "Node version" command: | node -v - # - run: - # name: "Chrome version" - # command: | - # google-chrome --version - # chromedriver --version - run: name: "Install Packages" command: | From c9ab22f1574dfdab673623884a8a462e7cdc6ae6 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:33:27 -0800 Subject: [PATCH 41/66] Update config.yml --- .circleci/config.yml | 1327 ++---------------------------------------- 1 file changed, 36 insertions(+), 1291 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7896feb..aafc0ef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,1300 +1,45 @@ -# See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -orbs: - browser-tools: circleci/browser-tools@1.4.4 - node: circleci/node@5.1.0 - slack: circleci/slack@4.6.3 -jobs: - test: &BASE_QA - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor +executors: + my-executor: docker: - - image: cimg/node:18.17.1-browsers - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - - checkout - # - browser-tools/install-chrome - # - browser-tools/install-chromedriver - - browser-tools/install-browser-tools: - chrome-version: 117.0.5938.88 # TODO: remove when chromedriver downloads are fixed - # https://googlechromelabs.github.io/chrome-for-testing/ - - run: - name: "NPM version" - command: | - npm -v - - run: - name: "Node version" - command: | - node -v - - run: - name: "Install Packages" - command: | - npm install - - run: - name: Print Env - command: env - - run: - name: "Running Tests" - command: | - if [ -z "${COUNTRY}" ] || [ -z "${SUITE}" ] || [ -z "${TARGET}" ] - then - exit - else - npm run test "${COUNTRY}" "${SUITE}" "${TARGET}" - fi - - store_artifacts: - path: tests/reports/screenshots - name: Screenshots - - store_artifacts: - path: tests/reports/report - name: HTML Report - - run: - name: Get Artifacts - when: always - command: | - set -x - artifacts=$(curl -X GET "https://circleci.com/api/v2/project/bitbucket/rituals/frontend-automation/$CIRCLE_BUILD_NUM/artifacts" \ - -H "Accept: application/json" \ - -H "Circle-Token: ${CIRCLE_API_TOKEN}" | grep -o 'https://[^"]*/index.html') - # generate a heredoc in BASH_ENV - # the '\<<' is a CircleCI escape - echo "read -r -d '' STORED_ARTIFACTS \<< 'EOF_ARTIFACTS'" >> $BASH_ENV - echo "$artifacts" >> $BASH_ENV - echo "EOF_ARTIFACTS" >> $BASH_ENV - - slack/notify: - event: fail - custom: | - { - "blocks": [ - { - "type": "divider" - }, - { - "type": "header", - "text": { - "type": "plain_text", - "text": "${CIRCLE_JOB} Failed. :x:", - "emoji": true - } - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Branch*: ${CIRCLE_BRANCH}" - } - ] - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*There is a report ready:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "HTML Report :receipt:", - "emoji": true - }, - "value": "Report", - "url": "$STORED_ARTIFACTS", - "action_id": "button-action" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*CircleCI workflow Job:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "CircleCI :hammer_and_wrench:", - "emoji": true - }, - "value": "View Job", - "url": "${CIRCLE_BUILD_URL}", - "action_id": "button-action" - } - }, - { - "type": "divider" - } - ] - } - - slack/notify: - event: pass - channel: "C02AD8HR2UR" - custom: | - { - "blocks": [ - { - "type": "divider" - }, - { - "type": "header", - "text": { - "type": "plain_text", - "text": "${CIRCLE_JOB} Succeeded. :white_check_mark:", - "emoji": true - } - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Branch*: ${CIRCLE_BRANCH}" - } - ] - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*There is a report ready:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "HTML Report :receipt:", - "emoji": true - }, - "value": "Report", - "url": "$STORED_ARTIFACTS", - "action_id": "button-action" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*CircleCI workflow Job:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "CircleCI :hammer_and_wrench:", - "emoji": true - }, - "value": "View Job", - "url": "${CIRCLE_BUILD_URL}", - "action_id": "button-action" - } - }, - { - "type": "divider" - } - ] - } + - image: buildpack-deps:jessie + working_directory: /tmp - develop: &BASE_QA_DEV - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - docker: - - image: cimg/node:18.17.1-browsers - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps +jobs: + flow: + executor: my-executor steps: - - checkout - - - run: sudo apt-get update - - browser-tools/install-browser-tools: - chrome-version: 117.0.5938.88 # TODO: remove when chromedriver downloads are fixed - - run: - name: "NPM version" - command: | - npm -v - - run: - name: "Node version" - command: | - node -v - - - run: - name: "Install Packages" - command: | - npm install - - run: - name: Print Env - command: env - - run: - name: "Running Tests" - command: | - if [ -z "${COUNTRY}" ] || [ -z "${SUITE}" ] || [ -z "${TARGET}" ] - then - exit - else - npm run test "${COUNTRY}" "${SUITE}" "${TARGET}" - fi - - store_artifacts: - path: tests/reports/screenshots - name: Screenshots - - store_artifacts: - path: tests/reports/report - name: HTML Report - - run: - name: Get Artifacts - when: always - command: | - set -x - artifacts=$(curl -X GET "https://circleci.com/api/v2/project/bitbucket/rituals/frontend-automation/$CIRCLE_BUILD_NUM/artifacts" \ - -H "Accept: application/json" \ - -H "Circle-Token: ${CIRCLE_API_TOKEN}" | grep -o 'https://[^"]*/index.html') - # generate a heredoc in BASH_ENV - # the '\<<' is a CircleCI escape - echo "read -r -d '' STORED_ARTIFACTS \<< 'EOF_ARTIFACTS'" >> $BASH_ENV - echo "$artifacts" >> $BASH_ENV - echo "EOF_ARTIFACTS" >> $BASH_ENV - - slack/notify: - event: fail - channel: "C02AD8HR2UR" - custom: | - { - "blocks": [ - { - "type": "divider" - }, - { - "type": "header", - "text": { - "type": "plain_text", - "text": "${CIRCLE_JOB} Failed. :x:", - "emoji": true - } - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Branch*: ${CIRCLE_BRANCH}" - } - ] - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*There is a report ready:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "HTML Report :receipt:", - "emoji": true - }, - "value": "Report", - "url": "$STORED_ARTIFACTS", - "action_id": "button-action" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*CircleCI workflow Job:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "CircleCI :hammer_and_wrench:", - "emoji": true - }, - "value": "View Job", - "url": "${CIRCLE_BUILD_URL}", - "action_id": "button-action" - } - }, - { - "type": "divider" - } - ] - } - - slack/notify: - event: pass - channel: "C02AD8HR2UR" - custom: | - { - "blocks": [ - { - "type": "divider" - }, - { - "type": "header", - "text": { - "type": "plain_text", - "text": "${CIRCLE_JOB} Succeeded. :white_check_mark:", - "emoji": true - } - }, - { - "type": "section", - "fields": [ - { - "type": "mrkdwn", - "text": "*Branch*: ${CIRCLE_BRANCH}" - } - ] - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*There is a report ready:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "HTML Report :receipt:", - "emoji": true - }, - "value": "Report", - "url": "$STORED_ARTIFACTS", - "action_id": "button-action" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*CircleCI workflow Job:*" - }, - "accessory": { - "type": "button", - "text": { - "type": "plain_text", - "text": "CircleCI :hammer_and_wrench:", - "emoji": true - }, - "value": "View Job", - "url": "${CIRCLE_BUILD_URL}", - "action_id": "button-action" - } - }, - { - "type": "divider" - } - ] - } - # ----- TEST STAGING ------ - # -------------------------- - AT_QA_ACCOUNTS_STAG: - environment: - COUNTRY: AT - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - NL_QA_ACCOUNTS_STAG: - environment: - COUNTRY: NL - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - CH_QA_ACCOUNTS_STAG: - environment: - COUNTRY: CH - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - DE_QA_ACCOUNTS_STAG: - environment: - COUNTRY: DE - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - ES_QA_ACCOUNTS_STAG: - environment: - COUNTRY: ES - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - BE_QA_ACCOUNTS_STAG: - environment: - COUNTRY: BE - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - UK_QA_ACCOUNTS_STAG: - environment: - COUNTRY: UK - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - SE_QA_ACCOUNTS_STAG: - environment: - COUNTRY: SE - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - FR_QA_ACCOUNTS_STAG: - environment: - COUNTRY: FR - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - NOR_QA_ACCOUNTS_STAG: - environment: - COUNTRY: NOR - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - US_QA_ACCOUNTS_STAG: - environment: - COUNTRY: US - SUITE: Accounts - TARGET: stag - <<: *BASE_QA - - NL_QA_PAYMENTS_STAG: - environment: - COUNTRY: NL - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - DE_QA_PAYMENTS_STAG: - environment: - COUNTRY: DE - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - BE_QA_PAYMENTS_STAG: - environment: - COUNTRY: BE - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - UK_QA_PAYMENTS_STAG: - environment: - COUNTRY: UK - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - SE_QA_PAYMENTS_STAG: - environment: - COUNTRY: SE - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - FR_QA_PAYMENTS_STAG: - environment: - COUNTRY: FR - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - CH_QA_PAYMENTS_STAG: - environment: - COUNTRY: CH - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - AT_QA_PAYMENTS_STAG: - environment: - COUNTRY: AT - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - NOR_QA_PAYMENTS_STAG: - environment: - COUNTRY: NOR - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - ES_QA_PAYMENTS_STAG: - environment: - COUNTRY: ES - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - US_QA_PAYMENTS_STAG: - environment: - COUNTRY: US - SUITE: Payments - TARGET: stag - <<: *BASE_QA - - # NL_QA_SESSIONS: - # environment: - # COUNTRY: NL - # SUITE: Sessions - # TARGET: stag - # <<: *BASE_QA - - # ------------------ PROD ------------------ - # ------------------------------------------ - NL_QA_PAYMENTS_PROD: - environment: - COUNTRY: NL - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - DE_QA_PAYMENTS_PROD: - environment: - COUNTRY: DE - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - BE_QA_PAYMENTS_PROD: - environment: - COUNTRY: BE - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - UK_QA_PAYMENTS_PROD: - environment: - COUNTRY: UK - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - SE_QA_PAYMENTS_PROD: - environment: - COUNTRY: SE - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - FR_QA_PAYMENTS_PROD: - environment: - COUNTRY: FR - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - CH_QA_PAYMENTS_PROD: - environment: - COUNTRY: CH - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - AT_QA_PAYMENTS_PROD: - environment: - COUNTRY: AT - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - NOR_QA_PAYMENTS_PROD: - environment: - COUNTRY: NOR - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - ES_QA_PAYMENTS_PROD: - environment: - COUNTRY: ES - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - US_QA_PAYMENTS_PROD: - environment: - COUNTRY: US - SUITE: Payments - TARGET: prod - <<: *BASE_QA - - - - # ----- DEVELOPMENT ------- - # ------------------------- - QA: - <<: *BASE_QA_DEV - # ----- ACCOUNTS STAGING DEVELOPMENT -------- - AT_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: AT - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - NL_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: NL - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - CH_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: CH - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - DE_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: DE - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - ES_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: ES - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - BE_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: BE - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - UK_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: UK - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - SE_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: SE - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - FR_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: FR - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - NOR_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: NOR - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV - - US_QA_ACCOUNTS_STAG-DEV: - environment: - COUNTRY: US - SUITE: Accounts - TARGET: stag - <<: *BASE_QA_DEV -# ----- PAYMENTS STAGING DEVELOPMENT ---------- - NL_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: NL - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - DE_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: DE - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - BE_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: BE - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - UK_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: UK - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - SE_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: SE - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - FR_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: FR - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - CH_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: CH - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - AT_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: AT - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - NOR_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: NOR - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - ES_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: ES - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - - US_QA_PAYMENTS_STAG-DEV: - environment: - COUNTRY: US - SUITE: Payments - TARGET: stag - <<: *BASE_QA_DEV - # -------- PAYMENTS PRODUCTION ---------- - NL_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: NL - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - DE_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: DE - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - BE_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: BE - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - UK_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: UK - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - SE_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: SE - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - FR_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: FR - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - CH_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: CH - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - AT_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: AT - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - - NOR_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: NOR - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV + - run: mkdir -p workspace + - run: echo "Hello, world!" > workspace/echo-output + + # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. + - persist_to_workspace: + # Must be an absolute path, or relative path from working_directory. This is a directory in the execution + # environment which is taken to be the root directory of the workspace. + root: workspace + # Must be relative path from root + paths: + - echo-output + + downstream: + executor: my-executor + steps: + - attach_workspace: + # Must be absolute path or relative path from working_directory + at: /tmp/workspace - ES_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: ES - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV + - run: | + if [[ `cat /tmp/workspace/echo-output` == "Hello, world!" ]]; then + echo "It worked!"; + else + echo "Nope!"; exit 1 + fi - US_QA_PAYMENTS_PROD-DEV: - environment: - COUNTRY: US - SUITE: Payments - TARGET: prod - <<: *BASE_QA_DEV - workflows: - Tests: - jobs: - - AT_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - BE_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - CH_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - DE_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - ES_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - FR_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - NL_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - NOR_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - SE_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - UK_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - US_QA_ACCOUNTS_STAG-DEV: - filters: - branches: - ignore: - - master - - NL_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - DE_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - BE_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - UK_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - SE_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - FR_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - CH_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - AT_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - NOR_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - ES_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - US_QA_PAYMENTS_STAG-DEV: - filters: - branches: - ignore: - - master - - NL_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - DE_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - BE_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - UK_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - SE_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - FR_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - CH_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - AT_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - NOR_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - ES_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - US_QA_PAYMENTS_PROD-DEV: - filters: - branches: - ignore: - - master - - - Daily_NL: - triggers: - - schedule: - cron: "01 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - NL_QA_ACCOUNTS_STAG - - NL_QA_PAYMENTS_STAG - # - NL_QA_SESSIONS - - Daily_DE: - triggers: - - schedule: - cron: "10 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - DE_QA_ACCOUNTS_STAG - - DE_QA_PAYMENTS_STAG - - Daily_BE: - triggers: - - schedule: - cron: "15 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - BE_QA_ACCOUNTS_STAG - - BE_QA_PAYMENTS_STAG - - Daily_UK: - triggers: - - schedule: - cron: "20 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - UK_QA_ACCOUNTS_STAG - - UK_QA_PAYMENTS_STAG - - Daily_SE: - triggers: - - schedule: - cron: "25 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - SE_QA_ACCOUNTS_STAG - - SE_QA_PAYMENTS_STAG - - Daily_FR: - triggers: - - schedule: - cron: "30 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - FR_QA_ACCOUNTS_STAG - - FR_QA_PAYMENTS_STAG - - Daily_CH: - triggers: - - schedule: - cron: "35 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - CH_QA_ACCOUNTS_STAG - - CH_QA_PAYMENTS_STAG - - Daily_AT: - triggers: - - schedule: - cron: "40 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - AT_QA_ACCOUNTS_STAG - - AT_QA_PAYMENTS_STAG - - Daily_NOR: - triggers: - - schedule: - cron: "45 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - NOR_QA_ACCOUNTS_STAG - - NOR_QA_PAYMENTS_STAG - - Daily_ES: - triggers: - - schedule: - cron: "50 6,15 * * 1-5" - filters: - branches: - only: - - master + btd: jobs: - - ES_QA_ACCOUNTS_STAG - - ES_QA_PAYMENTS_STAG - - Daily_US: - triggers: - - schedule: - cron: "55 6,15 * * 1-5" - filters: - branches: - only: - - master - jobs: - - US_QA_ACCOUNTS_STAG - - US_QA_PAYMENTS_STAG - -# --------------- PROD ------------ -# --------------------------------- - Daily_NL_PROD: - triggers: - - schedule: - cron: "01 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - NL_QA_PAYMENTS_PROD - - Daily_AT_PROD: - triggers: - - schedule: - cron: "05 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - AT_QA_PAYMENTS_PROD - - Daily_BE_PROD: - triggers: - - schedule: - cron: "10 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - BE_QA_PAYMENTS_PROD - - Daily_CH_PROD: - triggers: - - schedule: - cron: "15 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - CH_QA_PAYMENTS_PROD - - Daily_DE_PROD: - triggers: - - schedule: - cron: "20 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - DE_QA_PAYMENTS_PROD - - Daily_FR_PROD: - triggers: - - schedule: - cron: "15 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - FR_QA_PAYMENTS_PROD - - Daily_ES_PROD: - triggers: - - schedule: - cron: "15 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - ES_QA_PAYMENTS_PROD - - Daily_NOR_PROD: - triggers: - - schedule: - cron: "20 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - NOR_QA_PAYMENTS_PROD - - Daily_SE_PROD: - triggers: - - schedule: - cron: "25 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - SE_QA_PAYMENTS_PROD - - Daily_UK_PROD: - triggers: - - schedule: - cron: "30 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - UK_QA_PAYMENTS_PROD - - Daily_US_PROD: - triggers: - - schedule: - cron: "30 6,12 * * 1-5" - filters: - branches: - only: - - master - jobs: - - US_QA_PAYMENTS_PROD - - - + - flow + - downstream: + requires: + - flow From a0e53b6de1773646a7e1b662c74df2d3b1581249 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:34:27 -0800 Subject: [PATCH 42/66] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aafc0ef..e9cf54b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,13 +11,13 @@ jobs: executor: my-executor steps: - run: mkdir -p workspace - - run: echo "Hello, world!" > workspace/echo-output + - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - persist_to_workspace: # Must be an absolute path, or relative path from working_directory. This is a directory in the execution # environment which is taken to be the root directory of the workspace. - root: workspace + root: $CIRCLE_WORKFLOW_JOB_ID # Must be relative path from root paths: - echo-output From 2b8d1dbc46f233bbd496dc50f7fcb10d8de2562b Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:35:34 -0800 Subject: [PATCH 43/66] Update config.yml --- .circleci/config.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e9cf54b..b2fda57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,36 @@ jobs: paths: - echo-output + test: + executor: my-executor + steps: + - run: mkdir -p workspace + - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output + + # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. + - persist_to_workspace: + # Must be an absolute path, or relative path from working_directory. This is a directory in the execution + # environment which is taken to be the root directory of the workspace. + root: $CIRCLE_WORKFLOW_JOB_ID + # Must be relative path from root + paths: + - echo-output + testing: + executor: my-executor + steps: + - run: mkdir -p workspace + - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output + + # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. + - persist_to_workspace: + # Must be an absolute path, or relative path from working_directory. This is a directory in the execution + # environment which is taken to be the root directory of the workspace. + root: $CIRCLE_WORKFLOW_JOB_ID + # Must be relative path from root + paths: + - echo-output + + downstream: executor: my-executor steps: @@ -40,6 +70,8 @@ workflows: btd: jobs: - flow + - test + - testing - downstream: requires: - flow From a3f0c92e3c1380e81f9dd01a4d45d6ae6a32e9d4 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:36:48 -0800 Subject: [PATCH 44/66] Update config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b2fda57..3ff9cac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: flow: executor: my-executor steps: - - run: mkdir -p workspace + - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. @@ -25,7 +25,7 @@ jobs: test: executor: my-executor steps: - - run: mkdir -p workspace + - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. @@ -39,7 +39,7 @@ jobs: testing: executor: my-executor steps: - - run: mkdir -p workspace + - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. From 2d4d36fa5d46116cdf9c0484137688318c4fca21 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:41:53 -0800 Subject: [PATCH 45/66] Update config.yml --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3ff9cac..fd377da 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,12 +12,14 @@ jobs: steps: - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output + - run: cd $CIRCLE_WORKFLOW_JOB_ID + - run: pwd # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - persist_to_workspace: # Must be an absolute path, or relative path from working_directory. This is a directory in the execution # environment which is taken to be the root directory of the workspace. - root: $CIRCLE_WORKFLOW_JOB_ID + root: . # Must be relative path from root paths: - echo-output From 764e8920305cc85bcca146e62d0cf48787e86662 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:45:29 -0800 Subject: [PATCH 46/66] Update config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd377da..cdb8b66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,8 @@ jobs: executor: my-executor steps: - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID + - run: ls -al + - run: pwd - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output - run: cd $CIRCLE_WORKFLOW_JOB_ID - run: pwd From 4d8333317656c192d15fe5a8df24ed0f7d450da9 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:37:07 -0800 Subject: [PATCH 47/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cdb8b66..ab197c8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: - persist_to_workspace: # Must be an absolute path, or relative path from working_directory. This is a directory in the execution # environment which is taken to be the root directory of the workspace. - root: . + root: /tmp # Must be relative path from root paths: - echo-output From fd8f6bd3cda8b07b94c67a11f50a1a156589fcad Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:38:23 -0800 Subject: [PATCH 48/66] Update config.yml --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab197c8..3cb4c92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,8 +24,7 @@ jobs: root: /tmp # Must be relative path from root paths: - - echo-output - + - $CIRCLE_WORKFLOW_JOB_ID/echo-output test: executor: my-executor steps: From 83a1020ad16c90e626d29fd85088205a2e23ee86 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:39:35 -0800 Subject: [PATCH 49/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3cb4c92..58a0370 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ jobs: - run: pwd - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output - run: cd $CIRCLE_WORKFLOW_JOB_ID - - run: pwd + - run: ls -al # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - persist_to_workspace: From 846eddd3f59fe156190ad41e1840440c4b5c3c61 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:40:05 -0800 Subject: [PATCH 50/66] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 58a0370..6c18edb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,10 +21,10 @@ jobs: - persist_to_workspace: # Must be an absolute path, or relative path from working_directory. This is a directory in the execution # environment which is taken to be the root directory of the workspace. - root: /tmp + root: /tmp/$CIRCLE_WORKFLOW_JOB_ID # Must be relative path from root paths: - - $CIRCLE_WORKFLOW_JOB_ID/echo-output + - echo-output test: executor: my-executor steps: From e679642596eeda1e9dce25a7676342978f5c11f9 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:43:39 -0800 Subject: [PATCH 51/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c18edb..23bc2f6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: root: /tmp/$CIRCLE_WORKFLOW_JOB_ID # Must be relative path from root paths: - - echo-output + - . test: executor: my-executor steps: From e8e7d0f08f14ec52ece3ee171be9f08bf20e48bd Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:46:31 -0800 Subject: [PATCH 52/66] Update config.yml --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23bc2f6..331b6e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,8 +14,9 @@ jobs: - run: ls -al - run: pwd - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output - - run: cd $CIRCLE_WORKFLOW_JOB_ID + - run: cat /tmp/$CIRCLE_WORKFLOW_JOB_ID/echo-output - run: ls -al + - run: find $CIRCLE_WORKFLOW_JOB_ID/echo-output # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - persist_to_workspace: From 25e30a5fe47e01cfc8c30fe8deb74073005e254d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:48:04 -0800 Subject: [PATCH 53/66] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 331b6e2..d6ce93b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,10 +22,10 @@ jobs: - persist_to_workspace: # Must be an absolute path, or relative path from working_directory. This is a directory in the execution # environment which is taken to be the root directory of the workspace. - root: /tmp/$CIRCLE_WORKFLOW_JOB_ID + root: /tmp/ # Must be relative path from root paths: - - . + - $CIRCLE_WORKFLOW_JOB_ID test: executor: my-executor steps: From f239b39581db76761eeb045c91d00ae25f1f1313 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:48:01 -0800 Subject: [PATCH 54/66] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6ce93b..0903980 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,10 +22,10 @@ jobs: - persist_to_workspace: # Must be an absolute path, or relative path from working_directory. This is a directory in the execution # environment which is taken to be the root directory of the workspace. - root: /tmp/ + root: $CIRCLE_WORKFLOW_JOB_ID # Must be relative path from root paths: - - $CIRCLE_WORKFLOW_JOB_ID + - echo-output test: executor: my-executor steps: From 072838b845d973757edcb062d2c3b0006452362d Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:52:06 -0800 Subject: [PATCH 55/66] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0903980..9a516ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,7 @@ jobs: - run: cat /tmp/$CIRCLE_WORKFLOW_JOB_ID/echo-output - run: ls -al - run: find $CIRCLE_WORKFLOW_JOB_ID/echo-output + - run: cat $CIRCLE_WORKFLOW_JOB_ID/echo-output # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - persist_to_workspace: From cd76ce6e404335fb8aa4e6a187c36c7968edd5f8 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 21 Aug 2024 14:19:21 -0700 Subject: [PATCH 56/66] Update config.yml --- .circleci/config.yml | 82 +++++--------------------------------------- 1 file changed, 9 insertions(+), 73 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a516ec..34cc3a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,82 +1,18 @@ version: 2.1 -executors: - my-executor: - docker: - - image: buildpack-deps:jessie - working_directory: /tmp +# Define the jobs we want to run for this project jobs: - flow: - executor: my-executor - steps: - - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - - run: ls -al - - run: pwd - - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output - - run: cat /tmp/$CIRCLE_WORKFLOW_JOB_ID/echo-output - - run: ls -al - - run: find $CIRCLE_WORKFLOW_JOB_ID/echo-output - - run: cat $CIRCLE_WORKFLOW_JOB_ID/echo-output - - # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - - persist_to_workspace: - # Must be an absolute path, or relative path from working_directory. This is a directory in the execution - # environment which is taken to be the root directory of the workspace. - root: $CIRCLE_WORKFLOW_JOB_ID - # Must be relative path from root - paths: - - echo-output - test: - executor: my-executor - steps: - - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output - - # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - - persist_to_workspace: - # Must be an absolute path, or relative path from working_directory. This is a directory in the execution - # environment which is taken to be the root directory of the workspace. - root: $CIRCLE_WORKFLOW_JOB_ID - # Must be relative path from root - paths: - - echo-output - testing: - executor: my-executor - steps: - - run: mkdir -p $CIRCLE_WORKFLOW_JOB_ID - - run: echo "Hello, world!" > $CIRCLE_WORKFLOW_JOB_ID/echo-output - - # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job. - - persist_to_workspace: - # Must be an absolute path, or relative path from working_directory. This is a directory in the execution - # environment which is taken to be the root directory of the workspace. - root: $CIRCLE_WORKFLOW_JOB_ID - # Must be relative path from root - paths: - - echo-output - - - downstream: - executor: my-executor + build: + docker: + - image: cimg/python:3.12.5 steps: - - attach_workspace: - # Must be absolute path or relative path from working_directory - at: /tmp/workspace + - checkout + - run: python3 script.py - - run: | - if [[ `cat /tmp/workspace/echo-output` == "Hello, world!" ]]; then - echo "It worked!"; - else - echo "Nope!"; exit 1 - fi +# Orchestrate our job run sequence workflows: - btd: + build_and_test: jobs: - - flow - - test - - testing - - downstream: - requires: - - flow + - build From 3924077c61eababd553ff722be5dfdacd11dad8c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Wed, 21 Aug 2024 15:49:46 -0700 Subject: [PATCH 57/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 34cc3a9..3987e5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: - run: python3 script.py -# Orchestrate our job run sequence + workflows: build_and_test: jobs: From 5712d9b297fe628315412159179f8a12782e3dd6 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:20:27 -0400 Subject: [PATCH 58/66] Update config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3987e5b..225678b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,3 +16,4 @@ workflows: build_and_test: jobs: - build + name: build/test From 0a791aa7da1afe45b64c636d7a0059f680cad238 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:21:02 -0400 Subject: [PATCH 59/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 225678b..fdd38e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,4 +16,4 @@ workflows: build_and_test: jobs: - build - name: build/test + name: test From 759ac1d01e6f6e1b6f5050a855370e1b81410092 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:22:23 -0400 Subject: [PATCH 60/66] Update config.yml --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fdd38e4..335d2b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,5 +15,5 @@ jobs: workflows: build_and_test: jobs: - - build - name: test + - build: + name: test From 5bb76aaede4206ef3e550e57a20f6e0448a66cbc Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:22:44 -0400 Subject: [PATCH 61/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 335d2b2..15ec19a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,4 +16,4 @@ workflows: build_and_test: jobs: - build: - name: test + name: build/test From e8a8d34e27da60ce8325011052cf77bc6befb83c Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 09:24:13 -0400 Subject: [PATCH 62/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15ec19a..0dc9268 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: - image: cimg/python:3.12.5 steps: - checkout - - run: python3 script.py + From 7ad31db6673a24cd2fc70f8def3d81a2522b0f27 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:09:52 -0400 Subject: [PATCH 63/66] Update config.yml --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0dc9268..173430d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,3 +17,6 @@ workflows: jobs: - build: name: build/test + + +#test From 88e6b6f0ff532287342b3805c1e6c2012bb465c7 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:11:53 -0400 Subject: [PATCH 64/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 173430d..3f08c62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,4 +19,4 @@ workflows: name: build/test -#test + From f75f8ccc5c00d9fd4525df4101e417b951beba79 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Thu, 23 Oct 2025 10:15:29 -0400 Subject: [PATCH 65/66] Update config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f08c62..9740713 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,4 +19,6 @@ workflows: name: build/test +#test + From 538402fd8865f5d826bff24cfaf9a45e59ae19c5 Mon Sep 17 00:00:00 2001 From: Henna <62267575+HennaAbbas@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:17:36 -0400 Subject: [PATCH 66/66] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9740713..1fe61e6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,6 @@ workflows: name: build/test -#test +