Skip to content

Commit ba2df51

Browse files
rakibansaryThomasKranitsaseisbilir
authored
ci: publish image to dev ecr (#26)
* ci: deploy to dev * fix: use elasticsearch when opensearch-js is not availalbe - this is a temporary feature till we overhaul how we do indexing Signed-off-by: Rakib Ansary <[email protected]> * fix: project category id Signed-off-by: Rakib Ansary <[email protected]> * fix: project phase during challenge creation Signed-off-by: Rakib Ansary <[email protected]> * fix: scorecards to use Signed-off-by: Rakib Ansary <[email protected]> * fix: dev scorecard ids are different Signed-off-by: Rakib Ansary <[email protected]> * chore: publish image * fix: save creator * fix: save createdBy and updatedBy Signed-off-by: Rakib Ansary <[email protected]> * fix: turn autopilot on * update scorecard mapping (#16) * Feat/phase logic update (#17) * fix: legacy phase mapper * feat: remove timezone conversion * fix: bump versions * fix: fixed start time * fix: use uuid * Fix/sc (#19) * fix: scorecard mapping * fix: scorecard mapper * wip: challenge updatge * fix: non-null assertion Signed-off-by: Rakib Ansary <[email protected]> * fix: improve handling of draft challenges Signed-off-by: Rakib Ansary <[email protected]> * fix: legacy challenge update Signed-off-by: Rakib Ansary <[email protected]> * fix: saving phase on challenge:update Signed-off-by: Rakib Ansary <[email protected]> * chore: remove logs Signed-off-by: Rakib Ansary <[email protected]> * fix: remove undefined from map Signed-off-by: Rakib Ansary <[email protected]> * fix: update to topcoder-interface v0.0.40 Signed-off-by: Rakib Ansary <[email protected]> * feat: add logging interceptor * fix: version bump * fix: do not call acl for v5 tasks * fix: add iterative review phase constraint * fix: prize amount in cents * fix: total prize calculation * map v5 groupId to v4 groupId Signed-off-by: Rakib Ansary <[email protected]> * fix: prize calculation Signed-off-by: Rakib Ansary <[email protected]> * fix: post mortem flag Signed-off-by: Rakib Ansary <[email protected]> * fix: not creating ba in legacy Signed-off-by: Rakib Ansary <[email protected]> * support delete challenge (#22) * correct the f2f scorecard ID for dev (#23) * fix typo in challenge.delete (#24) * ci: publish image to prod ecr Signed-off-by: Rakib Ansary <[email protected]> * ci: publish image to ecr based on pr Signed-off-by: Rakib Ansary <[email protected]> * ci: publish image to ecr based on pr Signed-off-by: Rakib Ansary <[email protected]> * ci: filter not required Signed-off-by: Rakib Ansary <[email protected]> * ci: correctly set env variable Signed-off-by: Rakib Ansary <[email protected]> --------- Signed-off-by: Rakib Ansary <[email protected]> Co-authored-by: Thomas Kranitsas <[email protected]> Co-authored-by: eisbilir <[email protected]> Co-authored-by: eisbilir <[email protected]>
1 parent 2a15445 commit ba2df51

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.circleci/config.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ jobs:
66
- image: cimg/aws:2023.01
77
environment:
88
CODEARTIFACT_ENV: PROD
9-
ECR_ENV: PROD
109
SERVICE_NAME: "domain-challenge"
1110
OUT_DIR: "buildscripts"
1211
steps:
@@ -28,8 +27,14 @@ jobs:
2827
rm -f awsenvconf
2928
docker build -t ${SERVICE_NAME}:${CIRCLE_SHA1} .
3029
- run:
31-
name: "Set AWS environment variables"
30+
name: "Set ECR_ENV based on event type"
3231
command: |
32+
if [ "${CIRCLE_PULL_REQUEST}" != "" ]; then
33+
export ECR_ENV="DEV"
34+
else
35+
export ECR_ENV="PROD"
36+
fi
37+
echo "Using ECR Environment: ${ECR_ENV}"
3338
./awsconfiguration.sh ${ECR_ENV}
3439
- run:
3540
name: "Publish docker image"
@@ -45,7 +50,3 @@ workflows:
4550
jobs:
4651
- "publish-image":
4752
context: "org-global"
48-
filters:
49-
branches:
50-
only:
51-
- main

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ ENV GRPC_NOSQL_SERVER_PORT=50052
3030
ENV REGISTRATION_PHASE_ID=""
3131
ENV SUBMISSION_PHASE_ID=""
3232
ENV CHECKPOINT_SUBMISSION_PHASE_ID=""
33+
ENV TOPCODER_API_URL=""
3334
ENV AUTH_SECRET=""
3435
ENV AUTH0_AUDIENCE=""
3536
ENV AUTH0_CLIENT_ID=""
3637
ENV AUTH0_CLIENT_SECRET=""
3738
ENV AUTH0_PROXY_SERVER_URL=""
3839
ENV AUTH0_URL=""
39-
ENV TOPCODER_API_URL=""
4040

4141
CMD ["server.js"]

0 commit comments

Comments
 (0)