Docker (and CI in general) build currently isn't generating protobuf files. Docker image also needs to check that pigpio works.
34 lines
848 B
Groovy
34 lines
848 B
Groovy
configurations {
|
|
python {
|
|
canBeResolved = true
|
|
canBeConsumed = false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
python project(path: ':protobuf', configuration: 'python')
|
|
}
|
|
|
|
task copyPythonCode(type: Copy, dependsOn: configurations.python){
|
|
// Copy python protobuf code from proto project.
|
|
from zipTree(configurations.python.asPath)
|
|
into 'src'
|
|
}
|
|
|
|
task build(type: Exec, dependsOn: copyPythonCode) {
|
|
executable 'python3'
|
|
args 'setup.py', 'bdist_wheel'
|
|
}
|
|
|
|
task buildDocker(type: Exec, dependsOn: copyPythonCode) {
|
|
executable 'docker'
|
|
workingDir projectDir
|
|
args 'build', '--build-arg', "PYPI_USERNAME=$System.env.PYPI_USERNAME", '--build-arg', "PYPI_PASSWORD=$System.env.PYPI_PASSWORD", '-t', 'vato.ddns.net:8082/pycar:latest', '.'
|
|
}
|
|
|
|
task clean {
|
|
doLast {
|
|
delete 'dist'
|
|
delete 'build'
|
|
}
|
|
} |