From 3fdbc40158a2fc4bc3e25764f0c74e6abc43625e Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:04:48 +0000 Subject: [PATCH 01/34] Add app.py --- app.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..4693ad3 --- /dev/null +++ b/app.py @@ -0,0 +1,2 @@ +def add(a, b): + return a + b From d2249506e4b0358599278b234cfa8d37b415daac Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:05:52 +0000 Subject: [PATCH 02/34] Add test_app.py --- test_app.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test_app.py diff --git a/test_app.py b/test_app.py new file mode 100644 index 0000000..c7adae4 --- /dev/null +++ b/test_app.py @@ -0,0 +1,4 @@ +import app + +def test_add(): + assert app.add(2, 3) == 5 From 0e3ebbb2977e16c12bf0f68e95e2ac0b19485b23 Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:06:43 +0000 Subject: [PATCH 03/34] Add sonar-project.properties --- sonar-project.properties | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..a2d651c --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,4 @@ +sonar.projectKey=dummy-app +sonar.sources=. +sonar.language=py +sonar.python.version=3 \ No newline at end of file From 3e7902e5669aa665525a023fe30da8dff12647b8 Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:07:29 +0000 Subject: [PATCH 04/34] Add .woodpecker.yml --- .woodpecker.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..f11371d --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,31 @@ +pipeline: + clone: + image: alpine/git + commands: + - git clone ${CI_REPO_CLONE_URL} . + + run-tests: + image: python:3.11 + commands: + - pip install pytest + - pytest + + sonar-scan: + image: sonarsource/sonar-scanner-cli + secrets: [ sonar_token ] + commands: + - sonar-scanner -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_URL + + notify: + image: curlimages/curl + commands: + - echo "Build completed for $CI_COMMIT_SHA" | curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL + + push-to-github: + image: alpine/git + secrets: [ github_token ] + when: + status: success + commands: + - git remote add github https://$GITHUB_TOKEN@github.com//dummy-app.git + - git push github HEAD:main From a4ef670763f3f8576d2787d59fbb83bce1997959 Mon Sep 17 00:00:00 2001 From: Eliya Sankar Date: Wed, 26 Nov 2025 20:25:01 +0000 Subject: [PATCH 05/34] trigger pipeline From 16a4f937557e53f66ef23b51d7a3ebb402571202 Mon Sep 17 00:00:00 2001 From: Eliya Sankar Date: Wed, 26 Nov 2025 20:49:54 +0000 Subject: [PATCH 06/34] test github integration --- docker-compose.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..3938788 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3" +services: + sonarqube: + image: sonarqube:lts + ports: + - "9000:9000" + environment: + - SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true + volumes: + - sonarqube_data:/opt/sonarqube/data + - sonarqube_extensions:/opt/sonarqube/extensions + +volumes: + sonarqube_data: + sonarqube_extensions: + From 40641575f93ed04b8bbea996489bf1b01400a0de Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:52:28 +0000 Subject: [PATCH 07/34] Update .woodpecker.yml --- .woodpecker.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index f11371d..152e434 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,31 +1,37 @@ -pipeline: - clone: +steps: + - name: clone image: alpine/git commands: - git clone ${CI_REPO_CLONE_URL} . - run-tests: + - name: run-tests image: python:3.11 commands: - pip install pytest - pytest - sonar-scan: + - name: sonar-scan image: sonarsource/sonar-scanner-cli - secrets: [ sonar_token ] + secrets: [ SONAR_TOKEN, SONAR_URL ] commands: - - sonar-scanner -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_URL + - sonar-scanner \ + -Dsonar.login=$SONAR_TOKEN \ + -Dsonar.host.url=$SONAR_URL \ + -Dsonar.projectKey=dummy-app \ + -Dsonar.sources=. - notify: + - name: notify image: curlimages/curl + secrets: [ WEBHOOK_URL ] commands: - - echo "Build completed for $CI_COMMIT_SHA" | curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL + - echo "Build completed for $CI_COMMIT_SHA" \ + | curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL - push-to-github: + - name: push-to-github image: alpine/git - secrets: [ github_token ] + secrets: [ GITHUB_TOKEN ] when: - status: success + status: [ success ] commands: - - git remote add github https://$GITHUB_TOKEN@github.com//dummy-app.git + - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - git push github HEAD:main From ffd7dd05af908bfea9ddbd995074e9675d87e641 Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:53:17 +0000 Subject: [PATCH 08/34] Update .woodpecker.yml --- .woodpecker.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 152e434..d612227 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -14,18 +14,20 @@ steps: image: sonarsource/sonar-scanner-cli secrets: [ SONAR_TOKEN, SONAR_URL ] commands: - - sonar-scanner \ - -Dsonar.login=$SONAR_TOKEN \ - -Dsonar.host.url=$SONAR_URL \ - -Dsonar.projectKey=dummy-app \ - -Dsonar.sources=. + - > + sonar-scanner + -Dsonar.login=$SONAR_TOKEN + -Dsonar.host.url=$SONAR_URL + -Dsonar.projectKey=dummy-app + -Dsonar.sources=. - name: notify image: curlimages/curl secrets: [ WEBHOOK_URL ] commands: - - echo "Build completed for $CI_COMMIT_SHA" \ - | curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL + - > + echo "Build completed: $CI_COMMIT_SHA" | + curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL - name: push-to-github image: alpine/git From 91a77921b9b2f41709b729569438577e7f34578b Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:54:23 +0000 Subject: [PATCH 09/34] Update .woodpecker.yml --- .woodpecker.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index d612227..6ad1d8f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,3 +1,6 @@ +when: + event: [ push ] + steps: - name: clone image: alpine/git @@ -12,7 +15,11 @@ steps: - name: sonar-scan image: sonarsource/sonar-scanner-cli - secrets: [ SONAR_TOKEN, SONAR_URL ] + environment: + SONAR_TOKEN: + from_secret: SONAR_TOKEN + SONAR_URL: + from_secret: SONAR_URL commands: - > sonar-scanner @@ -23,7 +30,9 @@ steps: - name: notify image: curlimages/curl - secrets: [ WEBHOOK_URL ] + environment: + WEBHOOK_URL: + from_secret: WEBHOOK_URL commands: - > echo "Build completed: $CI_COMMIT_SHA" | @@ -31,7 +40,9 @@ steps: - name: push-to-github image: alpine/git - secrets: [ GITHUB_TOKEN ] + environment: + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN when: status: [ success ] commands: From b91977034dd65bc7019d2f14542e7e05e458e063 Mon Sep 17 00:00:00 2001 From: rohit Date: Sun, 30 Nov 2025 16:40:06 +0000 Subject: [PATCH 10/34] chore: change the when statement --- .woodpecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 6ad1d8f..b460409 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,5 +1,6 @@ when: - event: [ push ] + - event: push + branch: test steps: - name: clone From 136adacd4f367b592d30fd606065213a584e20b5 Mon Sep 17 00:00:00 2001 From: rohit Date: Sun, 30 Nov 2025 16:54:05 +0000 Subject: [PATCH 11/34] chore: no nned to clone --- .woodpecker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index b460409..93ce221 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,10 +3,10 @@ when: branch: test steps: - - name: clone - image: alpine/git - commands: - - git clone ${CI_REPO_CLONE_URL} . + # - name: clone + # image: alpine/git + # commands: + # - git clone ${CI_REPO_CLONE_URL} . - name: run-tests image: python:3.11 From 5b6483f336a675dffd4b57a502192268dd8d220d Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 18:47:58 +0000 Subject: [PATCH 12/34] Update .woodpecker.yml --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 93ce221..13b628a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -49,3 +49,4 @@ steps: commands: - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - git push github HEAD:main + From 0a876190182ba83babfe99a2327c5fe0c90e9e2b Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 18:56:28 +0000 Subject: [PATCH 13/34] Update .woodpecker.yml --- .woodpecker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 13b628a..ef76aaf 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -48,5 +48,4 @@ steps: status: [ success ] commands: - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main - + - git push github HEAD:main \ No newline at end of file From 389750349ffb63be74f04d2fb57d908582e22c19 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:03:01 +0000 Subject: [PATCH 14/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index ef76aaf..bcae3e8 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -26,7 +26,7 @@ steps: sonar-scanner -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_URL - -Dsonar.projectKey=dummy-app + -Dsonar.projectKey=Magiciian_dummy-app -Dsonar.sources=. - name: notify From 18f5e03ff7dc03534c2fffdd3a2a1ba9ae475c5f Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:08:19 +0000 Subject: [PATCH 15/34] Update .woodpecker.yml --- .woodpecker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index bcae3e8..9df175f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -21,12 +21,15 @@ steps: from_secret: SONAR_TOKEN SONAR_URL: from_secret: SONAR_URL + SONAR_ORGANIZATION: + from_secret: SONAR_ORGANIZATION commands: - > sonar-scanner -Dsonar.login=$SONAR_TOKEN -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=Magiciian_dummy-app + -Dsonar.organization=$SONAR_ORGANIZATION -Dsonar.sources=. - name: notify From cce45d5c66923d24f53c0425e0e209f7b916517d Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:10:04 +0000 Subject: [PATCH 16/34] Update .woodpecker.yml --- .woodpecker.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 9df175f..2552c5d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -14,23 +14,23 @@ steps: - pip install pytest - pytest - - name: sonar-scan - image: sonarsource/sonar-scanner-cli - environment: - SONAR_TOKEN: - from_secret: SONAR_TOKEN - SONAR_URL: - from_secret: SONAR_URL - SONAR_ORGANIZATION: - from_secret: SONAR_ORGANIZATION - commands: - - > - sonar-scanner - -Dsonar.login=$SONAR_TOKEN - -Dsonar.host.url=$SONAR_URL - -Dsonar.projectKey=Magiciian_dummy-app - -Dsonar.organization=$SONAR_ORGANIZATION - -Dsonar.sources=. +# - name: sonar-scan +# image: sonarsource/sonar-scanner-cli +# environment: +# SONAR_TOKEN: +# from_secret: SONAR_TOKEN +# SONAR_URL: +# from_secret: SONAR_URL +# SONAR_ORGANIZATION: +# from_secret: SONAR_ORGANIZATION +# commands: +# - > +# sonar-scanner +# -Dsonar.login=$SONAR_TOKEN +# -Dsonar.host.url=$SONAR_URL +# -Dsonar.projectKey=Magiciian_dummy-app +# -Dsonar.organization=$SONAR_ORGANIZATION +# -Dsonar.sources=. - name: notify image: curlimages/curl From 0faf039632dbc0d83cea9b5a1b4a68431ec4f756 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:10:49 +0000 Subject: [PATCH 17/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2552c5d..8302e04 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -40,7 +40,7 @@ steps: commands: - > echo "Build completed: $CI_COMMIT_SHA" | - curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL + curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL - name: push-to-github image: alpine/git From 98363b2263c3172b4dde59ee7da34c4af6e287c7 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:13:05 +0000 Subject: [PATCH 18/34] Update .woodpecker.yml --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 8302e04..def5e19 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -51,4 +51,5 @@ steps: status: [ success ] commands: - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + git push --mirror - git push github HEAD:main \ No newline at end of file From b4581c604c34e28ee5730b86115d3bfbf7989f85 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:13:35 +0000 Subject: [PATCH 19/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index def5e19..d7caa49 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -51,5 +51,5 @@ steps: status: [ success ] commands: - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - git push --mirror + - git push --mirror https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - git push github HEAD:main \ No newline at end of file From bee9ed70d085bb8e1c631ee67442699a24e7b35b Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:17:50 +0000 Subject: [PATCH 20/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index d7caa49..3da10ff 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -40,7 +40,7 @@ steps: commands: - > echo "Build completed: $CI_COMMIT_SHA" | - curl -X POST -H "Content-Type: text/plain" $WEBHOOK_URL + curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - name: push-to-github image: alpine/git From 1677742671e9041fb949d17a611c9e1511f772de Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:29:15 +0000 Subject: [PATCH 21/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 3da10ff..2494af5 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -52,4 +52,4 @@ steps: commands: - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - git push --mirror https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main \ No newline at end of file + - git push github HEAD:main \ No newline at end of file From 49ce9b2115cd9c92aa4a5ee697db26965dd1b994 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:31:09 +0000 Subject: [PATCH 22/34] Update .woodpecker.yml --- .woodpecker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2494af5..dbb9a99 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -51,5 +51,4 @@ steps: status: [ success ] commands: - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push --mirror https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - git push github HEAD:main \ No newline at end of file From 01b83dcd57f24af7633f568f40082ac0dc7f1591 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:32:24 +0000 Subject: [PATCH 23/34] Update .woodpecker.yml --- .woodpecker.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index dbb9a99..3b3b7a3 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -43,12 +43,19 @@ steps: curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - name: push-to-github - image: alpine/git - environment: - GITHUB_TOKEN: - from_secret: GITHUB_TOKEN - when: - status: [ success ] - commands: - - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main \ No newline at end of file + image: alpine/git + environment: + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN + when: + status: [ success ] + commands: + # --- ADDED: Verify repository integrity --- + - echo "Verifying local git integrity..." + - git fsck --full + # If the above fails, the pipeline step will stop here. + + # --- Existing Commands --- + - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + - git push github HEAD:main + \ No newline at end of file From 4aa3924c39c0ef35687621b4c164a94df4a89dcd Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:34:07 +0000 Subject: [PATCH 24/34] Update .woodpecker.yml --- .woodpecker.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 3b3b7a3..1146540 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -43,19 +43,19 @@ steps: curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - name: push-to-github - image: alpine/git - environment: - GITHUB_TOKEN: - from_secret: GITHUB_TOKEN - when: - status: [ success ] - commands: - # --- ADDED: Verify repository integrity --- - - echo "Verifying local git integrity..." - - git fsck --full - # If the above fails, the pipeline step will stop here. + # Corrected Indentation applied to all keys below this line: + image: alpine/git + environment: + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN + when: + status: [ success ] + commands: + # --- ADDED: Verify repository integrity --- + - echo "Verifying local git integrity..." + - git fsck --full + # If the above fails, the pipeline step will stop here. - # --- Existing Commands --- - - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main - \ No newline at end of file + # --- Existing Commands --- + - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + - git push github HEAD:main \ No newline at end of file From 1173b639234edec13cefbc287aad4e9b61bfcb9a Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:38:16 +0000 Subject: [PATCH 25/34] Update .woodpecker.yml --- .woodpecker.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 1146540..c7fbc0f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -42,20 +42,22 @@ steps: echo "Build completed: $CI_COMMIT_SHA" | curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - - name: push-to-github - # Corrected Indentation applied to all keys below this line: - image: alpine/git - environment: - GITHUB_TOKEN: - from_secret: GITHUB_TOKEN - when: - status: [ success ] - commands: - # --- ADDED: Verify repository integrity --- - - echo "Verifying local git integrity..." - - git fsck --full - # If the above fails, the pipeline step will stop here. +- name: push-to-github + image: alpine/git + environment: + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN + when: + status: [ success ] + commands: + - rm -rf .git + - git init + - git remote add origin ${CI_REPO_CLONE_URL} + - git fetch origin test + - git checkout -b test origin/test + + - echo "Verifying clean repo..." + - git fsck --full - # --- Existing Commands --- - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main \ No newline at end of file + - git push github test:main From c0ef6a8bcc81a1d785da55cb134849219bcf3698 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:39:07 +0000 Subject: [PATCH 26/34] Update .woodpecker.yml --- .woodpecker.yml | 52 ++++++++++++++----------------------------------- 1 file changed, 15 insertions(+), 37 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index c7fbc0f..9bebdba 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,10 +3,6 @@ when: branch: test steps: - # - name: clone - # image: alpine/git - # commands: - # - git clone ${CI_REPO_CLONE_URL} . - name: run-tests image: python:3.11 @@ -14,50 +10,32 @@ steps: - pip install pytest - pytest -# - name: sonar-scan -# image: sonarsource/sonar-scanner-cli -# environment: -# SONAR_TOKEN: -# from_secret: SONAR_TOKEN -# SONAR_URL: -# from_secret: SONAR_URL -# SONAR_ORGANIZATION: -# from_secret: SONAR_ORGANIZATION -# commands: -# - > -# sonar-scanner -# -Dsonar.login=$SONAR_TOKEN -# -Dsonar.host.url=$SONAR_URL -# -Dsonar.projectKey=Magiciian_dummy-app -# -Dsonar.organization=$SONAR_ORGANIZATION -# -Dsonar.sources=. - - name: notify image: curlimages/curl environment: WEBHOOK_URL: from_secret: WEBHOOK_URL commands: + - echo "Build completed: $CI_COMMIT_SHA" - > - echo "Build completed: $CI_COMMIT_SHA" | - curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL + curl -X POST -H "Content-Type: application/json" + --data "{\"text\": \"Build completed: $CI_COMMIT_SHA\"}" + "$WEBHOOK_URL" -- name: push-to-github - image: alpine/git - environment: - GITHUB_TOKEN: - from_secret: GITHUB_TOKEN - when: - status: [ success ] - commands: + - name: push-to-github + image: alpine/git + environment: + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN + when: + status: + - success + commands: - rm -rf .git - git init - - git remote add origin ${CI_REPO_CLONE_URL} + - git remote add origin "${CI_REPO_CLONE_URL}" - git fetch origin test - git checkout -b test origin/test - - echo "Verifying clean repo..." - - git fsck --full - - - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + - git remote add github "https://${GITHUB_TOKEN}@github.com/Magiciian/dummy-app.git" - git push github test:main From c2c8e60e9be78c826ba7cd7d51c0f266e066a4d3 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:40:25 +0000 Subject: [PATCH 27/34] Update .woodpecker.yml --- .woodpecker.yml | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 9bebdba..8880585 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,23 +4,46 @@ when: steps: + # - name: clone + # image: alpine/git + # commands: + # - git clone ${CI_REPO_CLONE_URL} . + - name: run-tests image: python:3.11 commands: - pip install pytest - pytest + # - name: sonar-scan + # image: sonarsource/sonar-scanner-cli + # environment: + # SONAR_TOKEN: + # from_secret: SONAR_TOKEN + # SONAR_URL: + # from_secret: SONAR_URL + # SONAR_ORGANIZATION: + # from_secret: SONAR_ORGANIZATION + # commands: + # - > + # sonar-scanner + # -Dsonar.login=$SONAR_TOKEN + # -Dsonar.host.url=$SONAR_URL + # -Dsonar.projectKey=Magiciian_dummy-app + # -Dsonar.organization=$SONAR_ORGANIZATION + # -Dsonar.sources=. + - name: notify image: curlimages/curl environment: WEBHOOK_URL: from_secret: WEBHOOK_URL commands: - - echo "Build completed: $CI_COMMIT_SHA" - > - curl -X POST -H "Content-Type: application/json" - --data "{\"text\": \"Build completed: $CI_COMMIT_SHA\"}" - "$WEBHOOK_URL" + echo "Build completed: $CI_COMMIT_SHA" | + curl -X POST -H "Content-Type: application/json" \ + --data "{\"text\": \"Build completed: $CI_COMMIT_SHA\"}" \ + $WEBHOOK_URL - name: push-to-github image: alpine/git @@ -28,14 +51,9 @@ steps: GITHUB_TOKEN: from_secret: GITHUB_TOKEN when: - status: - - success + status: [ success ] commands: - - rm -rf .git - - git init - - git remote add origin "${CI_REPO_CLONE_URL}" - - git fetch origin test - - git checkout -b test origin/test - - - git remote add github "https://${GITHUB_TOKEN}@github.com/Magiciian/dummy-app.git" - - git push github test:main + - echo "Verifying local git integrity..." + - git fsck --full + - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + - git push github HEAD:main From a97f42b1e061ad5a30d0287e8705947f1d32a4bb Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:41:35 +0000 Subject: [PATCH 28/34] Update .woodpecker.yml --- .woodpecker.yml | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 8880585..1146540 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,7 +3,6 @@ when: branch: test steps: - # - name: clone # image: alpine/git # commands: @@ -15,23 +14,23 @@ steps: - pip install pytest - pytest - # - name: sonar-scan - # image: sonarsource/sonar-scanner-cli - # environment: - # SONAR_TOKEN: - # from_secret: SONAR_TOKEN - # SONAR_URL: - # from_secret: SONAR_URL - # SONAR_ORGANIZATION: - # from_secret: SONAR_ORGANIZATION - # commands: - # - > - # sonar-scanner - # -Dsonar.login=$SONAR_TOKEN - # -Dsonar.host.url=$SONAR_URL - # -Dsonar.projectKey=Magiciian_dummy-app - # -Dsonar.organization=$SONAR_ORGANIZATION - # -Dsonar.sources=. +# - name: sonar-scan +# image: sonarsource/sonar-scanner-cli +# environment: +# SONAR_TOKEN: +# from_secret: SONAR_TOKEN +# SONAR_URL: +# from_secret: SONAR_URL +# SONAR_ORGANIZATION: +# from_secret: SONAR_ORGANIZATION +# commands: +# - > +# sonar-scanner +# -Dsonar.login=$SONAR_TOKEN +# -Dsonar.host.url=$SONAR_URL +# -Dsonar.projectKey=Magiciian_dummy-app +# -Dsonar.organization=$SONAR_ORGANIZATION +# -Dsonar.sources=. - name: notify image: curlimages/curl @@ -41,11 +40,10 @@ steps: commands: - > echo "Build completed: $CI_COMMIT_SHA" | - curl -X POST -H "Content-Type: application/json" \ - --data "{\"text\": \"Build completed: $CI_COMMIT_SHA\"}" \ - $WEBHOOK_URL + curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - name: push-to-github + # Corrected Indentation applied to all keys below this line: image: alpine/git environment: GITHUB_TOKEN: @@ -53,7 +51,11 @@ steps: when: status: [ success ] commands: + # --- ADDED: Verify repository integrity --- - echo "Verifying local git integrity..." - git fsck --full + # If the above fails, the pipeline step will stop here. + + # --- Existing Commands --- - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main + - git push github HEAD:main \ No newline at end of file From 13ea59503ea271eea2fca940d13c6388a1b798b5 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:47:03 +0000 Subject: [PATCH 29/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 1146540..35daa79 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -41,7 +41,7 @@ steps: - > echo "Build completed: $CI_COMMIT_SHA" | curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - + - name: push-to-github # Corrected Indentation applied to all keys below this line: image: alpine/git From 54d813ca19da2767b649b91cab1403eda1516887 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 19:48:43 +0000 Subject: [PATCH 30/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 35daa79..4d3d7b6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,7 +7,7 @@ steps: # image: alpine/git # commands: # - git clone ${CI_REPO_CLONE_URL} . - + - name: run-tests image: python:3.11 commands: From ee26d07f7a7015010b19580b8fd8c942d75fd7d6 Mon Sep 17 00:00:00 2001 From: rohit Date: Mon, 1 Dec 2025 20:00:18 +0000 Subject: [PATCH 31/34] Update .woodpecker.yml --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 4d3d7b6..2c7bd0a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -31,7 +31,7 @@ steps: # -Dsonar.projectKey=Magiciian_dummy-app # -Dsonar.organization=$SONAR_ORGANIZATION # -Dsonar.sources=. - + - name: notify image: curlimages/curl environment: From a4503666f08653d99b0a0ec5c452528072231784 Mon Sep 17 00:00:00 2001 From: rohit Date: Tue, 2 Dec 2025 18:11:15 +0000 Subject: [PATCH 32/34] Update .woodpecker.yml --- .woodpecker.yml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2c7bd0a..5459db3 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -42,20 +42,25 @@ steps: echo "Build completed: $CI_COMMIT_SHA" | curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - - name: push-to-github - # Corrected Indentation applied to all keys below this line: - image: alpine/git - environment: - GITHUB_TOKEN: - from_secret: GITHUB_TOKEN - when: - status: [ success ] - commands: - # --- ADDED: Verify repository integrity --- - - echo "Verifying local git integrity..." - - git fsck --full - # If the above fails, the pipeline step will stop here. +- name: push-to-github + image: alpine/git + environment: + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN + when: + status: [ success ] + commands: + - echo "Verifying local git integrity..." + - git fsck --full - # --- Existing Commands --- - - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - git push github HEAD:main \ No newline at end of file + - git config --global user.name "woodpecker" + - git config --global user.email "ci@localhost" + + - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + + # IMPORTANT: Pull latest main before pushing + - git fetch github main + - git rebase github/main + + # Push cleanly after rebase + - git push github HEAD:main From 287f7a1882ee2cac971cc1108838624aaa74761e Mon Sep 17 00:00:00 2001 From: rohit Date: Tue, 2 Dec 2025 18:12:47 +0000 Subject: [PATCH 33/34] Update .woodpecker.yml --- .woodpecker.yml | 75 ++++++++++--------------------------------------- 1 file changed, 15 insertions(+), 60 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 5459db3..d5ec27d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,66 +1,21 @@ -when: - - event: push - branch: test - -steps: - # - name: clone - # image: alpine/git - # commands: - # - git clone ${CI_REPO_CLONE_URL} . - - - name: run-tests - image: python:3.11 - commands: - - pip install pytest - - pytest - -# - name: sonar-scan -# image: sonarsource/sonar-scanner-cli -# environment: -# SONAR_TOKEN: -# from_secret: SONAR_TOKEN -# SONAR_URL: -# from_secret: SONAR_URL -# SONAR_ORGANIZATION: -# from_secret: SONAR_ORGANIZATION -# commands: -# - > -# sonar-scanner -# -Dsonar.login=$SONAR_TOKEN -# -Dsonar.host.url=$SONAR_URL -# -Dsonar.projectKey=Magiciian_dummy-app -# -Dsonar.organization=$SONAR_ORGANIZATION -# -Dsonar.sources=. - - - name: notify - image: curlimages/curl + - name: push-to-github + image: alpine/git environment: - WEBHOOK_URL: - from_secret: WEBHOOK_URL + GITHUB_TOKEN: + from_secret: GITHUB_TOKEN + when: + status: [ success ] commands: - - > - echo "Build completed: $CI_COMMIT_SHA" | - curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL - -- name: push-to-github - image: alpine/git - environment: - GITHUB_TOKEN: - from_secret: GITHUB_TOKEN - when: - status: [ success ] - commands: - - echo "Verifying local git integrity..." - - git fsck --full + - echo "Verifying local git integrity..." + - git fsck --full - - git config --global user.name "woodpecker" - - git config --global user.email "ci@localhost" + - git config --global user.name "woodpecker" + - git config --global user.email "ci@localhost" - - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git + - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - # IMPORTANT: Pull latest main before pushing - - git fetch github main - - git rebase github/main + # Pull latest main before push + - git fetch github main + - git rebase github/main - # Push cleanly after rebase - - git push github HEAD:main + - git push github HEAD:main \ No newline at end of file From 0acdd997ffeee6b7fa434a65b1fb20dc7fd853e0 Mon Sep 17 00:00:00 2001 From: rohit Date: Tue, 2 Dec 2025 18:15:40 +0000 Subject: [PATCH 34/34] Update .woodpecker.yml --- .woodpecker.yml | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index d5ec27d..df2ddb6 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,3 +1,47 @@ +when: + - event: push + branch: test + +steps: + # - name: clone + # image: alpine/git + # commands: + # - git clone ${CI_REPO_CLONE_URL} . + + - name: run-tests + image: python:3.11 + commands: + - pip install pytest + - pytest + + # - name: sonar-scan + # image: sonarsource/sonar-scanner-cli + # environment: + # SONAR_TOKEN: + # from_secret: SONAR_TOKEN + # SONAR_URL: + # from_secret: SONAR_URL + # SONAR_ORGANIZATION: + # from_secret: SONAR_ORGANIZATION + # commands: + # - > + # sonar-scanner + # -Dsonar.login=$SONAR_TOKEN + # -Dsonar.host.url=$SONAR_URL + # -Dsonar.projectKey=Magiciian_dummy-app + # -Dsonar.organization=$SONAR_ORGANIZATION + # -Dsonar.sources=. + + - name: notify + image: curlimages/curl + environment: + WEBHOOK_URL: + from_secret: WEBHOOK_URL + commands: + - > + echo "Build completed: $CI_COMMIT_SHA" | + curl -X POST -H "Content-Type: application/json" --data '{"text": "Build completed: '$CI_COMMIT_SHA'"}' $WEBHOOK_URL + - name: push-to-github image: alpine/git environment: @@ -8,14 +52,9 @@ commands: - echo "Verifying local git integrity..." - git fsck --full - - git config --global user.name "woodpecker" - git config --global user.email "ci@localhost" - - git remote add github https://$GITHUB_TOKEN@github.com/Magiciian/dummy-app.git - - # Pull latest main before push - git fetch github main - git rebase github/main - - git push github HEAD:main \ No newline at end of file