From 1c2791b254c883fbc2ac4d17b4766a82d64304e0 Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Wed, 1 Feb 2023 19:45:06 +0530 Subject: [PATCH 01/12] Create pipeline reactmobapp --- .harness/reactmobapp.yaml | 116 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 .harness/reactmobapp.yaml diff --git a/.harness/reactmobapp.yaml b/.harness/reactmobapp.yaml new file mode 100644 index 0000000..a4831bf --- /dev/null +++ b/.harness/reactmobapp.yaml @@ -0,0 +1,116 @@ +pipeline: + name: reactmobapp + identifier: reactmobapp + projectIdentifier: Shell + orgIdentifier: default + tags: {} + properties: + ci: + codebase: + connectorRef: account.fmazlabsgit + repoName: fm-react-sample-app + build: <+input> + stages: + - stage: + name: shellapp + identifier: scan_and_build_react + type: CI + spec: + cloneCodebase: true + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: {} + execution: + steps: + - step: + type: Run + name: CreateHash + identifier: CreateHash + spec: + shell: Sh + command: |- + YARN_LOCK_HASH=`openssl sha1 yarn.lock | cut -c 22-` + echo $YARN_LOCK_HASH + description: CreateHash + - step: + type: RestoreCacheS3 + name: Restore Cache From S3 + identifier: Restore_Cache_From_S3 + spec: + connectorRef: account.aws_fm + region: ap-south-1 + bucket: shellpov + key: <+pipeline.stages.shellapp.spec.execution.steps.CreatHash.output.outputVariables.YARN_LOCK_HASH> + archiveFormat: Tar + - step: + type: Security + name: Sonar Scan + identifier: Sonar_Scan + spec: + privileged: true + settings: + policy_type: orchestratedScan + scan_type: repository + product_name: sonarqube + product_config_name: default + repository_project: fm-react-sample-app + repository_branch: <+codebase.branch> + product_access_token: <+secrets.getValue("sonartoken")> + product_domain: http://52.66.59.93:9000 + product_project_name: sonarharness + product_project_key: <+secrets.getValue("sonarharness")> + imagePullPolicy: Always + description: Scan Sonaqube + timeout: 1h + - step: + type: Run + name: Yarn Install + identifier: Yarn_Install + spec: + shell: Sh + command: |- + echo <+pipeline.stages.shellapp.spec.execution.steps.CreatHash.output.outputVariables.YARN_LOCK_HASH> + yarn install --prod + description: Yarn Install + - step: + type: SaveCacheS3 + name: Save Cache to S3 + identifier: Save_Cache_to_S3 + spec: + connectorRef: account.aws_fm + region: ap-south-1 + bucket: shellpov + key: <+pipeline.stages.shellapp.spec.execution.steps.CreateHash.output.outputVariables.YARN_LOCK_HASH> + sourcePaths: + - node_modules + archiveFormat: Tar + - step: + type: Run + name: Yarn build + identifier: Yarn_build + spec: + shell: Sh + command: |- + ls -la + yarn build + description: Yarn Build + sharedPaths: + - /var/run + serviceDependencies: + - identifier: DinD + name: DinD + type: Service + spec: + connectorRef: account.harnessImage + image: docker:dind + - identifier: Hash + name: Hash + type: Service + description: Node Image + spec: + connectorRef: account.harnessImage + image: node:18 + timeout: 10h From feb94f54c324af1516d2702355b7d97334f134ab Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Wed, 1 Feb 2023 19:55:20 +0530 Subject: [PATCH 02/12] Create inputset branch --- inputset.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 inputset.yaml diff --git a/inputset.yaml b/inputset.yaml new file mode 100644 index 0000000..0075209 --- /dev/null +++ b/inputset.yaml @@ -0,0 +1,14 @@ +inputSet: + name: branch + identifier: branch + orgIdentifier: default + projectIdentifier: Shell + pipeline: + identifier: reactmobapp + properties: + ci: + codebase: + build: + type: branch + spec: + branch: <+trigger.branch> From 05e3d4c0c78269a506f3d344651b628145a3e142 Mon Sep 17 00:00:00 2001 From: FMDEMOLABS <108448313+fmazlabs@users.noreply.github.com> Date: Wed, 1 Feb 2023 20:12:15 +0530 Subject: [PATCH 03/12] Update index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 87d1be5..f1cf7ed 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementById('root')); -// If you want your app to work offline and load faster, you can change +// If you want your app to work offline and load faster, you can change demodemo // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister(); From b4b247e43ef52221e17a3e324a19e0db5a23cbb5 Mon Sep 17 00:00:00 2001 From: FMDEMOLABS <108448313+fmazlabs@users.noreply.github.com> Date: Wed, 1 Feb 2023 20:19:14 +0530 Subject: [PATCH 04/12] Update index.js master-patch commit --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index f1cf7ed..a331cd9 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementById('root')); -// If you want your app to work offline and load faster, you can change demodemo +// If you want your app to work offline and load faster, you can change demo // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister(); From 8e0353948ec97e8acd8fc1566d2283005213bfb8 Mon Sep 17 00:00:00 2001 From: FMDEMOLABS <108448313+fmazlabs@users.noreply.github.com> Date: Wed, 1 Feb 2023 20:27:14 +0530 Subject: [PATCH 05/12] Update index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a331cd9..9b76093 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementById('root')); -// If you want your app to work offline and load faster, you can change demo +// If you want your app to work offline and load faster, you can change demo3 // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister(); From c078c682f5500fa090e1932e8148b6e4d5df51c1 Mon Sep 17 00:00:00 2001 From: FMDEMOLABS <108448313+fmazlabs@users.noreply.github.com> Date: Wed, 1 Feb 2023 20:28:00 +0530 Subject: [PATCH 06/12] Update index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 9b76093..007068f 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementById('root')); -// If you want your app to work offline and load faster, you can change demo3 +// If you want your app to work offline and load faster, you can change demo4 // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister(); From 5ceb88d4d3374ff6e4739a51cd2d2adc6d5f6179 Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Wed, 1 Feb 2023 20:49:11 +0530 Subject: [PATCH 07/12] Update pipeline reactmobapp --- .harness/reactmobapp.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.harness/reactmobapp.yaml b/.harness/reactmobapp.yaml index a4831bf..53ba93f 100644 --- a/.harness/reactmobapp.yaml +++ b/.harness/reactmobapp.yaml @@ -113,4 +113,5 @@ pipeline: spec: connectorRef: account.harnessImage image: node:18 + variables: [] timeout: 10h From e86d2c9040c807a9580de34ae128c4cbee40656c Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Thu, 2 Feb 2023 02:02:13 +0530 Subject: [PATCH 08/12] Update pipeline reactmobapp --- .harness/reactmobapp.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.harness/reactmobapp.yaml b/.harness/reactmobapp.yaml index 53ba93f..a4ae52b 100644 --- a/.harness/reactmobapp.yaml +++ b/.harness/reactmobapp.yaml @@ -97,6 +97,21 @@ pipeline: ls -la yarn build description: Yarn Build + - step: + type: Run + name: Run Tests + identifier: Run_Tests + spec: + connectorRef: account.harnessImage + image: node:18 + shell: Sh + command: yarn test + reports: + type: JUnit + spec: + paths: + - "**/*.xml" + description: Test Intelligence sharedPaths: - /var/run serviceDependencies: From 05ad417bcb446557f41e8a286174cbbe43b4c07b Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Thu, 2 Feb 2023 02:08:31 +0530 Subject: [PATCH 09/12] Update pipeline reactmobapp --- .harness/reactmobapp.yaml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.harness/reactmobapp.yaml b/.harness/reactmobapp.yaml index a4ae52b..53ba93f 100644 --- a/.harness/reactmobapp.yaml +++ b/.harness/reactmobapp.yaml @@ -97,21 +97,6 @@ pipeline: ls -la yarn build description: Yarn Build - - step: - type: Run - name: Run Tests - identifier: Run_Tests - spec: - connectorRef: account.harnessImage - image: node:18 - shell: Sh - command: yarn test - reports: - type: JUnit - spec: - paths: - - "**/*.xml" - description: Test Intelligence sharedPaths: - /var/run serviceDependencies: From aad3cf7ae3450c1eeccb788c200f77743996d65f Mon Sep 17 00:00:00 2001 From: FMDEMOLABS <108448313+fmazlabs@users.noreply.github.com> Date: Thu, 2 Feb 2023 08:58:27 +0530 Subject: [PATCH 10/12] Update index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 007068f..5104642 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementById('root')); -// If you want your app to work offline and load faster, you can change demo4 +// If you want your app to work offline and load faster, you can change demo5 // unregister() to register() below. Note this comes with some pitfalls. // Learn more about service workers: https://bit.ly/CRA-PWA serviceWorker.unregister(); From 1ffce0b1c127be45be6e9f5d7da49f4291ebc303 Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Thu, 13 Apr 2023 01:02:40 +0530 Subject: [PATCH 11/12] Update pipeline reactmobapp --- .harness/reactmobapp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/reactmobapp.yaml b/.harness/reactmobapp.yaml index 53ba93f..3eca0f6 100644 --- a/.harness/reactmobapp.yaml +++ b/.harness/reactmobapp.yaml @@ -47,7 +47,7 @@ pipeline: archiveFormat: Tar - step: type: Security - name: Sonar Scan + name: SonarQube identifier: Sonar_Scan spec: privileged: true From 6ebb3ea94845dbd613c9ef2feb7db1c748395cce Mon Sep 17 00:00:00 2001 From: "francis.kumar@harness.io" Date: Thu, 13 Apr 2023 01:13:50 +0530 Subject: [PATCH 12/12] Update pipeline reactmobapp --- .harness/reactmobapp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness/reactmobapp.yaml b/.harness/reactmobapp.yaml index 3eca0f6..53ba93f 100644 --- a/.harness/reactmobapp.yaml +++ b/.harness/reactmobapp.yaml @@ -47,7 +47,7 @@ pipeline: archiveFormat: Tar - step: type: Security - name: SonarQube + name: Sonar Scan identifier: Sonar_Scan spec: privileged: true