diff --git a/.circleci/config.yml b/.circleci/config.yml index b2a60bfd..8184820a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,12 +8,12 @@ parameters: type: boolean defaults: &defaults - docker: - - image: cimg/python:3.11.0-browsers + docker: + - image: cimg/python:3.11.7-browsers test_defaults: &test_defaults - docker: - - image: docker:17.11.0-ce-git + docker: + - image: docker:17.11.0-ce-git install_dependency: &install_dependency name: Installation of build and deployment dependencies. @@ -22,8 +22,8 @@ install_dependency: &install_dependency sudo apt update sudo apt install python3-pip sudo pip3 install awscli --upgrade - sudo pip3 install docker==6.1.3 - sudo pip3 install docker-compose + # sudo pip3 install docker==6.1.3 + # sudo pip3 install docker-compose install_test_dependency: &install_test_dependency name: Installation of build and deployment dependencies. @@ -51,39 +51,38 @@ save_cache_settings: &save_cache_settings - node_modules builddeploy_steps: &builddeploy_steps - - checkout - - setup_remote_docker - - run: *install_dependency - - run: *install_deploysuite - - run: - name: "configuring environment" - command: | - ./awsconfiguration.sh $DEPLOY_ENV - ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar - echo awsenvconf >.dockerignore - echo buildenvvar >>.dockerignore - - run: - name: "building image" - command: | - source buildenvvar - ./build.sh ${APPNAME} - - 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 ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} - #curl --request POST \ - #--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ - #--header "Circle-Token: ${CIRCLE_TOKEN}" \ - #--header 'content-type: application/json' \ - #--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true, "run_basedeployment": false}}' + - checkout + - setup_remote_docker + - run: *install_dependency + - run: *install_deploysuite + - run: + name: "configuring environment" + command: | + ./awsconfiguration.sh $DEPLOY_ENV + ./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar + echo awsenvconf >.dockerignore + echo buildenvvar >>.dockerignore + - run: + name: "building image" + command: | + source buildenvvar + ./build.sh ${APPNAME} + - 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 ECS -e $DEPLOY_ENV -t latest -s ${LOGICAL_ENV}-global-appvar,${LOGICAL_ENV}-${APPNAME}-appvar -i ${APPNAME} + #curl --request POST \ + #--url https://circleci.com/api/v2/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pipeline \ + #--header "Circle-Token: ${CIRCLE_TOKEN}" \ + #--header 'content-type: application/json' \ + #--data '{"branch":"'"$CIRCLE_BRANCH"'","parameters":{"run_smoketesting":true, "run_basedeployment": false}}' # Automated Smoke Testing -smoke_testing: &smoke_testing - # Initialization. +smoke_testing: &smoke_testing # Initialization. - checkout - setup_remote_docker - run: *install_test_dependency @@ -150,15 +149,15 @@ workflows: jobs: # Development builds are executed on "develop" branch only. - "build-dev": - context : org-global + context: org-global filters: &filters-dev branches: - only: ['develop', 'multiround', 'release_0.20.9', 'metadata-fix'] + only: ["develop", "multiround", "release_0.20.9", "metadata-fix"] # Production builds are exectuted only on tagged commits to the # master branch. - "build-prod": - context : org-global + context: org-global filters: &filters-prod branches: only: master @@ -169,13 +168,13 @@ workflows: - Hold [Smoke-Testing]: type: approval - smoke-testing-dev: - context : org-global + context: org-global requires: - Hold [Smoke-Testing] filters: <<: *filters-dev - smoke-testing-prod: - context : org-global + context: org-global requires: - Hold [Smoke-Testing] filters: diff --git a/build.sh b/build.sh index 1e833a31..b8349788 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ APP_NAME=$1 UPDATE_CACHE="" echo "NODE ENV: $NODE_ENV" echo "BABEL ENV: $BABEL_ENV" -docker-compose -f docker/docker-compose.yml build --build-arg NODE_ENV=$NODE_ENV --build-arg BABEL_ENV=$BABEL_ENV --build-arg FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY --build-arg FORCE_DEV=$FORCE_DEV $APP_NAME +docker compose -f docker/docker-compose.yml build --build-arg NODE_ENV=$NODE_ENV --build-arg BABEL_ENV=$BABEL_ENV --build-arg FILE_PICKER_API_KEY=$FILE_PICKER_API_KEY --build-arg FORCE_DEV=$FORCE_DEV $APP_NAME docker create --name app $APP_NAME:latest if [ -d node_modules ] diff --git a/src/components/ChallengeEditor/index.js b/src/components/ChallengeEditor/index.js index a1605fce..e0cf321f 100644 --- a/src/components/ChallengeEditor/index.js +++ b/src/components/ChallengeEditor/index.js @@ -1005,7 +1005,7 @@ class ChallengeEditor extends Component { const isChallengeType = typeId === CHALLENGE_TYPE_ID const isDevChallenge = trackId === DEV_TRACK_ID const isMM = typeId === MARATHON_TYPE_ID - const showDashBoard = (isDataScience && isChallengeType) || (isDevChallenge && isMM) + const showDashBoard = (isDataScience && isChallengeType) || (isDevChallenge && isMM) || (isDevChallenge && isChallengeType) // indicate that creating process has started this.setState({ isSaving: true }) @@ -1647,7 +1647,7 @@ class ChallengeEditor extends Component { const isChallengeType = challenge.typeId === CHALLENGE_TYPE_ID const showRoundType = isDesignChallenge && isChallengeType const showCheckpointPrizes = challenge.timelineTemplateId === MULTI_ROUND_CHALLENGE_TEMPLATE_ID - const showDashBoard = (challenge.trackId === DS_TRACK_ID && isChallengeType) || (isDevChallenge && isMM) + const showDashBoard = (challenge.trackId === DS_TRACK_ID && isChallengeType) || (isDevChallenge && isMM) || (isDevChallenge && isChallengeType) const useDashboardData = _.find(challenge.metadata, { name: 'show_data_dashboard' }) const useDashboard = useDashboardData