Skip to content

Commit 4437412

Browse files
authored
Merge pull request #132 from appirio-tech/dev-ecs
Dev ECS change
2 parents f618f9c + cacf770 commit 4437412

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

.circleci/config.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,25 @@ build_steps: &build_steps
5656
#chmod +x /home/circleci/project/service/build/deploy.sh
5757
#/home/circleci/project/service/build/deploy.sh /home/circleci/project /home/circleci/project/service/build ap-review $DEPLOY_APP_ENV
5858
source awsenvconf
59-
./buildenv.sh -e $DEPLOY_ENV -b ${DEPLOY_ENV}-ap-review-microservice-deployvar
59+
./buildenv.sh -e $DEPLOY_ENV -b ${DEPLOY_ENV}-ap-review-microservice-ecs-deployvar
6060
source buildenvvar
61-
./master_deploy.sh -d EBS -e $DEPLOY_ENV -t "${DEPLOY_ENV}.${CIRCLE_BUILD_NUM}"
61+
#./master_deploy.sh -d EBS -e $DEPLOY_ENV -t "${DEPLOY_ENV}.${CIRCLE_BUILD_NUM}"
62+
./master_deploy.sh -d ECS -e $DEPLOY_ENV -t latest -s ${DEPLOY_ENV}-${APPNAME}-appvar -i ${APPNAME}
6263
6364
jobs:
6465
"build-dev":
6566
<<: *java_env
6667
environment:
6768
DEPLOY_APP_ENV: "dev"
68-
DEPLOY_ENV: "DEV"
69+
DEPLOY_ENV: "DEV"
70+
APPNAME: "ap-review-microservice"
6971
steps: *build_steps
7072
"build-prod":
7173
<<: *java_env
7274
environment:
7375
DEPLOY_APP_ENV: "prod"
7476
DEPLOY_ENV: "PROD"
77+
APPNAME: "ap-review-microservice"
7578
steps: *build_steps
7679

7780
workflows:
@@ -86,8 +89,11 @@ workflows:
8689
only:
8790
- dev
8891
- dev-msinteg
92+
- dev-ecs
8993
- "build-prod":
9094
context : org-global
9195
filters:
9296
branches:
93-
only: master
97+
only:
98+
- master
99+
- master-ecs

service/build/buildimage.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@ aws s3 cp "s3://appirio-platform-$ENV/services/common/dockercfg" ~/.dockercfg
4444

4545
echo "Building docker image $DOCKER_REPO/$IMAGE"
4646
docker build -t $DOCKER_REPO/$IMAGE $DEPLOY_DIR
47-
47+
APPNAME="$SERVICE-microservice"
48+
docker tag $DOCKER_REPO/$IMAGE $APPNAME:latest

service/src/main/java/com/appirio/service/review/resources/ReviewResource.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,16 @@ public ApiResponse deleteReview(@Auth AuthUser user, @PathParam("reviewId") Long
311311
}
312312
}
313313

314+
/**
315+
* Health check issue integration
316+
*/
317+
@GET
318+
@Path("/health")
319+
@Timed
320+
public ApiResponse healthcheck() throws Exception {
321+
return ApiResponseFactory.createResponse("health is fine");
322+
}
323+
314324
/**
315325
* This private method checks whether the user has administrator permissions and if the given review exists.
316326
*

0 commit comments

Comments
 (0)