Browse Source

指定 jenkinsfile --context=${BUILD_WORKSPACE/code/pep-stats-report}

main
Julin 11 months ago
parent
commit
fc628df3d2
  1. 2
      code/pep-stats-report/Dockerfile
  2. 2
      code/pep-stats-report/jenkinsfile

2
code/pep-stats-report/Dockerfile

@ -5,7 +5,7 @@ WORKDIR /app
COPY . .
RUN pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com && \
pip install -r ./code/pep-stats-report/requirements_linux.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com && \
pip install -r requirements_linux.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com && \
cp SimHei.ttf /usr/local/lib/python3.8/site-packages/matplotlib/mpl-data/fonts/ttf && \
pyinstaller -F main.py --distpath=.

2
code/pep-stats-report/jenkinsfile

@ -9,7 +9,7 @@ podTemplate {
container('image-builder') {
sh'''
/kaniko/executor --context=${BUILD_WORKSPACE} --dockerfile=./code/pep-stats-report/Dockerfile --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup
/kaniko/executor --context=${BUILD_WORKSPACE/code/pep-stats-report} --dockerfile=./Dockerfile --destination=${IMAGE_NAME}:${IMAGE_VERSION} --cache=false --cleanup
'''
}

Loading…
Cancel
Save