Jenkins: Build image inside empty directoy
This commit is contained in:
parent
ceb2641231
commit
d0cc889a44
1 changed files with 9 additions and 7 deletions
16
tests/modules/Jenkinsfile
vendored
16
tests/modules/Jenkinsfile
vendored
|
@ -3,13 +3,15 @@
|
||||||
def prepareDocker () {
|
def prepareDocker () {
|
||||||
def img
|
def img
|
||||||
stage('Prepare environment') {
|
stage('Prepare environment') {
|
||||||
def uid = sh returnStdout: true, script: 'id -u'
|
dir('.imagebuild') {
|
||||||
writeFile file: 'Dockerfile', text: """
|
def uid = sh returnStdout: true, script: 'id -u'
|
||||||
FROM python:3.8-buster
|
writeFile file: 'Dockerfile', text: """
|
||||||
RUN pip install pytest-cov PySocks && \\
|
FROM python:3.8-buster
|
||||||
useradd -m -u ${uid.trim()} jenkins
|
RUN pip install pytest-cov PySocks && \\
|
||||||
"""
|
useradd -m -u ${uid.trim()} jenkins
|
||||||
img = docker.build('local:test-all-comics')
|
"""
|
||||||
|
img = docker.build('local:test-all-comics')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return img
|
return img
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue