Compare commits

...

2 Commits

Author SHA1 Message Date
1bc3057819 Updated github workflow
Some checks failed
continuous-integration/drone/push Build was killed
2023-03-09 19:07:28 +07:00
5efe14c78a Fixed and remove git source from build
Some checks failed
continuous-integration/drone/push Build was killed
2023-03-09 18:55:00 +07:00
5 changed files with 25 additions and 50 deletions

View File

@@ -41,7 +41,7 @@ jobs:
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: 'ssh://dokku@heroku.ctdn.net:2222/spring-web-modules'
git_remote_url: 'ssh://dokku@heroku.ctdn.net:2222/spring-web-api-demo'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
branch: main
git_push_flags: --force

View File

@@ -4,8 +4,6 @@ LABEL maintainer="sombochea@cubetiqs.com"
WORKDIR /app
RUN apk update && apk add git
COPY gradlew ./
COPY gradle ./gradle
RUN ./gradlew
@@ -15,7 +13,6 @@ COPY settings.gradle.kts ./
COPY build.gradle.kts ./
COPY api/build.gradle.kts ./api/build.gradle.kts
COPY api/src ./api/src
COPY .git ./.git
RUN ./gradlew api:bootJar

View File

@@ -8,28 +8,8 @@ plugins {
kotlin("plugin.jpa")
}
val kotlinVersion = "1.8.10"
val springBootVersion = "3.0.4"
// find the last commit
fun getGitHashLastCommit(): String {
val stdout = ByteArrayOutputStream()
exec {
commandLine("git", "rev-parse", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim()
}
springBoot {
buildInfo {
properties {
this.additional.put("commitId", getGitHashLastCommit())
this.additional.put("springBootVersion", springBootVersion)
this.additional.put("kotlinVersion", kotlinVersion)
}
}
buildInfo { }
}
dependencies {

View File

@@ -33,7 +33,6 @@ class IndexController @Autowired constructor(
service = buildProperties.artifact,
version = buildProperties.version,
date = buildProperties.time.toString(),
commit = buildProperties["commitId"],
authors = authors,
)
return response(response)

View File

@@ -9,7 +9,6 @@ data class ApiInfoResponse(
val service: String,
val version: String,
val date: String,
val commit: String,
val authors: Collection<ApiInfoAuthorResponse> = listOf(),
) : BaseRequestModel