summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDasnavis Sabiya2019-10-03 01:11:28 -0500
committerMahesh Radhakrishnan2019-10-17 13:40:52 -0500
commitbc703f277cc107116568f0385f8bb573c12b9a59 (patch)
treee0a04146b63dfb768169edebdee516432e6f6b95
parentbdd3a88f29a12e754a4ee13629029eb3973b4d47 (diff)
downloadprocessor-pdk-packages-bc703f277cc107116568f0385f8bb573c12b9a59.tar.gz
processor-pdk-packages-bc703f277cc107116568f0385f8bb573c12b9a59.tar.xz
processor-pdk-packages-bc703f277cc107116568f0385f8bb573c12b9a59.zip
PRSDK-3958: Updated JENKINS_GIT_DIR and add repo-revs generation in pdkUniflashBuildscript.batREL.PDK.J7.01.00.00.14REL.PDK.J7.01.00.00.13PSDKQA_7Q70_01_03
-rw-r--r--scripts/jenkin/pdkUniflashBuildscript.bat83
1 files changed, 56 insertions, 27 deletions
diff --git a/scripts/jenkin/pdkUniflashBuildscript.bat b/scripts/jenkin/pdkUniflashBuildscript.bat
index 964b9b9..868fc41 100644
--- a/scripts/jenkin/pdkUniflashBuildscript.bat
+++ b/scripts/jenkin/pdkUniflashBuildscript.bat
@@ -22,6 +22,7 @@ set platform_list=am335x am437x am57xx k2g am65xx
22set validation_err=0 22set validation_err=0
23@REM Input paramters that needs to be updated 23@REM Input paramters that needs to be updated
24set JENKINS_DIR=C:\ti\uniflashBuild 24set JENKINS_DIR=C:\ti\uniflashBuild
25set JENKINS_GIT_DIR=%cd%
25@REM proxy settings 26@REM proxy settings
26set http_proxy=http://webproxy.ext.ti.com:80/ 27set http_proxy=http://webproxy.ext.ti.com:80/
27set https_proxy=https://webproxy.ext.ti.com:80/ 28set https_proxy=https://webproxy.ext.ti.com:80/
@@ -70,31 +71,44 @@ echo Validating the Inputs...
70exit /B 0 71exit /B 0
71 72
72:install_prerequisites 73:install_prerequisites
73@REM Installing Cygwin for dependant (wget and tar) utilities 74if not exist "%JENKINS_DIR%\downloads\cygwin" (
74echo Installing prerequisites... 75 @REM Installing Cygwin for dependant (wget and tar) utilities
75rmdir %JENKINS_DIR% 2>nul 76 echo Installing prerequisites...
76mkdir %JENKINS_DIR%\downloads 2>nul 77 mkdir %JENKINS_DIR%\downloads 2>nul
77pushd %JENKINS_DIR%\downloads 2>nul 78 pushd %JENKINS_DIR%\downloads 2>nul
78 79 echo Installing cygwin...
79echo Installing cygwin... 80 pushd %JENKINS_DIR%\downloads
80pushd %JENKINS_DIR%\downloads 81 wget -nc -e http_proxy=http://webproxy.ext.ti.com:80/ http://www.cygwin.com/setup-x86.exe
81wget -nc -e http_proxy=http://webproxy.ext.ti.com:80/ http://www.cygwin.com/setup-x86.exe 82 mkdir %JENKINS_DIR%\downloads\cygwin 2>nul
82mkdir %JENKINS_DIR%\downloads\cygwin 2>nul 83 setup-x86.exe --quiet-mode --root %JENKINS_DIR%\downloads\cygwin --site http://cygwin.mirror.constant.com --wait --packages tar
83setup-x86.exe --quiet-mode --root %JENKINS_DIR%\downloads\cygwin --site http://cygwin.mirror.constant.com --wait --packages tar 84 @REM Installing MingW Compiler
85 pushd %JENKINS_DIR%\downloads
86) else (
87 echo "--------------------"
88 echo "Cygwin already exist"
89 echo "--------------------"
90)
91
84set PATH=%PATH%;%JENKINS_DIR%\downloads\cygwin\bin 92set PATH=%PATH%;%JENKINS_DIR%\downloads\cygwin\bin
85@REM Installing MingW Compiler
86pushd %JENKINS_DIR%\downloads
87 93
88echo Installing MingW... 94if not exist "%JENKINS_DIR%\downloads\msys64" (
89pushd %JENKINS_DIR%\downloads 95 echo Installing MingW...
90wget -nc -e http_proxy=http://webproxy.ext.ti.com:80/ http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz 96 pushd %JENKINS_DIR%\downloads
91tar xvf msys2-base-x86_64-20180531.tar.xz 97 wget -nc -e http_proxy=http://webproxy.ext.ti.com:80/ http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20180531.tar.xz
98 tar xvf msys2-base-x86_64-20180531.tar.xz
99 mingw64.exe
100 echo Initialisation in progress...
101 @REM Wait until the initialization is complete
102 SLEEP 200
103 echo y | pacman -Syy mingw-w64-x86_64-gcc
104) else (
105 echo "-------------------"
106 echo "MingW already exist"
107 echo "-------------------"
108)
109
92set PATH=%PATH%;%JENKINS_DIR%\downloads\msys64\usr\bin;%JENKINS_DIR%\downloads\msys64;%JENKINS_DIR%\downloads\msys64\mingw64\bin 110set PATH=%PATH%;%JENKINS_DIR%\downloads\msys64\usr\bin;%JENKINS_DIR%\downloads\msys64;%JENKINS_DIR%\downloads\msys64\mingw64\bin
93mingw64.exe 111
94echo Initialisation in progress...
95@REM Wait until the initialization is complete
96SLEEP 200
97echo y | pacman -Syy mingw-w64-x86_64-gcc
98exit /B 0 112exit /B 0
99 113
100:install_processor_sdk 114:install_processor_sdk
@@ -105,7 +119,7 @@ set PDK_PATH=C:\ti\processor-sdk-rtos-%PLATFORM%
105pushd %PDK_PATH% 119pushd %PDK_PATH%
106@REM Download the PDK package 120@REM Download the PDK package
107echo Downloading PDK package... 121echo Downloading PDK package...
108wget -nc %URL% 122wget --no-proxy -nc %URL%
109@set downloadPath=%URL% 123@set downloadPath=%URL%
110@for %%a in ("%downloadPath%\.") do set "fileName=%%~nxa" 124@for %%a in ("%downloadPath%\.") do set "fileName=%%~nxa"
111@REM Install the package 125@REM Install the package
@@ -128,17 +142,32 @@ exit /B 0
128:copy_host_binary 142:copy_host_binary
129@REM Create Jenkins directories 143@REM Create Jenkins directories
130echo Copying Output file... 144echo Copying Output file...
131mkdir -p %JENKINS_GIT_DIR%\artifacts\output 2>nul 145rmdir /s /q artifacts 2>NUL
146mkdir %JENKINS_GIT_DIR%\artifacts\output 2>nul
132@REM Copy the binaries to the artifacts\output 147@REM Copy the binaries to the artifacts\output
133pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin 148pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin
134copy *.exe %JENKINS_GIT_DIR%\artifacts\output 149copy *.exe %JENKINS_GIT_DIR%\artifacts\output
135echo Creating Build Targets file... 150echo Creating Build Targets file...
136pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin 151pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin
137if exist *.exe ( 152if exist *.exe (
138 echo "ProcessorSDKSerialFlash.exe:PASSED" >> %JENKINS_GIT_DIR%\artifacts\output\build_targets 153 echo ProcessorSDKSerialFlash.exe:PASSED >> %JENKINS_GIT_DIR%\artifacts\output\build_targets
139 ) 154 )
155
140@REM Create output tarball 156@REM Create output tarball
141echo Creating Output tar file... 157echo Creating Output tar file...
142pushd %JENKINS_GIT_DIR% 158pushd %JENKINS_GIT_DIR%
143tar -cvzf artifacts.tgz artifacts 159echo "JENKINS_GIT_DIR: %JENKINS_GIT_DIR%"
144exit /B 0 160set PATH=C:\Program Files (x86)\Git\bin;%PATH%
161echo|set /p=processor-pdk-packages: > artifacts/repo-revs.txt
162git rev-parse HEAD > temp.txt
163set /p COMMIT_ID=<temp.txt
164del temp.txt
165echo|set /p=%COMMIT_ID%: >> artifacts/repo-revs.txt
166git log -1 --pretty=%%B|head -1 > temp.txt
167set /p COMMIT_COMMENT=<temp.txt
168del temp.txt
169echo %COMMIT_COMMENT% >> artifacts/repo-revs.txt
170del /Q c:%HOMEPATH%\artifacts.tgz c:\artifacts 2>NUL
171tar -cvzf artifacts.tgz ./artifacts
172cp artifacts.tgz c:%HOMEPATH%\artifacts.tgz
173exit /B 0 \ No newline at end of file