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

Fix docker gradle tasks after merge #12

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ docker/reports/
build/
tmp/
target/
tools/dbfork/logs/
12 changes: 6 additions & 6 deletions docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ apply plugin: "java-library"

def getGitCommitDetails(length = 8) {
try {
def gitFolder = "$projectDir/.git/"
def gitFolder = "$rootDir/.git/"
if (!file(gitFolder).isDirectory()) {
gitFolder = file(gitFolder).text.substring(length).trim() + "/"
}
Expand Down Expand Up @@ -63,15 +63,15 @@ def dockerArtifactName = project.hasProperty("dockerArtifactName") ? project.get
def dockerImageName = "${dockerOrgName}/${dockerArtifactName}"

task sourceDocker {
def dockerBuildDir = "build/docker-tron/"
def dockerBuildDir = "${rootDir}/build/docker-tron/"

doLast {
copy {
from file("${projectDir}/docker/Dockerfile")
from file("${rootDir}/docker/Dockerfile")
into(dockerBuildDir)
}
copy {
from file("${projectDir}/docker/docker-entrypoint.sh")
from file("${rootDir}/docker/docker-entrypoint.sh")
into "${dockerBuildDir}"
}
exec {
Expand Down Expand Up @@ -111,7 +111,7 @@ task testDocker {
doLast {
exec {
def image = project.hasProperty('release.releaseVersion') ? "${dockerImageName}:" + project.property('release.releaseVersion') : "${dockerImageName}:${project.version}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about use def image = "${dockerImageName}:${dockerBuildVersion}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it will be consistent with the line 78

workingDir "${projectDir}/docker"
workingDir "${rootDir}/docker"
executable shell
args "-c", "./test.sh ${image}"
}
Expand Down Expand Up @@ -149,4 +149,4 @@ task dockerUpload {

tasks.named('jar') {
enabled = false
}
}
4 changes: 2 additions & 2 deletions tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ Execute database fork command:
# clone the tron-docker
git clone https://github.com/tronprotocol/tron-docker.git
# enter the directory
cd tron-docker/tools
cd tron-docker
# compile the database fork tool
./gradlew build
# execute full command
java -jar dbfork/build/libs/dbfork.jar -c fork.conf -d output-directory
java -jar build/libs/dbfork.jar -c fork.conf -d output-directory
```

### Launch the FullNode
Expand Down