Skip to content

Commit 71ef232

Browse files
Merge pull request #261 from splitio/FME-17146
Add harness ci
2 parents c3b45cc + 358ed41 commit 71ef232

8 files changed

Lines changed: 166 additions & 218 deletions

File tree

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/pull_request_template.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/ci-cd.yml

Lines changed: 0 additions & 135 deletions
This file was deleted.

.github/workflows/update-notice-year.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
pipeline:
2+
name: react-client-repo
3+
identifier: reactclient
4+
projectIdentifier: Harness_Split
5+
orgIdentifier: PROD
6+
tags: {}
7+
properties:
8+
ci:
9+
codebase:
10+
connectorRef: fmegithubharnessgitops
11+
repoName: react-client
12+
build: <+input>
13+
stages:
14+
- stage:
15+
name: Check-Test-Build-Upload
16+
identifier: Check_Test_Build_Upload
17+
description: ""
18+
type: CI
19+
spec:
20+
cloneCodebase: true
21+
caching:
22+
enabled: true
23+
override: true
24+
paths: []
25+
buildIntelligence:
26+
enabled: false
27+
execution:
28+
steps:
29+
- step:
30+
type: Run
31+
name: npm ci
32+
identifier: npm_ci
33+
spec:
34+
connectorRef: dockerhub
35+
image: node:lts
36+
shell: Bash
37+
command: npm ci
38+
- step:
39+
type: Run
40+
name: npm run check
41+
identifier: npm_run_check
42+
spec:
43+
connectorRef: dockerhub
44+
image: node:lts
45+
shell: Bash
46+
command: npm run check
47+
- step:
48+
type: Run
49+
name: npm run test
50+
identifier: npm_run_test
51+
spec:
52+
connectorRef: dockerhub
53+
image: node:lts
54+
shell: Bash
55+
command: npm run test -- --maxWorkers=2
56+
resources:
57+
limits:
58+
memory: 4Gi
59+
cpu: "2"
60+
- step:
61+
type: Run
62+
name: npm run build
63+
identifier: npm_run_build
64+
spec:
65+
connectorRef: dockerhub
66+
image: node:lts
67+
shell: Bash
68+
command: BUILD_BRANCH=<+codebase.branch> npm run build
69+
- parallel:
70+
- step:
71+
type: Run
72+
name: upload dev assets to CDN
73+
identifier: upload_dev_assets_to_CDN
74+
spec:
75+
connectorRef: dockerhub
76+
image: amazon/aws-cli:2.31.5
77+
shell: Bash
78+
command: aws s3 sync ./umd s3://split-public-stage/sdk --acl public-read --follow-symlinks --cache-control max-age=31536000,public
79+
envVariables:
80+
AWS_DEFAULT_REGION: us-east-1
81+
when:
82+
stageStatus: Success
83+
condition: <+trigger.event> == "PUSH" && <+trigger.branch> == "development"
84+
- step:
85+
type: Run
86+
name: upload prod assets to CDN
87+
identifier: upload_prod_assets_to_CDN
88+
spec:
89+
connectorRef: dockerhub
90+
image: amazon/aws-cli:2.31.5
91+
shell: Bash
92+
command: aws s3 sync ./umd s3://split-public/sdk --acl public-read --follow-symlinks --cache-control max-age=31536000,public
93+
envVariables:
94+
AWS_DEFAULT_REGION: us-east-1
95+
when:
96+
stageStatus: Success
97+
condition: <+trigger.event> == "PUSH" && <+trigger.branch> == "main"
98+
infrastructure:
99+
type: KubernetesDirect
100+
spec:
101+
connectorRef: "<+codebase.branch == \"main\" ? \"use1prod1cd\" : \"use1stage1cd\">"
102+
namespace: harness-delegate
103+
serviceAccountName: "<+codebase.branch == \"main\" ? \"use1-prod-1-public-assets\" : \"use1-stage-1-public-assets\">"
104+
automountServiceAccountToken: false
105+
nodeSelector: {}
106+
os: Linux
107+
delegateSelectors:
108+
- "<+codebase.branch == \"main\" ? \"use1-prod-1-cd\" : \"use1-stage-1-cd\">"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
inputSet:
2+
name: reactclient_push
3+
identifier: reactclient_push
4+
orgIdentifier: PROD
5+
projectIdentifier: Harness_Split
6+
pipeline:
7+
identifier: reactclient
8+
properties:
9+
ci:
10+
codebase:
11+
build:
12+
type: branch
13+
spec:
14+
branch: <+trigger.branch>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
inputSet:
2+
name: reactclientinputset
3+
identifier: reactclientinputset
4+
orgIdentifier: PROD
5+
projectIdentifier: Harness_Split
6+
pipeline:
7+
identifier: reactclient
8+
properties:
9+
ci:
10+
codebase:
11+
build:
12+
type: PR
13+
spec:
14+
number: <+trigger.prNumber>

0 commit comments

Comments
 (0)