diff options
author | Dasnavis Sabiya | 2019-10-03 01:11:28 -0500 |
---|---|---|
committer | Mahesh Radhakrishnan | 2019-10-17 13:40:52 -0500 |
commit | bc703f277cc107116568f0385f8bb573c12b9a59 (patch) | |
tree | e0a04146b63dfb768169edebdee516432e6f6b95 | |
parent | bdd3a88f29a12e754a4ee13629029eb3973b4d47 (diff) | |
download | processor-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.bat | 83 |
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 | |||
22 | set validation_err=0 | 22 | set validation_err=0 |
23 | @REM Input paramters that needs to be updated | 23 | @REM Input paramters that needs to be updated |
24 | set JENKINS_DIR=C:\ti\uniflashBuild | 24 | set JENKINS_DIR=C:\ti\uniflashBuild |
25 | set JENKINS_GIT_DIR=%cd% | ||
25 | @REM proxy settings | 26 | @REM proxy settings |
26 | set http_proxy=http://webproxy.ext.ti.com:80/ | 27 | set http_proxy=http://webproxy.ext.ti.com:80/ |
27 | set https_proxy=https://webproxy.ext.ti.com:80/ | 28 | set https_proxy=https://webproxy.ext.ti.com:80/ |
@@ -70,31 +71,44 @@ echo Validating the Inputs... | |||
70 | exit /B 0 | 71 | exit /B 0 |
71 | 72 | ||
72 | :install_prerequisites | 73 | :install_prerequisites |
73 | @REM Installing Cygwin for dependant (wget and tar) utilities | 74 | if not exist "%JENKINS_DIR%\downloads\cygwin" ( |
74 | echo Installing prerequisites... | 75 | @REM Installing Cygwin for dependant (wget and tar) utilities |
75 | rmdir %JENKINS_DIR% 2>nul | 76 | echo Installing prerequisites... |
76 | mkdir %JENKINS_DIR%\downloads 2>nul | 77 | mkdir %JENKINS_DIR%\downloads 2>nul |
77 | pushd %JENKINS_DIR%\downloads 2>nul | 78 | pushd %JENKINS_DIR%\downloads 2>nul |
78 | 79 | echo Installing cygwin... | |
79 | echo Installing cygwin... | 80 | pushd %JENKINS_DIR%\downloads |
80 | pushd %JENKINS_DIR%\downloads | 81 | wget -nc -e http_proxy=http://webproxy.ext.ti.com:80/ http://www.cygwin.com/setup-x86.exe |
81 | wget -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 |
82 | mkdir %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 |
83 | setup-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 | |||
84 | set PATH=%PATH%;%JENKINS_DIR%\downloads\cygwin\bin | 92 | set PATH=%PATH%;%JENKINS_DIR%\downloads\cygwin\bin |
85 | @REM Installing MingW Compiler | ||
86 | pushd %JENKINS_DIR%\downloads | ||
87 | 93 | ||
88 | echo Installing MingW... | 94 | if not exist "%JENKINS_DIR%\downloads\msys64" ( |
89 | pushd %JENKINS_DIR%\downloads | 95 | echo Installing MingW... |
90 | 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 | 96 | pushd %JENKINS_DIR%\downloads |
91 | tar 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 | |||
92 | set PATH=%PATH%;%JENKINS_DIR%\downloads\msys64\usr\bin;%JENKINS_DIR%\downloads\msys64;%JENKINS_DIR%\downloads\msys64\mingw64\bin | 110 | set PATH=%PATH%;%JENKINS_DIR%\downloads\msys64\usr\bin;%JENKINS_DIR%\downloads\msys64;%JENKINS_DIR%\downloads\msys64\mingw64\bin |
93 | mingw64.exe | 111 | |
94 | echo Initialisation in progress... | ||
95 | @REM Wait until the initialization is complete | ||
96 | SLEEP 200 | ||
97 | echo y | pacman -Syy mingw-w64-x86_64-gcc | ||
98 | exit /B 0 | 112 | exit /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% | |||
105 | pushd %PDK_PATH% | 119 | pushd %PDK_PATH% |
106 | @REM Download the PDK package | 120 | @REM Download the PDK package |
107 | echo Downloading PDK package... | 121 | echo Downloading PDK package... |
108 | wget -nc %URL% | 122 | wget --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 |
130 | echo Copying Output file... | 144 | echo Copying Output file... |
131 | mkdir -p %JENKINS_GIT_DIR%\artifacts\output 2>nul | 145 | rmdir /s /q artifacts 2>NUL |
146 | mkdir %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 |
133 | pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin | 148 | pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin |
134 | copy *.exe %JENKINS_GIT_DIR%\artifacts\output | 149 | copy *.exe %JENKINS_GIT_DIR%\artifacts\output |
135 | echo Creating Build Targets file... | 150 | echo Creating Build Targets file... |
136 | pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin | 151 | pushd %PDK_PATH%\pdk*%PLATFORM%*\packages\ti\board\utils\uniflash\host\bin |
137 | if exist *.exe ( | 152 | if 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 |
141 | echo Creating Output tar file... | 157 | echo Creating Output tar file... |
142 | pushd %JENKINS_GIT_DIR% | 158 | pushd %JENKINS_GIT_DIR% |
143 | tar -cvzf artifacts.tgz artifacts | 159 | echo "JENKINS_GIT_DIR: %JENKINS_GIT_DIR%" |
144 | exit /B 0 | 160 | set PATH=C:\Program Files (x86)\Git\bin;%PATH% |
161 | echo|set /p=processor-pdk-packages: > artifacts/repo-revs.txt | ||
162 | git rev-parse HEAD > temp.txt | ||
163 | set /p COMMIT_ID=<temp.txt | ||
164 | del temp.txt | ||
165 | echo|set /p=%COMMIT_ID%: >> artifacts/repo-revs.txt | ||
166 | git log -1 --pretty=%%B|head -1 > temp.txt | ||
167 | set /p COMMIT_COMMENT=<temp.txt | ||
168 | del temp.txt | ||
169 | echo %COMMIT_COMMENT% >> artifacts/repo-revs.txt | ||
170 | del /Q c:%HOMEPATH%\artifacts.tgz c:\artifacts 2>NUL | ||
171 | tar -cvzf artifacts.tgz ./artifacts | ||
172 | cp artifacts.tgz c:%HOMEPATH%\artifacts.tgz | ||
173 | exit /B 0 \ No newline at end of file | ||