Skip to content
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

Sonar Scanner folder removed and added in dockerfile #4 #16

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ updates:
schedule:
# Check for maven dependency updates every weekday at 08:00 UTC
interval: "daily"
time: "08:00"
time: "08:00"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday at 08:00 UTC
interval: "daily"
time: "08:00"
time: "08:00"
- package-ecosystem: "docker"
directory: "/"
schedule:
# Check for updates to container images every weekday at 08:00 UTC
interval: "daily"
time: "08:00"
time: "08:00"
58 changes: 24 additions & 34 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: CI

on:
push:
branches: [ main ]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish Docker Image
run: |
# login to GitHub Container Registry
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
# build image
docker build . --tag ghcr.io/eclipse-opensmartclide/smartclide/tdprincipal:$(date +'%Y-%m-%d')-1
# push image
docker push ghcr.io/eclipse-opensmartclide/smartclide/tdprincipal:$(date +'%Y-%m-%d')-1

name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: CI

on:
push:
branches: [ main ]

jobs:
publish-image:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Publish Docker Image
run: |
# login to GitHub Container Registry
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
# build image
docker build . --tag ghcr.io/eclipse-opensmartclide/smartclide/tdprincipal:$(date +'%Y-%m-%d')-1
# push image
docker push ghcr.io/eclipse-opensmartclide/smartclide/tdprincipal:$(date +'%Y-%m-%d')-1

6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM adoptopenjdk:16-jre-hotspot
RUN apt-get update && apt-get install -y git
ADD sonar-scanner-4.6.2.2472-linux sonar-scanner-4.6.2.2472-linux
RUN apt-get update && apt-get install -y git && apt-get install -y unzip
RUN curl -L -o /sonar-scanner-cli-4.6.2.2472-linux.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip && \
unzip -o -q /sonar-scanner-cli-4.6.2.2472-linux.zip -d . && \
rm -rf /sonar-scanner-cli-4.6.2.2472-linux.zip
RUN chmod a+x /sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner
RUN chmod 755 /sonar-scanner-4.6.2.2472-linux/jre/bin/java
ADD target/*.jar app.jar
Expand Down
74 changes: 0 additions & 74 deletions sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner

This file was deleted.

16 changes: 0 additions & 16 deletions sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner-debug

This file was deleted.

9 changes: 0 additions & 9 deletions sonar-scanner-4.6.2.2472-linux/conf/sonar-scanner.properties

This file was deleted.

Binary file removed sonar-scanner-4.6.2.2472-linux/jre/bin/java
Binary file not shown.
63 changes: 0 additions & 63 deletions sonar-scanner-4.6.2.2472-linux/jre/conf/logging.properties

This file was deleted.

This file was deleted.

Loading