Skip to content
This repository was archived by the owner on Dec 9, 2025. It is now read-only.

Commit e3b2a2e

Browse files
Merge pull request #17 from appirio-tech/dev-pg
Merge Dev pg to Dev (mainstreaming)
2 parents 5ae93c7 + 9b6afd1 commit e3b2a2e

File tree

20 files changed

+153
-98
lines changed

20 files changed

+153
-98
lines changed

.circleci/config.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ install_dependency: &install_dependency
1414
install_deploysuite_latest: &install_deploysuite_latest
1515
name: Installation of install_deploysuite.
1616
command: |
17-
git clone --branch v1.4.1 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
17+
git clone --branch master https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1818
cp ./../buildscript/master_deploy.sh .
1919
cp ./../buildscript/buildenv.sh .
2020
cp ./../buildscript/awsconfiguration.sh .
@@ -114,8 +114,16 @@ jobs:
114114
<<: *defaults
115115
environment:
116116
DEPLOY_ENV: "DEV"
117-
LOGICAL_ENV: "dev"
117+
LOGICAL_ENV: "dev-pg"
118118
steps: *build_deploy_steps
119+
120+
"build-dev-pg":
121+
<<: *defaults
122+
environment:
123+
DEPLOY_ENV: "DEV"
124+
LOGICAL_ENV: "test-pg"
125+
TEMP_ENV: "dev"
126+
steps: *build_deploy_steps
119127

120128
# Build & Deploy against development backend
121129
"build-prod":
@@ -135,8 +143,7 @@ workflows:
135143
context : org-global
136144
filters:
137145
branches:
138-
only: [dev, test]
139-
146+
only: [dev, test,dev-pg]
140147
# Production build is executed on "master" branch only.
141148
- "build-prod":
142149
context : org-global

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,40 @@
1+
node_modules
2+
*.log
3+
env_producer.sh
4+
env_consumer.sh
5+
*.env
6+
*.sh
7+
*.list
8+
service/build/*.jar
9+
service/build/*.yaml
10+
service/build/*.json
11+
service/build/*.conf
12+
.classpath
13+
.settings
14+
.project
15+
.env
16+
service/target/*
17+
.settings
18+
service/dependency-reduced-pom.xml
19+
service/*.iml
20+
*.keystore
21+
*.ipr
22+
*.iws
23+
*.project
24+
*.classpath
25+
*.prefs
26+
*.component
27+
*.settings/
28+
target/
29+
ap-core-service-tests.log
130
.idea
31+
*.keystore
32+
token.properties
33+
*.iml
34+
*.jar
35+
src/main/resources/config-james.yml
36+
src/main/resources/shiro-james.ini
37+
.DS_Store
38+
.idea
39+
docker/dump.rdb
40+
src/main/resources/config.yml.tt

build/config/newrelic-template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ common: &default_settings
1313
# account. For example, if your license key is 12345 use this:
1414
# license_key: '12345'
1515
# The key binds your Agent's data to your account in the New Relic service.
16-
license_key: '12c8fadc3bfc2c3c67d08b397f020e512f0ba3fc'
16+
license_key: '12345'
1717

1818
# Agent Enabled
1919
# Use this setting to disable the agent instead of removing it from the startup command.
@@ -284,4 +284,4 @@ qa:
284284

285285
prod:
286286
<<: *default_settings
287-
app_name: Identity Service (Prod)
287+
app_name: Identity Service (Prod)

docker/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ Run Identity service with the following comamnd-line.
9898
Configure your IDE with the following information if you want to run/debug on it.
9999

100100
- Main class: com.appirio.tech.core.service.identity.IdentityApplication
101-
- Arguments: server target/classes/config.yml
101+
-
102+
Arguments: server target/classes/config.yml
102103
- Environment variables:
103104
- DOCKER_IP=[YOUR DOCKER'S IP ADRESS]
104105
- ZOOKEEPER_HOSTS_LIST=[YOUR DOCKER'S IP ADRESS]:2181

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@
168168
<version>3.2.1</version>
169169
</dependency>
170170
<dependency>
171-
<groupId>com.informix.jdbc</groupId>
172-
<artifactId>com.springsource.com.informix.jdbc</artifactId>
173-
<version>3.0.0.JC3</version>
171+
<groupId>org.postgresql</groupId>
172+
<artifactId>postgresql</artifactId>
173+
<version>42.2.8</version>
174174
</dependency>
175175
<dependency>
176176
<groupId>redis.clients</groupId>

src/main/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ COPY TC.prod.ldap.keystore ./TC.prod.ldap.keystore
1919

2020
COPY run-service.sh ./run-service.sh
2121

22-
RUN yum install wget -y; \
23-
wget -O dd-java-agent.jar 'https://search.maven.org/classic/remote_content?g=com.datadoghq&a=dd-java-agent&v=LATEST'
22+
#RUN yum install wget -y; \
23+
#wget -O dd-java-agent.jar 'https://search.maven.org/classic/remote_content?g=com.datadoghq&a=dd-java-agent&v=LATEST'
2424

2525
CMD ["/bin/bash", "/data/run-service.sh"]
2626

src/main/docker/run-service.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ if [ "$AP_ENV" = "prod" ]
55
then
66
java -Dnewrelic.environment=$AP_ENV -javaagent:/data/dd-java-agent.jar -Ddd.agent.host=$DD_TRACE_AGENT_HOSTNAME -Ddd.agent.port=8126 -Ddd.service.name=$DD_SERVICE_NAME -javaagent:$NEWRELIC_JAR -Djavax.net.ssl.trustStore=/data/TC.prod.ldap.keystore -DZOOKEEPER_HOSTS_LIST=$ZOOKEEPER_HOSTS_LIST -jar /data/tech.core.service.identity.jar server /data/config.yml
77
else
8-
java -javaagent:/data/dd-java-agent.jar -Ddd.agent.host=$DD_TRACE_AGENT_HOSTNAME -Ddd.agent.port=8126 -Ddd.service.name=$DD_SERVICE_NAME -Djavax.net.ssl.trustStore=/data/TC.prod.ldap.keystore -DZOOKEEPER_HOSTS_LIST=$ZOOKEEPER_HOSTS_LIST -jar /data/tech.core.service.identity.jar server /data/config.yml
8+
#java -javaagent:/data/dd-java-agent.jar -Ddd.agent.host=$DD_TRACE_AGENT_HOSTNAME -Ddd.agent.port=8126 -Ddd.service.name=$DD_SERVICE_NAME -Djavax.net.ssl.trustStore=/data/TC.prod.ldap.keystore -DZOOKEEPER_HOSTS_LIST=$ZOOKEEPER_HOSTS_LIST -jar /data/tech.core.service.identity.jar server /data/config.yml
9+
java -Djavax.net.ssl.trustStore=/data/TC.prod.ldap.keystore -DZOOKEEPER_HOSTS_LIST=$ZOOKEEPER_HOSTS_LIST -jar /data/tech.core.service.identity.jar server /data/config.yml
910
fi
1011

1112

src/main/java/com/appirio/tech/core/service/identity/IdentityApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public void run(IdentityConfiguration configuration, Environment environment) th
176176

177177
// JDBI based DAOs
178178
final DBIFactory factory = new DBIFactory();
179-
final DBI jdbi = factory.build(environment, configuration.getDataSourceFactory(), "common_oltp");
179+
final DBI jdbi = factory.build(environment, configuration.getDataSourceFactory(), "postgresql");
180180
jdbi.registerArgumentFactory(new TCIDArgumentFactory());
181181
final UserDAO userDao = jdbi.onDemand(UserDAO.class);
182182
final IdentityProviderDAO identityProviderDAO = jdbi.onDemand(IdentityProviderDAO.class);

src/main/java/com/appirio/tech/core/service/identity/dao/EmailDAO.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,30 @@ public abstract class EmailDAO implements Transactional<EmailDAO> {
2121

2222
@RegisterMapperFactory(TCBeanMapperFactory.class)
2323
@SqlQuery(
24-
"SELECT " + EMAIL_COLUMNS + " FROM email e WHERE user_id = :userId and email_type_id = :typeId"
24+
"SELECT " + EMAIL_COLUMNS + " FROM common_oltp.email e WHERE user_id = :userId and email_type_id = :typeId"
2525
)
2626
protected abstract Email findEmail(@Bind("userId") long userId, @Bind("typeId") int typeId);
2727

2828
@SqlQuery(
29-
"SELECT COUNT(user_id) FROM email WHERE LOWER(address)=LOWER(:email)"
29+
"SELECT COUNT(user_id) FROM common_oltp.email WHERE LOWER(address)=LOWER(:email)"
3030
)
3131
protected abstract int countEmail(@Bind("email") String email);
3232

3333
@SqlUpdate(
34-
"INSERT INTO email " +
34+
"INSERT INTO common_oltp.email " +
3535
"(user_id, email_id, email_type_id, address, primary_ind, status_id) VALUES " +
3636
"(:userId, :emailId, 1, :email, 1, :statusId)")
3737
protected abstract int createEmail(@Bind("userId") long userId, @Bind("emailId") long emailId, @Bind("email") String email, @Bind("statusId") int statusId);
3838

3939
@SqlUpdate(
40-
"UPDATE email SET " +
41-
"email_type_id = :e.typeId, address = :e.address, primary_ind = DECODE(:e.typeId, 1, 1, 0) " +
40+
"UPDATE common_oltp.email SET " +
41+
"email_type_id = :e.typeId, address = :e.address, primary_ind = (CASE WHEN :e.typeId = 1 THEN 1 ELSE 0 END) " +
4242
"WHERE email_id = :e.id"
4343
)
4444
protected abstract int updateEmail(@BindBean("e") Email email);
4545

4646
@SqlUpdate(
47-
"UPDATE email SET status_id = 1 WHERE user_id = :userId AND email_type_id = 1"
47+
"UPDATE common_oltp.email SET status_id = 1 WHERE user_id = :userId AND email_type_id = 1"
4848
)
4949
protected abstract int activateEmail(@Bind("userId") long userId);
5050

src/main/java/com/appirio/tech/core/service/identity/dao/GroupInformixDAO.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public abstract class GroupInformixDAO implements Transactional<GroupInformixDAO
2828
* @return the int value
2929
*/
3030
@RegisterMapperFactory(TCBeanMapperFactory.class)
31-
@SqlUpdate("INSERT INTO security_groups ("
31+
@SqlUpdate("INSERT INTO common_oltp.security_groups ("
3232
+ "group_id, description, create_user_id"
3333
+ ") VALUES ("
3434
+ ":g.id, :g.name, :g.createUserId)")
@@ -44,7 +44,7 @@ public abstract class GroupInformixDAO implements Transactional<GroupInformixDAO
4444
@RegisterMapperFactory(TCBeanMapperFactory.class)
4545
@SqlQuery(
4646
"SELECT group_id as id, description as name, create_user_id as createUserId " +
47-
"FROM security_groups WHERE description = :name"
47+
"FROM common_oltp.security_groups WHERE description = :name"
4848
)
4949
public abstract SecurityGroup findGroupByName(@Bind("name") String name);
5050

@@ -57,7 +57,7 @@ public abstract class GroupInformixDAO implements Transactional<GroupInformixDAO
5757
@RegisterMapperFactory(TCBeanMapperFactory.class)
5858
@SqlQuery(
5959
"SELECT group_id as id, description as name, create_user_id as createUserId " +
60-
"FROM security_groups WHERE group_id = :id"
60+
"FROM common_oltp.security_groups WHERE group_id = :id"
6161
)
6262
public abstract SecurityGroup findGroupById(@Bind("id") long id);
6363
}

0 commit comments

Comments
 (0)