-
Notifications
You must be signed in to change notification settings - Fork 0
add MS for review #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| RESOURCE_DB_HOST=resource-db | ||
| RESOURCE_DB_PORT=5432 | ||
| RESOURCE_DB_NAME=resource_db | ||
| RESOURCE_DB_USER=${DB_USERNAME} | ||
| RESOURCE_DB_PASSWORD=${DB_PASSWORD} | ||
|
|
||
| SONG_DB_HOST=song-db | ||
| SONG_DB_PORT=5432 | ||
| SONG_DB_NAME=song_db | ||
| SONG_DB_USER=${DB_USERNAME} | ||
| SONG_DB_PASSWORD=${DB_PASSWORD} | ||
|
|
||
| STORAGE_DB_HOST=storage-db | ||
| STORAGE_DB_PORT=5432 | ||
| STORAGE_DB_NAME=storage_db | ||
| STORAGE_DB_USER=${DB_USERNAME} | ||
| STORAGE_DB_PASSWORD=${DB_PASSWORD} | ||
|
|
||
| AUTH_DB_HOST=auth-db | ||
| AUTH_DB_PORT=5432 | ||
| AUTH_DB_NAME=auth_db | ||
| AUTH_DB_USER=${DB_USERNAME} | ||
| AUTH_DB_PASSWORD=${DB_PASSWORD} | ||
|
|
||
| RABBITMQ_USER=guest | ||
| RABBITMQ_PASSWORD=guest | ||
| RABBITMQ_PORT=5672 | ||
| RABBITMQ_MANAGEMENT_PORT=15672 | ||
|
|
||
| LOCALSTACK_SERVICES=s3 | ||
| LOCALSTACK_DEFAULT_REGION=us-east-1 | ||
| LOCALSTACK_PORT=4566 | ||
| LOCALSTACK_ENDPOINT_URL=http://localstack:4566 | ||
| AWS_S3_BUCKET_NAME=mp3-bucket | ||
| AWS_ACCESS_KEY_ID=test | ||
| AWS_SECRET_ACCESS_KEY=test | ||
|
|
||
| DISCOVERY_PORT=8761 | ||
| CONFIG_PORT=8888 | ||
| GATEWAY_PORT=8080 | ||
| RESOURCE_SERVICE_PORT=8081 | ||
| SONG_SERVICE_PORT=8082 | ||
| RESOURCE_PROCESSOR_PORT=8083 | ||
| STORAGE_SERVICE_PORT=8085 | ||
| QA_SERVICE_PORT=8086 | ||
|
|
||
| ELASTICSEARCH_PORT=9200 | ||
| LOGSTASH_PORT=5000 | ||
| LOGSTASH_HTTP_PORT=9600 | ||
| KIBANA_PORT=5601 | ||
|
|
||
| PROMETHEUS_PORT=9090 | ||
| GRAFANA_PORT=3090 | ||
| GRAFANA_ADMIN_USER=admin | ||
| GRAFANA_ADMIN_PASSWORD=admin | ||
|
|
||
| SPRING_PROFILES_ACTIVE=docker | ||
| CONFIG_SERVER_URL=http://config-service:${CONFIG_PORT} | ||
| EUREKA_URL=http://discovery-service:${DISCOVERY_PORT}/eureka | ||
|
|
||
| AUTH_DB_URL=jdbc:postgresql://${AUTH_DB_HOST}:${AUTH_DB_PORT}/${AUTH_DB_NAME} | ||
| RESOURCE_DB_URL=jdbc:postgresql://${RESOURCE_DB_HOST}:${RESOURCE_DB_PORT}/${RESOURCE_DB_NAME} | ||
| SONG_DB_URL=jdbc:postgresql://${SONG_DB_HOST}:${SONG_DB_PORT}/${SONG_DB_NAME} | ||
| STORAGE_DB_URL=jdbc:postgresql://${STORAGE_DB_HOST}:${STORAGE_DB_PORT}/${STORAGE_DB_NAME} | ||
| CONFIG_REPO_URI=https://github.com/PashaPoliak/config-repo.git |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| /gradlew text eol=lf | ||
| *.bat text eol=crlf | ||
| *.jar binary |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Allure Report | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pages: write | ||
| id-token: write | ||
| actions: read | ||
| checks: write | ||
|
|
||
| jobs: | ||
| allure: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Java 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
| cache: gradle | ||
|
|
||
| - name: Make gradlew executable | ||
| run: chmod +x ./gradlew | ||
|
|
||
| - name: Run qa-service tests | ||
| run: ./gradlew :qa-service:test --no-daemon | ||
|
|
||
| - name: Install Allure | ||
| run: | | ||
| curl -o allure-2.25.0.tgz -Ls https://github.com/allure-framework/allure2/releases/download/2.25.0/allure-2.25.0.tgz | ||
| sudo tar -zxvf allure-2.25.0.tgz -C /opt/ | ||
| sudo ln -s /opt/allure-2.25.0/bin/allure /usr/local/bin/allure | ||
|
|
||
| - name: Generate Allure report | ||
| run: allure generate qa-service/allure-results -o allure-report --clean | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_branch: gh-pages | ||
| publish_dir: allure-report | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,112 @@ | ||||||||||||
| name: CI Tests | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| push: | ||||||||||||
| branches: [master] | ||||||||||||
| pull_request: | ||||||||||||
| branches: [master] | ||||||||||||
|
|
||||||||||||
| permissions: | ||||||||||||
| contents: write | ||||||||||||
| pages: write | ||||||||||||
| id-token: write | ||||||||||||
| actions: read | ||||||||||||
| checks: write | ||||||||||||
|
|
||||||||||||
| jobs: | ||||||||||||
| run-test: | ||||||||||||
| name: 'Run tests' | ||||||||||||
| runs-on: ubuntu-latest | ||||||||||||
|
|
||||||||||||
| services: | ||||||||||||
| postgres: | ||||||||||||
| image: postgres | ||||||||||||
|
|
||||||||||||
| env: | ||||||||||||
| POSTGRES_PASSWORD: root | ||||||||||||
| POSTGRES_USER: admin | ||||||||||||
| POSTGRES_DB: test | ||||||||||||
|
|
||||||||||||
| options: >- | ||||||||||||
| --health-cmd pg_isready | ||||||||||||
| --health-interval 10s | ||||||||||||
| --health-timeout 5s | ||||||||||||
| --health-retries 5 | ||||||||||||
| ports: | ||||||||||||
| - 5432:5432 | ||||||||||||
|
|
||||||||||||
| steps: | ||||||||||||
| - run: | | ||||||||||||
| sudo apt-get update && sudo apt-get install --yes --no-install-recommends postgresql-client | ||||||||||||
| env: | ||||||||||||
| PGPASSWORD: root | ||||||||||||
|
|
||||||||||||
| - name: Git clone | ||||||||||||
| uses: actions/checkout@v4 | ||||||||||||
| with: | ||||||||||||
| fetch-depth: 0 | ||||||||||||
|
|
||||||||||||
| - name: Setup Java 21 | ||||||||||||
| uses: actions/setup-java@v4 | ||||||||||||
| with: | ||||||||||||
| java-version: '21' | ||||||||||||
| distribution: 'temurin' | ||||||||||||
| cache: 'gradle' | ||||||||||||
|
|
||||||||||||
| - name: Cache maven | ||||||||||||
| uses: actions/cache@v4 | ||||||||||||
| with: | ||||||||||||
| path: ~/.m2/repository | ||||||||||||
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||||||||||||
| restore-keys: ${{ runner.os }}-maven- | ||||||||||||
|
|
||||||||||||
| - name: Gradle test | ||||||||||||
| if: matrix.os == 'ubuntu-latest' | ||||||||||||
| run: ./gradlew :qa-service:test --no-daemon | ||||||||||||
|
Comment on lines
+63
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, check the build.yml file around the lines in question
cat -n .github/workflows/build.yml | head -100Repository: Lokankara/Microservices Length of output: 3193 Remove the undefined matrix guard from the test step. Line 64 references Suggested fix - name: Gradle test
- if: matrix.os == 'ubuntu-latest'
run: ./gradlew :qa-service:test --no-daemon📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.12)[error] 64-64: property "os" is not defined in object type {} (expression) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||||||
|
|
||||||||||||
| - name: Attach screenshots and reports | ||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||
| if: failure() | ||||||||||||
| with: | ||||||||||||
| name: screenshots-and-report | ||||||||||||
| path: '**/build/reports/tests/test/' | ||||||||||||
|
|
||||||||||||
| - name: Test Reporter | ||||||||||||
| uses: dorny/test-reporter@v1.9.1 | ||||||||||||
| if: success() || failure() | ||||||||||||
| continue-on-error: true | ||||||||||||
| with: | ||||||||||||
| name: All Tests Report | ||||||||||||
| path: '**/build/test-results/test/*.xml' | ||||||||||||
| reporter: java-junit | ||||||||||||
|
|
||||||||||||
| - name: Make gradlew executable | ||||||||||||
| run: chmod +x ./gradlew | ||||||||||||
|
|
||||||||||||
| - name: Get Allure history | ||||||||||||
| uses: actions/checkout@v4 | ||||||||||||
| if: always() | ||||||||||||
| continue-on-error: true | ||||||||||||
| with: | ||||||||||||
| ref: gh-pages | ||||||||||||
| path: gh-pages | ||||||||||||
|
|
||||||||||||
| - name: Install Allure | ||||||||||||
| if: always() | ||||||||||||
| run: | | ||||||||||||
| curl -o allure-2.25.0.tgz -Ls https://github.com/allure-framework/allure2/releases/download/2.25.0/allure-2.25.0.tgz | ||||||||||||
| sudo tar -zxvf allure-2.25.0.tgz -C /opt/ | ||||||||||||
| sudo ln -s /opt/allure-2.25.0/bin/allure /usr/local/bin/allure | ||||||||||||
|
|
||||||||||||
| - name: Generate Allure report | ||||||||||||
| if: always() | ||||||||||||
| run: allure generate qa-service/allure-results -o allure-report --clean || true | ||||||||||||
|
|
||||||||||||
| - name: Deploy report to Github Pages | ||||||||||||
| if: always() | ||||||||||||
| continue-on-error: true | ||||||||||||
| uses: peaceiris/actions-gh-pages@v3.9.3 | ||||||||||||
| with: | ||||||||||||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||
| publish_branch: gh-pages | ||||||||||||
| publish_dir: allure-report | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Cancel | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| cancel: | ||
| name: 'Cancel previous runs' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 3 | ||
| steps: | ||
| - uses: styfle/cancel-workflow-action@0.9.0 | ||
| with: | ||
| workflow_id: ci.yml | ||
| access_token: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Java CI/CD | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: temurin | ||
| java-version: 21 | ||
|
|
||
| - name: Make gradlew executable | ||
| run: chmod +x ./gradlew | ||
|
|
||
| - name: Cache Gradle | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
| restore-keys: | | ||
| gradle-${{ runner.os }}- | ||
|
|
||
| - name: Build with Gradle | ||
| run: ./gradlew clean build --no-daemon |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| HELP.md | ||
| .gradle | ||
| build/ | ||
| !gradle/wrapper/gradle-wrapper.jar | ||
| !**/src/main/**/build/ | ||
| !**/src/test/**/build/ | ||
| ### STS ### | ||
| .apt_generated | ||
| .classpath | ||
| .factorypath | ||
| .project | ||
| .settings | ||
| .springBeans | ||
| .sts4-cache | ||
| bin/ | ||
| !**/src/main/**/bin/ | ||
| !**/src/test/**/bin/ | ||
|
|
||
| ### IntelliJ IDEA ### | ||
| .idea | ||
| *.iws | ||
| *.iml | ||
| *.ipr | ||
| out/ | ||
| !**/src/main/**/out/ | ||
| !**/src/test/**/out/ | ||
|
|
||
| ### NetBeans ### | ||
| /nbproject/private/ | ||
| /nbbuild/ | ||
| /dist/ | ||
| /nbdist/ | ||
| /.nb-gradle/ | ||
|
|
||
| ### VS Code ### | ||
| .vscode/ | ||
| ./docs/ | ||
|
|
||
| # Standalone config-repo for Spring Cloud Config (not a submodule) | ||
| config-repo/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Pasha Polyak | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| build/ | ||
| .gitignore |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| FROM gradle:8.8-jdk21-alpine AS builder | ||
| WORKDIR /app | ||
|
|
||
| COPY gradlew build.gradle settings.gradle ./ | ||
| COPY gradle/ gradle/ | ||
| COPY auth-service/build.gradle auth-service/ | ||
| RUN ./gradlew :auth-service:dependencies --no-daemon | ||
|
|
||
| COPY auth-service/src auth-service/src | ||
| RUN ./gradlew :auth-service:assemble --no-daemon -x test | ||
|
|
||
| FROM eclipse-temurin:21-jre-alpine | ||
| RUN apk add --no-cache curl \ | ||
| && addgroup -S app && adduser -S app -G app | ||
| WORKDIR /app | ||
| COPY --from=builder /app/auth-service/build/libs/*.jar app.jar | ||
| RUN chown app:app /app/app.jar | ||
| USER app | ||
| EXPOSE 9000 | ||
| CMD ["java", "-jar", "app.jar"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Lokankara/Microservices
Length of output: 1628
🌐 Web query:
peaceiris/actions-gh-pages v3 v4 compatibility runner incompatible💡 Result:
The peaceiris/actions-gh-pages action v3 and v4 releases are distinct major versions with different underlying Node.js runtime requirements [1][2][3]. Key compatibility details: - Version 3: Originally designed for older Node.js runtimes (e.g., Node.js 16) [1][3]. GitHub Actions runners have progressively deprecated older Node versions, leading to warnings or incompatibility errors when using legacy versions of actions [4][5]. - Version 4: Upgraded to use a newer Node.js runtime (initially Node.js 20, and updated to Node.js 24 in recent commits to maintain compatibility with modern GitHub runners) [1][6][5]. If you are encountering warnings or runner compatibility issues, you should migrate to version 4 [7][8]. The v4 release is the current recommended major version for GitHub Actions compatibility [7]. To resolve "incompatible" runner warnings, update your workflow configuration to point to v4: - uses: peaceiris/actions-gh-pages@v4 Note that GitHub Actions runners began defaulting to Node.js 24 in June 2026 [5]. To ensure full compatibility with these environment changes, ensure you are using the latest version of the action [5].
Citations:
🌐 Web query:
GitHub Actions Node.js 12 16 20 runner support peaceiris-gh-pages💡 Result:
As of June 18, 2026, GitHub Actions has officially transitioned to Node.js 24 as the default runtime environment for runners [1][2]. This change took effect on June 16, 2026 [1][2]. Support Summary: Node.js 12 and Node.js 16: These versions are fully deprecated and no longer supported on GitHub Actions runners [3][4]. GitHub migrated actions from Node 12 to 16 in 2023 [3] and subsequently from 16 to 20 [4]. Node.js 20: This version reached its end-of-life in April 2026 [1][5]. While it served as the primary runtime following the Node 16 deprecation, it has now been replaced by Node.js 24 [1][2]. Users who still need to run actions on Node.js 20 temporarily may use the environment variable ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true, though this is a short-term fallback [1][6]. peaceiris/actions-gh-pages: The project has been updated to support Node.js 24 [7]. Users should ensure they are using the latest version of the action to align with the current runner requirements [8][7]. You can verify the latest release and runtime specifications in the official repository [9][7]. General Guidance: For all GitHub Actions, it is strongly recommended to update workflows to use the latest versions of actions that support Node.js 24 [1]. The deprecation of older Node.js runtimes is part of a phased rollout; if your workflows rely on deprecated versions, you may see warning annotations at the end of your jobs [1][5].
Citations:
Upgrade peaceiris/actions-gh-pages to v4; v3 is incompatible with current Node.js 24 runners.
Line 44 uses
peaceiris/actions-gh-pages@v3, which relies on Node.js 16 and is incompatible with GitHub Actions runners now defaulting to Node.js 24 (as of June 2026). This will cause deployment failures. Upgrade to v4, which supports Node.js 24.Suggested change
📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.12)
[error] 44-44: the runner of "peaceiris/actions-gh-pages@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 zizmor (1.25.2)
[warning] 18-19: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 19-19: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 22-22: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 44-44: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools