Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added agent/agent_installer/Windows/AgentService.exe
Binary file not shown.
13 changes: 13 additions & 0 deletions agent/agent_installer/Windows/AgentService.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<configuration>
<id>Hydra Lab Agent Service</id>
<name>Hydra Lab Agent Service</name>
<description>Hydra Lab Test Agent Service serves as the test runner and test device manager of the connected Hydra Lab center.</description>

<executable>java</executable>
<arguments>-Xms1024m -Xmx2048m -jar agent.jar</arguments>
<startmode>Automatic</startmode>
<logpath> {LOG_FILE_LOCATION} </logpath>
<log mode="roll-by-time">
<pattern>yyyyMMdd</pattern>
</log>
</configuration>
8 changes: 7 additions & 1 deletion agent/agent_installer/Windows/restartAgent.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ exit /B
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )

echo newfile = %1
set newfile=%1
set newfile = %1
::stop hydra lab agent service
net stop "Hydra Lab Agent Service"
::kill hydra lab agent java process
::Powershell -Command "& {Get-WmiObject Win32_Process -Filter \"name like '%%java%%' and CommandLine like '%%agent%%'\" | Select-Object ProcessId -OutVariable pids;if(-not $pids -eq '' ) {stop-process -id $pids.ProcessId}}"
if "%newfile%"=="" ( echo "No need to update" ) else (
if not exist "%newfile%" ( echo "%newfile% not exist" ) else (
echo "Updating"
del agent.jar
ren "%newfile%" agent.jar
)
)
::start hydra lab agent in command mode
::java -Xms1024m -Xmx4096m -jar .\agent.jar
::start hydra lab agent in windows service mode
net start "Hydra Lab Agent Service"
29 changes: 29 additions & 0 deletions azure-pipelines-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,42 @@ stages:
Contents: '*.jar'
TargetFolder: '$(Build.ArtifactStagingDirectory)/center_deploy'
condition: and(succeeded(), eq(variables.fullBuild, 'true'))
- task: Gradle@2
displayName: Package Mac installer
inputs:
gradleWrapperFile: 'gradlew'
tasks: 'packageMacInstaller'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
condition: and(succeeded(), eq(variables.fullBuild, 'true'))
- task: Gradle@2
displayName: Package Windows installer
inputs:
gradleWrapperFile: 'gradlew'
tasks: 'packageWindowsInstaller'
publishJUnitResults: false
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.11'
sonarQubeRunAnalysis: false
spotBugsAnalysis: false
condition: and(succeeded(), eq(variables.fullBuild, 'true'))
- task: CopyFiles@2
displayName: Copy agent jar
inputs:
SourceFolder: 'agent/build/libs/'
Contents: '*.jar'
TargetFolder: '$(Build.ArtifactStagingDirectory)/agent_deploy'
condition: and(succeeded(), eq(variables.fullBuild, 'true'))
- task: CopyFiles@2
displayName: Copy agent installer
inputs:
SourceFolder: 'build/installer/'
Contents: '*.zip'
TargetFolder: '$(Build.ArtifactStagingDirectory)/agent_deploy'
condition: and(succeeded(), eq(variables.fullBuild, 'true'))
- task: CopyFiles@2
displayName: Copy deploy uber files
inputs:
Expand Down
12 changes: 12 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,15 @@ task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
xml.enabled true
}
}

task packageMacInstaller(type: Zip) {
from 'agent/agent_installer/MacOS/iOS'
archiveName 'Hydra_Agent_Installer_Mac.zip'
destinationDir file('build/installer')
}

task packageWindowsInstaller(type: Zip) {
from 'agent/agent_installer/Windows'
archiveName 'Hydra_Agent_Installer_Windows.zip'
destinationDir file('build/installer')
}