diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b8e231d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [ jeevagan ] + pull_request: + branches: [ jeevagan ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + + - name: Grant execute permission for gradlew + run: chmod +x ./gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Test with Gradle + run: ./gradlew test diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..ae93355 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,15 @@ +def gitInfo = {} + +pipeline { + agent any + stages{ + stage("check") { + steps{ + script{ + gitInfo = checkout scm + echo "$gitInfo.GIT_COMMIT" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/java/com/in28minutes/springboot/web/SpringBootFirstWebApplication.java b/src/main/java/com/in28minutes/springboot/web/SpringBootFirstWebApplication.java index 3cbb8c5..214ffaf 100644 --- a/src/main/java/com/in28minutes/springboot/web/SpringBootFirstWebApplication.java +++ b/src/main/java/com/in28minutes/springboot/web/SpringBootFirstWebApplication.java @@ -12,3 +12,4 @@ public static void main(String[] args) { SpringApplication.run(SpringBootFirstWebApplication.class, args); } } +// \ No newline at end of file