From 5cde03a40ec6668d138f6e45601d8df0d18e9e39 Mon Sep 17 00:00:00 2001 From: rohit Date: Wed, 26 Nov 2025 20:40:45 +0000 Subject: [PATCH] Update .woodpecker.yml --- .woodpecker.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index f11371d..329fe18 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,31 +1,35 @@ -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 - 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 push github HEAD:main