Skip to content

Commit 9d895f6

Browse files
authored
Merge pull request #20 from topcoder-platform/bug-bash
Bug bash
2 parents d29ce9e + 25d33a5 commit 9d895f6

File tree

1,395 files changed

+131790
-44679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,395 files changed

+131790
-44679
lines changed

.circleci/config.yml

Lines changed: 148 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2
1+
version: 2.1
22

33
defaults: &defaults
44
docker:
@@ -18,7 +18,7 @@ install_dependency: &install_dependency
1818
install_deploysuite: &install_deploysuite
1919
name: Installation of install_deploysuite.
2020
command: |
21-
git clone --branch v1.3 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
21+
git clone --branch dev_comm https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
2222
cp ./../buildscript/master_deploy.sh .
2323
cp ./../buildscript/buildenv.sh .
2424
cp ./../buildscript/awsconfiguration.sh .
@@ -63,7 +63,7 @@ jobs:
6363
source awsenvconf
6464
source buildenvvar
6565
./master_deploy.sh -d ECS -e DEV -t latest -s dev_communityapp_taskvar -i communityapp
66-
66+
6767
# Build & Deploy against testing backend
6868
"build-test":
6969
<<: *defaults
@@ -91,7 +91,35 @@ jobs:
9191
source awsenvconf
9292
source buildenvvar
9393
./master_deploy.sh -d ECS -e DEV -t latest -s test_communityapp_taskvar -i communityapp
94-
94+
95+
# Build & Deploy against testing backend
96+
"build-qa":
97+
<<: *defaults
98+
steps:
99+
# Initialization.
100+
- checkout
101+
- setup_remote_docker
102+
- run: *install_dependency
103+
- run: *install_deploysuite
104+
# Restoration of node_modules from cache.
105+
- restore_cache: *restore_cache_settings_for_build
106+
- run:
107+
name: "configuring environment"
108+
command: |
109+
./awsconfiguration.sh DEV
110+
./buildenv.sh -e DEV -b qa_communityapp_buildvar,qa_communityapp_deployvar
111+
# Build of Docker image.
112+
- run: *build_docker_image
113+
# Caching node modules.
114+
- save_cache: *save_cache_settings
115+
# Deployment.
116+
- deploy:
117+
name: Running MasterScript
118+
command: |
119+
source awsenvconf
120+
source buildenvvar
121+
./master_deploy.sh -d ECS -e DEV -t latest -s qa_communityapp_taskvar -i communityapp
122+
95123
# Build & Deploy against prod api backend
96124
"build-prod-beta":
97125
<<: *defaults
@@ -118,8 +146,36 @@ jobs:
118146
command: |
119147
source awsenvconf
120148
source buildenvvar
121-
./master_deploy.sh -d ECS -e PROD -t latest -s beta_communityapp_taskvar -i communityapp
122-
149+
./master_deploy.sh -d ECS -e PROD -t latest -s beta_communityapp_taskvar, -i communityapp
150+
151+
# Build & Deploy against prod api backend
152+
"build-prod-staging":
153+
<<: *defaults
154+
steps:
155+
# Initialization.
156+
- checkout
157+
- setup_remote_docker
158+
- run: *install_dependency
159+
- run: *install_deploysuite
160+
# Restoration of node_modules from cache.
161+
- restore_cache: *restore_cache_settings_for_build
162+
- run:
163+
name: "configuring environment"
164+
command: |
165+
./awsconfiguration.sh PROD
166+
./buildenv.sh -e PROD -b staging_communityapp_buildvar,staging_communityapp_deployvar
167+
# Build of Docker image.
168+
- run: *build_docker_image
169+
# Caching node modules.
170+
- save_cache: *save_cache_settings
171+
# Deployment.
172+
- deploy:
173+
name: Running MasterScript
174+
command: |
175+
source awsenvconf
176+
source buildenvvar
177+
./master_deploy.sh -d ECS -e PROD -t latest -s staging_communityapp_taskvar, -i communityapp
178+
123179
# Build & Deploy against production backend
124180
"build-prod":
125181
<<: *defaults
@@ -147,6 +203,51 @@ jobs:
147203
source awsenvconf
148204
source buildenvvar
149205
./master_deploy.sh -d ECS -e PROD -t latest -s prod_communityapp_taskvar -i communityapp
206+
207+
"smoke-test-on-staging":
208+
<<: *defaults
209+
steps:
210+
# Initialization.
211+
- checkout
212+
- setup_remote_docker
213+
- run: *install_dependency
214+
- run: *install_deploysuite
215+
# Restoration of node_modules from cache.
216+
- restore_cache: *restore_cache_settings_for_build
217+
- run:
218+
name: "configuring environment"
219+
command: |
220+
./awsconfiguration.sh PROD
221+
./buildenv.sh -e PROD -b staging_communityapp_buildvar,staging_communityapp_deployvar
222+
- run:
223+
name: "Run automation"
224+
command: |
225+
source awsenvconf
226+
source buildenvvar
227+
./automated-smoke-test/smoketest.sh automation-config-staging.json prod
228+
229+
"smoke-test-on-production":
230+
<<: *defaults
231+
steps:
232+
# Initialization.
233+
- checkout
234+
- setup_remote_docker
235+
- run: *install_dependency
236+
- run: *install_deploysuite
237+
# Restoration of node_modules from cache.
238+
- restore_cache: *restore_cache_settings_for_build
239+
- run:
240+
name: "configuring environment"
241+
command: |
242+
./awsconfiguration.sh PROD
243+
./buildenv.sh -e PROD -b prod_communityapp_buildvar,prod_communityapp_deployvar
244+
- run:
245+
name: "Run automation"
246+
command: |
247+
source awsenvconf
248+
source buildenvvar
249+
./automated-smoke-test/smoketest.sh automation-config-prod.json prod
250+
150251
# Test job for the cases when we do not need deployment. It just rapidly
151252
# installs (updates) app dependencies, and runs tests (ESLint, Stylelint,
152253
# Jest unit-tests).
@@ -173,32 +274,66 @@ workflows:
173274
context : org-global
174275
filters:
175276
branches:
176-
only:
277+
only:
177278
- develop
279+
- feature/recommender-sync-develop
178280
# This is alternate dev env for parallel testing
179281
- "build-test":
180282
context : org-global
181283
filters:
182-
branches:
183-
only:
184-
- develop_masterscript
185-
- legacy-tco
284+
branches:
285+
only:
286+
- route-redirects
287+
# This is alternate dev env for parallel testing
288+
- "build-qa":
289+
context : org-global
290+
filters:
291+
branches:
292+
only:
293+
- tco-leaderboard-fix
186294
# This is beta env for production soft releases
187295
- "build-prod-beta":
188296
context : org-global
189297
filters:
190298
branches:
191299
only:
192-
- hot-fixes
300+
- free
301+
# This is stage env for production QA releases
302+
- "build-prod-staging":
303+
context : org-global
304+
filters:
305+
branches:
306+
only:
193307
- develop
194-
# Production builds are exectuted only on tagged commits to the
308+
- feature/recommender-sync-develop
309+
- "approve-smoke-test-on-staging":
310+
type: approval
311+
requires:
312+
- build-prod-staging
313+
- "smoke-test-on-staging":
314+
context : org-global
315+
requires:
316+
- approve-smoke-test-on-staging
317+
# Production builds are exectuted
318+
# when PR is merged to the master
319+
# Don't change anything in this configuration
320+
# That might trigger wrong branch to be
321+
# deployed on the production
195322
# master branch.
196323
- "build-prod":
197324
context : org-global
198325
filters:
199326
branches:
200327
only:
201328
- master
329+
- "approve-smoke-test-on-production":
330+
type: approval
331+
requires:
332+
- build-prod
333+
- "smoke-test-on-production":
334+
context : org-global
335+
requires:
336+
- approve-smoke-test-on-production
202337
# Simple testing is executed for any branch other than "develop" and
203338
# "master".
204339
- test:

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
__coverage__/
22
.git/
3+
node_modules/

.eslintrc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"extends": "./node_modules/topcoder-react-utils/config/eslint/default.json",
33
"rules": {
4-
"jsx-a11y/anchor-is-valid": false
5-
}
4+
"jsx-a11y/anchor-is-valid": false,
5+
"import/no-cycle": [2, { "maxDepth": 1 }],
6+
"react/forbid-prop-types": false
7+
},
8+
"env": {
9+
"browser": true
10+
}
611
}

.github/workflows/commitlint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Commitlint
2+
on: [pull_request]
3+
4+
jobs:
5+
commit-lint:
6+
runs-on: ubuntu-latest
7+
env:
8+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
- uses: wagoid/commitlint-github-action@v1.4.0
14+
with:
15+
configFile: './.commitlintrc.yml'

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,9 @@ jspm_packages
5151
set-env*.sh
5252
set-test-env.sh
5353
.idea
54-
*.iml
54+
*.iml
55+
56+
# e2e test case
57+
automated-smoke-test/temp
58+
automated-smoke-test/test-results
59+
automated-smoke-test/config/config.json

.huskyrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"commit-msg": "npm run commitlint"
4+
}
5+
}

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<a name="1.0.0"></a>
2+
# [1.0.0](https://github.com/topcoder-platform/community-app/compare/v0.18.23...v1.0.0) (2020-02-03)
3+
4+
5+

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @sushilshinde @ajefts
1+
* @sushilshinde @ajefts @luizrrodrigues

CONTRIBUTING.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributing
2+
3+
We would love for you to contribute to the community app :rocket:
4+
5+
- [Commit Message Guidelines](#commit)
6+
7+
## <a name="commit"></a> Commit Message Guidelines
8+
9+
We now have very precise rules over how our git commit messages can be formatted. This leads to **more
10+
readable messages** that are easy to follow when looking through the **project history**. But also,
11+
we use the git commit messages to **generate the change log**.
12+
13+
### Commit Message Format
14+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
15+
format that includes a **type**, a **scope** and a **subject**:
16+
17+
```
18+
<type>(<scope>): <subject>
19+
<BLANK LINE>
20+
<body>
21+
<BLANK LINE>
22+
<footer>
23+
```
24+
25+
The **header** is mandatory and the **scope** of the header is optional.
26+
27+
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
28+
to read on GitHub as well as in various git tools.
29+
30+
### Revert
31+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of
32+
the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is
33+
the SHA of the commit being reverted.
34+
35+
### Type
36+
Must be one of the following:
37+
38+
* **feat**: A new feature
39+
* **fix**: A bug fix
40+
* **docs**: Documentation only changes
41+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
42+
semi-colons, etc)
43+
* **refactor**: A code change that neither fixes a bug nor adds a feature
44+
* **perf**: A code change that improves performance
45+
* **test**: Adding missing tests or correcting existing tests
46+
* **build**: Changes that affect the build system, CI configuration or external dependencies
47+
(example scopes: gulp, broccoli, npm)
48+
* **chore**: Other changes that don't modify `src` or `test` files
49+
* **release**: Release version commit
50+
51+
### Scope
52+
The scope could be anything specifying place of the commit change. For example
53+
`login`, `profile`, `challenge-listing`, `challenge-detail` etc.
54+
55+
### Subject
56+
The subject contains succinct description of the change:
57+
58+
* use the imperative, present tense: "change" not "changed" nor "changes"
59+
* don't capitalize first letter
60+
* no dot (.) at the end
61+
62+
### Body
63+
Optional. Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
64+
The body should include the motivation for the change and contrast this with previous behavior.
65+
66+
### Footer
67+
Optional. The footer should contain any information about **Breaking Changes** and is also the place to
68+
reference GitHub issues that this commit **Closes**.
69+
70+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
71+
The rest of the commit message is then used for this.
72+
73+
### Generate Change long
74+
```
75+
npm run release:changelog
76+
```

0 commit comments

Comments
 (0)