From 8e43eabbdbddcdb7c18c8939a8ecef10f31bcbf2 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sat, 29 Oct 2022 21:56:16 +0200 Subject: [PATCH 01/13] Update guestbook.js Edited apiUrl and entries --- guestbook.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guestbook.js b/guestbook.js index 22363fbc..eeb81d40 100644 --- a/guestbook.js +++ b/guestbook.js @@ -1,13 +1,13 @@ /** * Web application */ -const apiUrl = ''; +const apiUrl = 'https://eu-gb.functions.appdomain.cloud/api/v1/web/2405b280-c725-44a2-84ad-159bbb34ac3f/guestbook/'; const guestbook = { // retrieve the existing guestbook entries get() { return $.ajax({ type: 'GET', - url: `${apiUrl}/entries`, + url: `${apiUrl}/read-guestbook-entries-sequence.json`, dataType: 'json' }); }, @@ -16,7 +16,7 @@ const guestbook = { console.log('Sending', name, email, comment) return $.ajax({ type: 'PUT', - url: `${apiUrl}/entries`, + url: `${apiUrl}/save-guestbook-entry-sequence.json`, contentType: 'application/json; charset=utf-8', data: JSON.stringify({ name, From 8934b22c9bb2973d9c39a515e2a9cf81190d90bc Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 30 Oct 2022 22:20:36 +0200 Subject: [PATCH 02/13] Update guestbook.js added urls and json entrie --- guestbook.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guestbook.js b/guestbook.js index eeb81d40..d912aed9 100644 --- a/guestbook.js +++ b/guestbook.js @@ -1,7 +1,7 @@ /** * Web application */ -const apiUrl = 'https://eu-gb.functions.appdomain.cloud/api/v1/web/2405b280-c725-44a2-84ad-159bbb34ac3f/guestbook/'; +const apiUrl = 'https://eu-gb.functions.appdomain.cloud/api/v1/web/2405b280-c725-44a2-84ad-159bbb34ac3f/guestbook'; const guestbook = { // retrieve the existing guestbook entries get() { From 36b72fa52e0757363dfb897520d117b099e85803 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Fri, 16 Dec 2022 17:23:45 +0200 Subject: [PATCH 03/13] Add .circleci/config.yml --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..6554e1f4 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/2.0/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/2.0/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: cimg/base:stable + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Invoke jobs via workflows +# See: https://circleci.com/docs/2.0/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello From 24e91e9151ac28e3be4a0507bcc299b17cf262ac Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Fri, 16 Dec 2022 17:31:45 +0200 Subject: [PATCH 04/13] Updated config.yml --- .circleci/config.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6554e1f4..25a5921f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,22 +5,34 @@ version: 2.1 # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - say-hello: + print_hello: # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor docker: - - image: cimg/base:stable + - image: circleci/node:13.8.0 # Add steps to the job # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - checkout - run: name: "Say hello" - command: "echo Hello, World!" - + command: "echo Hello" + print_world: + # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + docker: + - image: circleci/node:13.8.0 + # Add steps to the job + # See: https://circleci.com/docs/2.0/configuration-reference/#steps + steps: + - checkout + - run: + name: "Say world" + command: "echo World!" # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: say-hello-workflow: jobs: - - say-hello + - print_hello + - print_world \ No newline at end of file From 4d591a864312a0ea8d0c944fa0c1843fd8e4f29b Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Fri, 16 Dec 2022 17:43:56 +0200 Subject: [PATCH 05/13] Updated config.yml --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25a5921f..658db52a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,4 +35,6 @@ workflows: say-hello-workflow: jobs: - print_hello - - print_world \ No newline at end of file + - print_world: + requires: + - print_hello \ No newline at end of file From 1165eee128521d37418b181fc454bc4f09d991ee Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Fri, 16 Dec 2022 20:12:25 +0200 Subject: [PATCH 06/13] Updated config.yml --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 658db52a..9c5c6de7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,6 +29,13 @@ jobs: - run: name: "Say world" command: "echo World!" + say_my_name: + docker: + - image: circleci/node:13.8.0 + steps: + - run: + name: "Say my name" + command: echo ${Name} # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: @@ -37,4 +44,5 @@ workflows: - print_hello - print_world: requires: - - print_hello \ No newline at end of file + - print_hello + - say_my_name \ No newline at end of file From 9c5ce7ce978811ba9ce94630619629064febb506 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 18 Dec 2022 20:22:15 +0200 Subject: [PATCH 07/13] Updated config.yml --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c5c6de7..2ef3a8ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,15 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. # See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 - +commands: + print_pipeline_id: + description: "Command for printing hello world!" + parameters: + to: + type: string + default: "null" + steps: + - run: echo $CIRCLE_WORKFLOW_ID # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: From d05bc2f7d08bf99f9d660e3011f9cc04b5b53e09 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 18 Dec 2022 20:27:40 +0200 Subject: [PATCH 08/13] Updated config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ef3a8ac..f05610e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,8 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - checkout + - print_pipeline_id: + to: $CIRCLE_WORKFLOW_ID - run: name: "Say world" command: "echo World!" From 02dbbeb2b8336320c808170e9733ca522916be59 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 18 Dec 2022 20:34:08 +0200 Subject: [PATCH 09/13] Updated config.yml --- .circleci/config.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f05610e2..f5d01fc2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,13 +3,8 @@ version: 2.1 commands: print_pipeline_id: - description: "Command for printing hello world!" - parameters: - to: - type: string - default: "null" steps: - - run: echo $CIRCLE_WORKFLOW_ID + - run: echo ${CIRCLE_WORKFLOW_ID} # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: @@ -34,8 +29,7 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - checkout - - print_pipeline_id: - to: $CIRCLE_WORKFLOW_ID + - print_pipeline_id - run: name: "Say world" command: "echo World!" From 48ab50e884faa9d807a1312bcede6224bb2a94f2 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 18 Dec 2022 20:35:58 +0200 Subject: [PATCH 10/13] Updated config.yml --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f5d01fc2..302c490d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,11 +28,7 @@ jobs: # Add steps to the job # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - - checkout - print_pipeline_id - - run: - name: "Say world" - command: "echo World!" say_my_name: docker: - image: circleci/node:13.8.0 From 0300618330190b412584795c996740f7c46969a3 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 18 Dec 2022 20:37:54 +0200 Subject: [PATCH 11/13] Updated config.yml --- .circleci/config.yml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 302c490d..fbf73cc9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,18 +8,6 @@ commands: # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs jobs: - print_hello: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - docker: - - image: circleci/node:13.8.0 - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - - checkout - - run: - name: "Say hello" - command: "echo Hello" print_world: # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor @@ -29,20 +17,9 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - print_pipeline_id - say_my_name: - docker: - - image: circleci/node:13.8.0 - steps: - - run: - name: "Say my name" - command: echo ${Name} # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: say-hello-workflow: jobs: - - print_hello - - print_world: - requires: - - print_hello - - say_my_name \ No newline at end of file + - print_world \ No newline at end of file From 9b41b246687c065efd4c52ecc71aca2660882783 Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Sun, 18 Dec 2022 20:41:10 +0200 Subject: [PATCH 12/13] Updated config.yml --- .circleci/config.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fbf73cc9..1d4cdd89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,25 +1,18 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 + commands: print_pipeline_id: steps: - - run: echo ${CIRCLE_WORKFLOW_ID} -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs + - run: echo ${CIRCLE_WORKFLOW_ID} + jobs: - print_world: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor + my_job: docker: - image: circleci/node:13.8.0 - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps steps: - print_pipeline_id -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows + workflows: - say-hello-workflow: + my_workflow: jobs: - - print_world \ No newline at end of file + - my_job \ No newline at end of file From 95cdb4544935098bc2860ba1cb57884ef3791caf Mon Sep 17 00:00:00 2001 From: MostafaAlaa297 <60885641+MostafaAlaa297@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:19:09 +0200 Subject: [PATCH 13/13] Updated config.yml --- .circleci/config.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d4cdd89..01b90eec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,16 +1,20 @@ version: 2.1 commands: - print_pipeline_id: + return_error: steps: - - run: echo ${CIRCLE_WORKFLOW_ID} + - run: return 1 jobs: my_job: docker: - image: circleci/node:13.8.0 steps: - - print_pipeline_id + - return_error + - run: + name: Non-Zero error + command: echo "non-zero error" + when: on_fail workflows: my_workflow: