forked from firstBitMarksistskaya/onec-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-oscript-agent.bat
More file actions
39 lines (27 loc) · 975 Bytes
/
build-oscript-agent.bat
File metadata and controls
39 lines (27 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off
docker login -u %DOCKER_LOGIN% -p %DOCKER_PASSWORD% %DOCKER_USERNAME%
if %ERRORLEVEL% neq 0 goto end
if %DOCKER_SYSTEM_PRUNE%=="true" docker system prune -af
if %ERRORLEVEL% neq 0 goto end
if %NO_CACHE%=="true" (SET last_arg="--no-cache .") else (SET last_arg=".")
docker build ^
--pull ^
--build-arg DOCKER_USERNAME=%DOCKER_USERNAME% ^
--build-arg BASE_IMAGE=onec-client-vnc ^
--build-arg BASE_TAG=%ONEC_VERSION% ^
-t %DOCKER_USERNAME%/onec-client-vnc-oscript:%ONEC_VERSION% ^
-f oscript/Dockerfile ^
%last_arg%
if %ERRORLEVEL% neq 0 goto end
docker build ^
--build-arg DOCKER_USERNAME=%DOCKER_USERNAME% ^
--build-arg BASE_IMAGE=oscript-jdk ^
--build-arg BASE_TAG=latest ^
-t %DOCKER_USERNAME%/base-jenkins-agent:latest ^
-f jenkins-agent/Dockerfile ^
%last_arg%
if %ERRORLEVEL% neq 0 goto end
docker push %DOCKER_USERNAME%/base-jenkins-agent:latest
if %ERRORLEVEL% neq 0 goto end
:end
echo End of program.