From e66f2f17f565085d7ccc4dad965d46213c169fef Mon Sep 17 00:00:00 2001 From: dat Date: Tue, 11 Jul 2023 16:19:26 +0700 Subject: [PATCH 1/5] Onboarding - mobile views --- .../src/components/FieldAvatar/index.tsx | 87 +++++++++-------- .../components/modal-add-education/index.tsx | 12 +-- .../modal-add-education/styles.module.scss | 4 + .../src/components/modal-add-work/index.tsx | 14 ++- .../modal-add-work/styles.module.scss | 33 ------- .../components/modal-upload-photo/index.tsx | 17 ++-- .../modal-upload-photo/styles.module.scss | 54 +++-------- .../onboarding-base-modal/index.tsx | 28 ++++++ .../onboarding-base-modal/styles.module.scss | 47 +++++++++ .../src/pages/account-details/index.tsx | 14 +-- .../onboarding/src/pages/educations/index.tsx | 5 +- .../src/pages/onboarding/styles.module.scss | 96 +++++++++++-------- .../src/pages/personalization/index.tsx | 65 ++++++------- src/apps/onboarding/src/pages/works/index.tsx | 5 +- .../onboarding/src/styles/global/_flex.scss | 16 ++++ .../onboarding/src/styles/global/_grid.scss | 12 +++ .../onboarding/src/styles/global/_index.scss | 6 ++ .../onboarding/src/styles/global/_layout.scss | 18 ++++ 18 files changed, 315 insertions(+), 218 deletions(-) create mode 100644 src/apps/onboarding/src/components/onboarding-base-modal/index.tsx create mode 100644 src/apps/onboarding/src/components/onboarding-base-modal/styles.module.scss diff --git a/src/apps/onboarding/src/components/FieldAvatar/index.tsx b/src/apps/onboarding/src/components/FieldAvatar/index.tsx index 8d9f86df7..60abda520 100644 --- a/src/apps/onboarding/src/components/FieldAvatar/index.tsx +++ b/src/apps/onboarding/src/components/FieldAvatar/index.tsx @@ -53,12 +53,51 @@ const FieldAvatar: FC = (props: FieldAvatarProps) => { setIsPhotoEditMode(true) } + const bottomButtons = imgUrl ? ( +
+ + +
+ ) : ( + + ) + return (

Photo

-
+
= (props: FieldAvatarProps) => { Make a great first impression to potential customers with a professional photo that represents your style. - {imgUrl ? ( -
- - -
- ) : ( - - )} +
+ {bottomButtons} +
+
+ {bottomButtons} +
{ isPhotoEditMode && props.memberInfo && ( diff --git a/src/apps/onboarding/src/components/modal-add-education/index.tsx b/src/apps/onboarding/src/components/modal-add-education/index.tsx index 5b7cc5bb2..7dd42b0c4 100644 --- a/src/apps/onboarding/src/components/modal-add-education/index.tsx +++ b/src/apps/onboarding/src/components/modal-add-education/index.tsx @@ -3,11 +3,12 @@ import _ from 'lodash' import classNames from 'classnames' import moment from 'moment' -import { BaseModal, Button, InputText } from '~/libs/ui' +import { Button, InputText } from '~/libs/ui' import DateInput from '../DateInput' import EducationInfo, { emptyEducationInfo } from '../../models/EducationInfo' import FormField from '../FormField' +import OnboardingBaseModal from '../onboarding-base-modal' import styles from './styles.module.scss' @@ -59,7 +60,7 @@ const ModalAddEducation: FC = (props: ModalAddEducationP }, [props.editingEducation]) return ( -
)} onClose={props.onClose || _.noop} - open - size='body' title={props.editingEducation ? 'Edit Education' : 'Add Education'} - classNames={{ modal: styles.infoModal }} > -
+
= (props: ModalAddEducationP
- + ) } diff --git a/src/apps/onboarding/src/components/modal-add-education/styles.module.scss b/src/apps/onboarding/src/components/modal-add-education/styles.module.scss index 070ddd645..32b5f54a0 100644 --- a/src/apps/onboarding/src/components/modal-add-education/styles.module.scss +++ b/src/apps/onboarding/src/components/modal-add-education/styles.module.scss @@ -4,6 +4,10 @@ padding: 35px 32px 32px 32px !important; max-width: 600px !important; + @include ltemd { + max-width: 375px !important; + } + :global(.react-responsive-modal-closeButton) { display: flex; right: 32px; diff --git a/src/apps/onboarding/src/components/modal-add-work/index.tsx b/src/apps/onboarding/src/components/modal-add-work/index.tsx index ba722e322..4bb0fa6c0 100644 --- a/src/apps/onboarding/src/components/modal-add-work/index.tsx +++ b/src/apps/onboarding/src/components/modal-add-work/index.tsx @@ -3,12 +3,13 @@ import _ from 'lodash' import classNames from 'classnames' import moment from 'moment' -import { BaseModal, Button, InputSelect, InputText } from '~/libs/ui' +import { Button, InputSelect, InputText } from '~/libs/ui' import { FormInputCheckbox } from '~/apps/self-service/src/components/form-elements' import { INDUSTRIES_OPTIONS } from '../../config' import DateInput from '../DateInput' import FormField from '../FormField' +import OnboardingBaseModal from '../onboarding-base-modal' import WorkInfo, { emptyWorkInfo } from '../../models/WorkInfo' import styles from './styles.module.scss' @@ -69,7 +70,7 @@ const ModalAddWork: FC = (props: ModalAddWorkProps) => { }, [props.editingWork]) return ( -
)} onClose={props.onClose || _.noop} - open - size='body' title={props.editingWork ? 'Edit Experience' : 'Add Experience'} - classNames={{ modal: styles.infoModal }} > -
+
= (props: ModalAddWorkProps) => {
-
+
= (props: ModalAddWorkProps) => { />
- + ) } diff --git a/src/apps/onboarding/src/components/modal-add-work/styles.module.scss b/src/apps/onboarding/src/components/modal-add-work/styles.module.scss index bc191d879..fced2c8eb 100644 --- a/src/apps/onboarding/src/components/modal-add-work/styles.module.scss +++ b/src/apps/onboarding/src/components/modal-add-work/styles.module.scss @@ -1,34 +1 @@ @import '@libs/ui/styles/includes'; - -.infoModal { - padding: 35px 32px 32px 32px !important; - max-width: 600px !important; - - :global(.react-responsive-modal-closeButton) { - display: flex; - right: 32px; - top: 46px !important; - - path { - color: $turq-160; - } - } - - hr { - margin-top: 30px; - } - - h3 { - font-family: $font-barlow; - color: $black-100; - font-size: 34px; - font-style: normal; - font-weight: 600; - line-height: 40px; - text-transform: none; - } - - .modalContent { - width: 100%; - } -} diff --git a/src/apps/onboarding/src/components/modal-upload-photo/index.tsx b/src/apps/onboarding/src/components/modal-upload-photo/index.tsx index 27494dbce..14205f886 100644 --- a/src/apps/onboarding/src/components/modal-upload-photo/index.tsx +++ b/src/apps/onboarding/src/components/modal-upload-photo/index.tsx @@ -3,10 +3,11 @@ import { DropzoneState, useDropzone } from 'react-dropzone' import _ from 'lodash' import classNames from 'classnames' -import { BaseModal, Button } from '~/libs/ui' +import { Button } from '~/libs/ui' import { updateMemberPhotoAsync } from '~/libs/core' import MemberInfo from '../../models/MemberInfo' +import OnboardingBaseModal from '../onboarding-base-modal' import styles from './styles.module.scss' @@ -63,7 +64,7 @@ const ModalUploadPhoto: FC = (props: ModalUploadPhotoProp } return ( -
)} onClose={props.onClose || _.noop} - open - size='body' title='Profile Photo' - classNames={{ modal: styles.infoModal }} > -
+
{(!isSaving && !imgUrl) ? (
@@ -128,7 +131,7 @@ const ModalUploadPhoto: FC = (props: ModalUploadPhotoProp
- + ) } diff --git a/src/apps/onboarding/src/components/modal-upload-photo/styles.module.scss b/src/apps/onboarding/src/components/modal-upload-photo/styles.module.scss index 70068533a..de697bdef 100644 --- a/src/apps/onboarding/src/components/modal-upload-photo/styles.module.scss +++ b/src/apps/onboarding/src/components/modal-upload-photo/styles.module.scss @@ -1,39 +1,7 @@ @import '@libs/ui/styles/includes'; -.infoModal { - padding: 35px 32px 32px 32px !important; - max-width: 600px !important; - - :global(.react-responsive-modal-closeButton) { - display: flex; - right: 32px; - top: 46px !important; - - path { - color: $turq-160; - } - } - - hr { - margin-top: 30px; - } - - h3 { - font-family: $font-barlow; - color: $black-100; - font-size: 34px; - font-style: normal; - font-weight: 600; - line-height: 40px; - text-transform: none; - } - - .modalContent { - width: 100%; - } -} - -.blockDropZone { +.blockDropZone, +.blockPhoto { width: 256px; height: 256px; margin-right: 24px; @@ -46,6 +14,13 @@ flex-direction: column; background-color: rgba(224, 250, 243, 0.30); + @include ltemd { + width: 100%; + height: 343px; + } +} + +.blockDropZone { .textDragAndDrop { font-size: 16px; font-style: normal; @@ -79,13 +54,6 @@ } .blockPhoto { - width: 256px; - height: 256px; - margin-right: 24px; - flex-shrink: 0; - border: 1px dashed $turq-160; - background-color: rgba(224, 250, 243, 0.30); - img { width: 100%; height: 100%; @@ -96,4 +64,8 @@ .listRequirements { list-style: disc; padding-left: 24px; + + @include ltemd { + margin-bottom: 21px; + } } diff --git a/src/apps/onboarding/src/components/onboarding-base-modal/index.tsx b/src/apps/onboarding/src/components/onboarding-base-modal/index.tsx new file mode 100644 index 000000000..642a908a2 --- /dev/null +++ b/src/apps/onboarding/src/components/onboarding-base-modal/index.tsx @@ -0,0 +1,28 @@ +import { FC, ReactNode } from 'react' +import _ from 'lodash' + +import { BaseModal } from '~/libs/ui' + +import styles from './styles.module.scss' + +interface OnboardingBaseModalProps { + onClose?: () => void + children: React.ReactNode + title?: string | ReactNode + buttons?: ReactNode +} + +const OnboardingBaseModal: FC = (props: OnboardingBaseModalProps) => ( + + {props.children} + +) + +export default OnboardingBaseModal diff --git a/src/apps/onboarding/src/components/onboarding-base-modal/styles.module.scss b/src/apps/onboarding/src/components/onboarding-base-modal/styles.module.scss new file mode 100644 index 000000000..4582fba49 --- /dev/null +++ b/src/apps/onboarding/src/components/onboarding-base-modal/styles.module.scss @@ -0,0 +1,47 @@ +@import '@libs/ui/styles/includes'; + +.infoModal { + padding: 35px 32px 32px 32px !important; + max-width: 600px !important; + + @include ltemd { + max-width: 375px !important; + padding: 40px 16px 32px 16px !important; + } + + :global(.react-responsive-modal-closeButton) { + display: flex; + right: 32px; + top: 46px !important; + + path { + color: $turq-160; + } + } + + hr { + margin-top: 30px; + + @include ltemd { + margin-top: 32px; + } + } + + h3 { + font-family: $font-barlow; + color: $black-100; + font-size: 34px; + font-style: normal; + font-weight: 600; + line-height: 40px; + text-transform: none; + + @include ltemd { + font-size: 28px; + } + } + + .modalContent { + width: 100%; + } +} diff --git a/src/apps/onboarding/src/pages/account-details/index.tsx b/src/apps/onboarding/src/pages/account-details/index.tsx index 7b3fcb2f9..36e17f2bb 100644 --- a/src/apps/onboarding/src/pages/account-details/index.tsx +++ b/src/apps/onboarding/src/pages/account-details/index.tsx @@ -187,7 +187,7 @@ const PageAccountDetailsContent: FC<{ name='streetAddr1' label='Address 1' value={memberAddress?.streetAddr1 || ''} - onChange={function (event?: string) { + onChange={function onChange(event?: string) { setMemberAddress({ ...(memberAddress || blankMemberAddress), streetAddr1: event || '', @@ -202,7 +202,7 @@ const PageAccountDetailsContent: FC<{ name='streetAddr2' label='Address 2' value={memberAddress?.streetAddr2 || ''} - onChange={function (event?: string) { + onChange={function onChange(event?: string) { setMemberAddress({ ...(memberAddress || blankMemberAddress), streetAddr2: event || '', @@ -221,7 +221,7 @@ const PageAccountDetailsContent: FC<{ name='city' label='City' value={memberAddress?.city || ''} - onChange={function (event?: string) { + onChange={function onChange(event?: string) { setMemberAddress({ ...(memberAddress || blankMemberAddress), city: event || '', @@ -240,7 +240,7 @@ const PageAccountDetailsContent: FC<{ name='stateCode' label='State / Province' value={memberAddress?.stateCode || ''} - onChange={function (event?: string) { + onChange={function onChange(event?: string) { setMemberAddress({ ...(memberAddress || blankMemberAddress), stateCode: event || '', @@ -260,7 +260,7 @@ const PageAccountDetailsContent: FC<{ name='zip' label='Zip / Postal Code' value={memberAddress?.zip || ''} - onChange={function (event?: string) { + onChange={function onChange(event?: string) { setMemberAddress({ ...(memberAddress || blankMemberAddress), zip: event || '', @@ -277,7 +277,7 @@ const PageAccountDetailsContent: FC<{ {(educations || []).length > 0 ? ( -
+
{(educations || []).map(education => ( -

Bio

+

Bio

This is where we can really get to know you. - - - +
+ + + +
{(works || []).length > 0 ? ( -
+
{(works || []).map(work => ( Date: Tue, 11 Jul 2023 15:39:05 +0300 Subject: [PATCH 2/5] #716 - limit the max no of skills selected in onboarding --- src/apps/onboarding/src/pages/skills/index.tsx | 4 +++- .../input-skill-selector/InputSkillSelector.tsx | 2 ++ .../member-skill-editor/use-member-skill-editor.tsx | 13 ++++++++++--- .../input-multiselect/InputMultiselect.tsx | 8 ++++++++ 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/apps/onboarding/src/pages/skills/index.tsx b/src/apps/onboarding/src/pages/skills/index.tsx index 8d931d7b3..8adbde968 100644 --- a/src/apps/onboarding/src/pages/skills/index.tsx +++ b/src/apps/onboarding/src/pages/skills/index.tsx @@ -16,7 +16,9 @@ export const PageSkillsContent: FC<{ }> = props => { const navigate: any = useNavigate() const [loading, setLoading] = useState(false) - const { formInput: emsiFormInput, saveSkills: saveEmsiSkills }: MemberSkillEditor = useMemberSkillEditor() + const { formInput: emsiFormInput, saveSkills: saveEmsiSkills }: MemberSkillEditor = useMemberSkillEditor({ + limit: 15, + }) async function saveSkills(): Promise { setLoading(true) diff --git a/src/libs/shared/lib/components/input-skill-selector/InputSkillSelector.tsx b/src/libs/shared/lib/components/input-skill-selector/InputSkillSelector.tsx index 9b206b30e..5109749ab 100644 --- a/src/libs/shared/lib/components/input-skill-selector/InputSkillSelector.tsx +++ b/src/libs/shared/lib/components/input-skill-selector/InputSkillSelector.tsx @@ -28,6 +28,7 @@ const fetchSkills = (queryTerm: string): Promise => ( ) interface InputSkillSelectorProps { + readonly limit?: number readonly loading?: boolean readonly value?: EmsiSkill[] readonly onChange?: (event: ChangeEvent) => void @@ -36,6 +37,7 @@ interface InputSkillSelectorProps { const InputSkillSelector: FC = props => ( { +export const useMemberSkillEditor = ({ + limit, +}: {limit?: number} = {}): MemberSkillEditor => { const { profile }: ProfileContextData = useContext(profileContext) const [isEmsiInitialized, setIsEmsiInitialized] = useState(false) const [skills, setSkills] = useState([]) @@ -120,8 +122,13 @@ export const useMemberSkillEditor = (): MemberSkillEditor => { // build the form input const formInput = useMemo(() => ( - - ), [skills, handleOnChange, loading]) + + ), [skills, handleOnChange, loading, limit]) return { formInput, diff --git a/src/libs/ui/lib/components/form/form-groups/form-input/input-multiselect/InputMultiselect.tsx b/src/libs/ui/lib/components/form/form-groups/form-input/input-multiselect/InputMultiselect.tsx index c28e60dda..883134f11 100644 --- a/src/libs/ui/lib/components/form/form-groups/form-input/input-multiselect/InputMultiselect.tsx +++ b/src/libs/ui/lib/components/form/form-groups/form-input/input-multiselect/InputMultiselect.tsx @@ -26,6 +26,7 @@ interface InputMultiselectProps { readonly hideInlineErrors?: boolean readonly hint?: string readonly label?: string + readonly limit?: number readonly name: string readonly onChange: (event: ChangeEvent) => void readonly options?: ReadonlyArray @@ -55,6 +56,10 @@ const InputMultiselect: FC = (props: InputMultiselectProp } as unknown as ChangeEvent) } + function isOptionDisabled(): boolean { + return !!props.limit && (props.value?.length as number) >= props.limit + } + return ( = (props: InputMultiselectProp label={(props.label || props.name) ?? 'Select Option'} hideInlineErrors={props.hideInlineErrors} type='text' + hint={props.limit ? ` (max ${props.limit})` : undefined} > = (props: InputMultiselectProp onBlur={noop} blurInputOnSelect={false} isLoading={props.loading} + isOptionDisabled={isOptionDisabled} + isSearchable={!isOptionDisabled()} components={{ MultiValueRemove }} value={props.value} /> From 9469b1290a9c32de16e38a115f298c998013bbf4 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 11 Jul 2023 16:10:55 +0300 Subject: [PATCH 3/5] MP-119 sort order of emsi skills --- .../profiles/src/member-profile/skills/MemberSkillsInfo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx b/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx index 09a217971..b8ed95e41 100644 --- a/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx +++ b/src/apps/profiles/src/member-profile/skills/MemberSkillsInfo.tsx @@ -24,7 +24,8 @@ const MemberSkillsInfo: FC = (props: MemberSkillsInfoProp const memberEMSISkills: UserEMSISkill[] = useMemo( () => (props.profile.emsiSkills || []) - .sort((a, b) => (isVerifiedSkill(a.skillSources) ? -1 : (isVerifiedSkill(b.skillSources) ? 1 : 0))), + .sort((a, b) => (+isVerifiedSkill(b.skillSources)) + - (+isVerifiedSkill(a.skillSources)) || a.name.localeCompare(b.name)), [props.profile.emsiSkills], ) From b09a8c62dbeffce6ae74b5d1054bbf584bfde652 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 11 Jul 2023 16:21:29 +0300 Subject: [PATCH 4/5] MP-418 trash icon on Safari fix --- .../ModifyLanguagesModal/ModifyLanguagesModal.module.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/apps/profiles/src/member-profile/languages/ModifyLanguagesModal/ModifyLanguagesModal.module.scss b/src/apps/profiles/src/member-profile/languages/ModifyLanguagesModal/ModifyLanguagesModal.module.scss index f7c803513..1d0a56d9b 100644 --- a/src/apps/profiles/src/member-profile/languages/ModifyLanguagesModal/ModifyLanguagesModal.module.scss +++ b/src/apps/profiles/src/member-profile/languages/ModifyLanguagesModal/ModifyLanguagesModal.module.scss @@ -54,5 +54,10 @@ border-radius: 8px; padding: $sp-2; border: 1px solid $black-10; + + button svg { + width: 16px; + height: 16px; + } } } \ No newline at end of file From 1d4baa79e7759895d27f842bc9d8a55f0d87ddac Mon Sep 17 00:00:00 2001 From: Chris McCann Date: Tue, 11 Jul 2023 15:59:30 -0700 Subject: [PATCH 5/5] Changes CircleCI env var handling --- .circleci/config.yml | 391 +++++++++++++++++++++---------------------- 1 file changed, 194 insertions(+), 197 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 16e161844..e90308b05 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,36 +2,36 @@ version: 2.1 defaults: &defaults docker: - - image: node:16.14 + - image: node:16.14 deploy_defaults: &deploy_defaults docker: - - image: cimg/python:3.10.2 + - image: cimg/python:3.10.2 test_defaults: &test_defaults docker: - - image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge + - image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge install_build_dependency: &install_build_dependency name: Installation of build and deployment dependencies. command: | - apt update - apt install jq -y - apt install python3-pip -y - pip3 install awscli --upgrade + apt update + apt install jq -y + apt install python3-pip -y + pip3 install awscli --upgrade install_dependency: &install_dependency name: Installation of build and deployment dependencies. command: | - pip3 install awscli --upgrade + pip3 install awscli --upgrade install_deploysuite: &install_deploysuite name: Installation of install_deploysuite. command: | - git clone --branch v1.4.13 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript - cp ./../buildscript/master_deploy.sh . - cp ./../buildscript/buildenv.sh . - cp ./../buildscript/awsconfiguration.sh . + git clone --branch v1.4.13 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript + cp ./../buildscript/master_deploy.sh . + cp ./../buildscript/buildenv.sh . + cp ./../buildscript/awsconfiguration.sh . restore_cache_settings_for_build: &restore_cache_settings_for_build key: connect-node-modules-{{ checksum "yarn.lock" }} @@ -39,39 +39,39 @@ restore_cache_settings_for_build: &restore_cache_settings_for_build save_cache_settings: &save_cache_settings key: connect-node-modules-{{ checksum "yarn.lock" }} paths: - - node_modules + - node_modules running_yarn_eslint: &running_yarn_eslint name: Running Yarn eslint command: | - yarn add eslint -g - yarn lint + yarn add eslint -g + yarn lint running_yarn_build: &running_yarn_build name: Running Yarn Build command: | - source buildenvvar - yarn install - yarn build + source buildenvvar + yarn install + yarn build running_yarn_sb_build: &running_yarn_sb_build name: Running Yarn Storybook Build command: | - source buildenvvar - yarn sb:build + source buildenvvar + yarn sb:build running_yarn_test: &running_yarn_test name: Running Yarn Test Build command: | - yarn install - yarn cypress install - yarn build - yarn cy:ci + yarn install + yarn cypress install + yarn build + yarn cy:ci workspace_persist: &workspace_persist root: . paths: - - build + - build workspace_attach: &workspace_attach at: ./workspace @@ -79,18 +79,16 @@ workspace_attach: &workspace_attach build_configuration_fetch: &build_configuration_fetch name: "configuring environment" command: | - ./awsconfiguration.sh $DEPLOY_ENV - ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar - aws s3 cp s3://tc-platform-${LOGICAL_ENV}/securitymanager/${LOGICAL_ENV}-platform-ui.env ./.env + ./awsconfiguration.sh $DEPLOY_ENV + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar + aws s3 cp s3://tc-platform-${LOGICAL_ENV}/securitymanager/${LOGICAL_ENV}-platform-ui.env ./.environments/.env.${LOGICAL_ENV}.local -lint_steps: &lint_steps - # Initialization. +lint_steps: &lint_steps # Initialization. - checkout - setup_remote_docker - run: *running_yarn_eslint -build_steps: &build_steps - # Initialization. +build_steps: &build_steps # Initialization. - checkout - setup_remote_docker - run: *install_build_dependency @@ -100,26 +98,25 @@ build_steps: &build_steps - run: *running_yarn_sb_build - persist_to_workspace: *workspace_persist -test_steps: &test_steps - # Initialization. +test_steps: &test_steps # Initialization. - checkout - setup_remote_docker - restore_cache: - key: test-node-modules-{{ checksum "yarn.lock" }} + key: test-node-modules-{{ checksum "yarn.lock" }} - run: *running_yarn_test - save_cache: - key: test-node-modules-{{ checksum "yarn.lock" }} - paths: - - node_modules - - /root/.cache/Cypress + key: test-node-modules-{{ checksum "yarn.lock" }} + paths: + - node_modules + - /root/.cache/Cypress - store_test_results: - path: cypress/test-report + path: cypress/test-report - store_artifacts: - path: cypress/test-report + path: cypress/test-report - store_artifacts: - path: cypress/videos + path: cypress/videos - store_artifacts: - path: cypress/screenshots + path: cypress/screenshots deploy_steps: &deploy_steps - checkout @@ -127,161 +124,161 @@ deploy_steps: &deploy_steps - run: *install_dependency - run: *install_deploysuite - deploy: - name: Running MasterScript - command: | - ./awsconfiguration.sh $DEPLOY_ENV - source awsenvconf - ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar - source buildenvvar - ./master_deploy.sh -d CFRONT -e $DEPLOY_ENV -c $ENABLE_CACHE + name: Running MasterScript + command: | + ./awsconfiguration.sh $DEPLOY_ENV + source awsenvconf + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar + source buildenvvar + ./master_deploy.sh -d CFRONT -e $DEPLOY_ENV -c $ENABLE_CACHE jobs: - lint-dev: - <<: *defaults - environment: - DEPLOY_ENV: "DEV" - LOGICAL_ENV: "dev" - APPNAME: "platform-ui-mvp" - steps: *lint_steps - - # lint-prod: - # <<: *defaults - # environment: - # DEPLOY_ENV: "PROD" - # LOGICAL_ENV: "prod" - # APPNAME: "platform-ui-mvp" - # steps: *lint_steps - - build-dev: - <<: *defaults - environment: - DEPLOY_ENV: "DEV" - LOGICAL_ENV: "dev" - APPNAME: "platform-ui-mvp" - steps: *build_steps - - build-qa: - <<: *defaults - environment: - DEPLOY_ENV: "QA" - LOGICAL_ENV: "qa" - APPNAME: "platform-ui-mvp" - steps: *build_steps - - build-prod: - <<: *defaults - environment: - DEPLOY_ENV: "PROD" - LOGICAL_ENV: "prod" - APPNAME: "platform-ui-mvp" - steps: *build_steps - - test-dev: - <<: *test_defaults - environment: - DEPLOY_ENV: "DEV" - LOGICAL_ENV: "dev" - APPNAME: "platform-ui-mvp" - steps: *test_steps - - # Just tests commited code. - deployDev: - <<: *deploy_defaults - environment: - DEPLOY_ENV: "DEV" - LOGICAL_ENV: "dev" - ENABLE_CACHE: true - APPNAME: "platform-ui-mvp" - steps: *deploy_steps - - deployQa: - <<: *deploy_defaults - environment: - DEPLOY_ENV: "QA" - LOGICAL_ENV: "qa" - ENABLE_CACHE: true - APPNAME: "platform-ui-mvp" - steps: *deploy_steps - - deployProd: - <<: *deploy_defaults - environment: - DEPLOY_ENV: "PROD" - LOGICAL_ENV: "prod" - ENABLE_CACHE: true - APPNAME: "platform-ui-mvp" - steps: *deploy_steps + lint-dev: + <<: *defaults + environment: + DEPLOY_ENV: "DEV" + LOGICAL_ENV: "dev" + APPNAME: "platform-ui-mvp" + steps: *lint_steps + + # lint-prod: + # <<: *defaults + # environment: + # DEPLOY_ENV: "PROD" + # LOGICAL_ENV: "prod" + # APPNAME: "platform-ui-mvp" + # steps: *lint_steps + + build-dev: + <<: *defaults + environment: + DEPLOY_ENV: "DEV" + LOGICAL_ENV: "dev" + APPNAME: "platform-ui-mvp" + steps: *build_steps + + build-qa: + <<: *defaults + environment: + DEPLOY_ENV: "QA" + LOGICAL_ENV: "qa" + APPNAME: "platform-ui-mvp" + steps: *build_steps + + build-prod: + <<: *defaults + environment: + DEPLOY_ENV: "PROD" + LOGICAL_ENV: "prod" + APPNAME: "platform-ui-mvp" + steps: *build_steps + + test-dev: + <<: *test_defaults + environment: + DEPLOY_ENV: "DEV" + LOGICAL_ENV: "dev" + APPNAME: "platform-ui-mvp" + steps: *test_steps + + # Just tests commited code. + deployDev: + <<: *deploy_defaults + environment: + DEPLOY_ENV: "DEV" + LOGICAL_ENV: "dev" + ENABLE_CACHE: true + APPNAME: "platform-ui-mvp" + steps: *deploy_steps + + deployQa: + <<: *deploy_defaults + environment: + DEPLOY_ENV: "QA" + LOGICAL_ENV: "qa" + ENABLE_CACHE: true + APPNAME: "platform-ui-mvp" + steps: *deploy_steps + + deployProd: + <<: *deploy_defaults + environment: + DEPLOY_ENV: "PROD" + LOGICAL_ENV: "prod" + ENABLE_CACHE: true + APPNAME: "platform-ui-mvp" + steps: *deploy_steps workflows: - version: 2 - build: - jobs: - - lint-dev: - context : org-global - filters: - branches: - ignore: - - master - - # - lint-prod: - # context : org-global - # filters: - # branches: - # only: - # - master - - - build-dev: - context : org-global - filters: - branches: - ignore: - - master - - qa - - profiles-app - - - build-qa: - context : org-global - filters: - branches: - only: - - qa - - profiles-app - - - build-prod: - context : org-global - filters: - branches: - only: - - master - - - deployDev: - context : org-global - requires: - - build-dev - filters: - branches: - only: - - dev - - onboarding - - - deployQa: - context : org-global - requires: - - build-qa - filters: - branches: - only: - - qa - - profiles-app - - - deployProd: - context : org-global - requires: - - build-prod - filters: &filters-prod - branches: - only: - - master - - - test-dev: - context : org-global + version: 2 + build: + jobs: + - lint-dev: + context: org-global + filters: + branches: + ignore: + - master + + # - lint-prod: + # context : org-global + # filters: + # branches: + # only: + # - master + + - build-dev: + context: org-global + filters: + branches: + ignore: + - master + - qa + - profiles-app + + - build-qa: + context: org-global + filters: + branches: + only: + - qa + - profiles-app + + - build-prod: + context: org-global + filters: + branches: + only: + - master + + - deployDev: + context: org-global + requires: + - build-dev + filters: + branches: + only: + - dev + - onboarding + + - deployQa: + context: org-global + requires: + - build-qa + filters: + branches: + only: + - qa + - profiles-app + + - deployProd: + context: org-global + requires: + - build-prod + filters: &filters-prod + branches: + only: + - master + + - test-dev: + context: org-global