diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4625a01 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: + - main + + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + # - uses: sonarsource/sonarqube-quality-gate-action@master + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index bfea3be..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: CI -on: - push: - branches: [ main ] - pull_request: - types: [opened, synchronize, reopened] - paths-ignore: - - 'README.md' - - 'LICENSE.md' - - '.gitignore' - - 'CODEOWNERS' - - 'renovate.json' - -jobs: - ci: - uses: luketainton/gha-workflows/.github/workflows/ci-python.yml@main - secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index abe877b..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build -on: - push: - branches: [ main ] - -jobs: - build: - name: GitHub Container Registry - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Login to GitHub Container Registry - run: echo ${{ secrets.PAT }} | docker login ghcr.io -u luketainton --password-stdin - - name: Build image for GitHub Package Registry - run: docker build . --file Dockerfile --tag ghcr.io/luketainton/roboluke-tasks:${{ github.sha }} --tag ghcr.io/luketainton/roboluke-tasks:latest - - name: Push image to GitHub Package Registry - run: | - docker push ghcr.io/luketainton/roboluke-tasks:latest - docker push ghcr.io/luketainton/roboluke-tasks:${{ github.sha }} diff --git a/README.md b/README.md index 52be22e..79a3e46 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # RoboLuke - Tasks ## Description -Add tasks to a Wekan to do list via Webex and n8n. +Add tasks to a Wekan to do list via Webex and n8n. This fork is adpated for portainer too use the stack.env file generated by portainer when deploying a stack. ## How to install 1. Clone the repository diff --git a/app/commands/submit_task.py b/app/commands/submit_task.py index ea35204..055abab 100644 --- a/app/commands/submit_task.py +++ b/app/commands/submit_task.py @@ -103,13 +103,13 @@ class SubmitTaskCommand(Command): "sender": self.sender, }, ), - Submit( - title="My Tasks", - data={ - "callback_keyword": "my_tasks_callback_rbamzfyx", - "sender": self.sender, - }, - ), +# Submit( +# title="My Tasks", + # data={ + # "callback_keyword": "my_tasks_callback_rbamzfyx", + # "sender": self.sender, + # }, + # ), Submit(title="Cancel", data={"command_keyword": "exit"}), ], ) diff --git a/docker-compose.yml b/docker-compose.yml index ee034ed..b63953e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,9 +2,17 @@ version: "3" services: app: + container_name: robodean_task build: context: . dockerfile: Dockerfile restart: unless-stopped - env_file: .env -... \ No newline at end of file + logging: + driver: splunk + options: + splunk-url: https://192.168.10.20:8088 + splunk-token: aa6c1c61-d015-403a-b200-dd991275790d + splunk-insecureskipverify: 'true' + tag: "docker/{{.Name}}/{{.ID}}/{{.ImageName}}" + env_file: stack.env +... diff --git a/sonar-project.properties b/sonar-project.properties index 0c41f9c..c93d554 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,3 @@ -sonar.organization=luketainton -sonar.projectKey=luketainton_roboluke-tasks -sonar.projectName=roboluke-tasks sonar.projectVersion=1.0 sonar.python.version=3.11 sonar.python.coverage.reportPaths=coverage.xml @@ -8,4 +5,5 @@ sonar.python.pylint.reportPaths=lintreport.txt sonar.python.xunit.reportPath=testresults.xml sonar.sources=app sonar.tests=tests -sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt \ No newline at end of file +sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt +sonar.projectKey=ds0407_roboluke-tasks-no-env_AYfEqCrD3VurC3K-uCVx