Skip to content

Commit

Permalink
Merge branch 'tms-pipeline' of https://github.com/jenkinsci/vectorcas…
Browse files Browse the repository at this point in the history
…t-execution-plugin into tms-pipeline
  • Loading branch information
nbelliot committed Feb 20, 2020
2 parents 5c78415 + 74efa23 commit 58bdc75
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ hs_err_pid*
# maven build/work directories
target/**
work/**
/src/main/resources/scripts/*.pyc
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ There are 2 options for running tests
results from all these individual machines/nodes
- In this case, the VectorCAST/Manage project should be specified
as relative to the root of the checkout
- There is now an option for the user can choose to use the main Pipeline Job's Workspace as
a dedicated single checkout directory. This checkout directory must be available
to all executors across all nodes either by having all executors running on the same
computer or have the main Pipeline Job's Workspace on a shared network drive.
- Use an existing drive/directory for VectorCAST/Manage project
- In this case, the VectorCAST/Manage project should be specified
as an absolute path that is available on all machines/nodes
Expand Down
Binary file modified docs/images/pipeline_create.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ VCJob.Scripts.environment_teardown.title = Environment teardown
VCJob.Scripts.environment_teardown.description = Command(s) to execute after the job runs to shutdown the hardware

VCJob.Options.singleCheckout.title = Single Checkout Directory
VCJob.Options.singleCheckout.description = Use single directory for SCM checkout. All executors all executors across all nodes must have access to this directory
VCJob.Options.singleCheckout.description = Use main Pipeline Job's Workspace as SCM checkout directory. All executors all executors across all nodes must have access to this directory. <br> This option is only recommended for VectorCAST version 2019 SP3 and above
27 changes: 22 additions & 5 deletions src/main/resources/scripts/getjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
import re
import sys

try:
from vector.apps.DataApi.vcproject_api import VCProjectApi
useManageApi = True
except:
useManageApi = False

manageCMD=os.environ['VECTORCAST_DIR'] + "/manage"


def printEnvironmentInfo(ManageProjectName):
def parseFullStatusReport(ManageProjectName):
p = subprocess.Popen(manageCMD + " --project " + ManageProjectName + " --full-status",shell=True,stdout=subprocess.PIPE)
out, err = p.communicate()

job_list = []
level_list = []

info = ""
list = out.split(os.linesep)

for str in list:
Expand All @@ -21,10 +27,21 @@ def printEnvironmentInfo(ManageProjectName):
elif re.match("^ [^\s]",str) is not None:
testsuite = str.split()[0]
elif re.match("^ [^\s]",str) is not None and not str.startswith(" Disabled Environment"):

env_name = str.split()[0]
print ("%s %s %s" % (compiler , testsuite , env_name))
info += ("%s %s %s\n" % (compiler , testsuite , env_name))
return info

def printEnvironmentInfo(ManageProjectName):
if useManageApi:
info = ""
m_api = VCProjectApi(ManageProjectName)
for env in m_api.Environment.all():
if env.is_enabled:
info += ("%s %s %s\n" % (env.compiler.name, env.testsuite.name, env.name))
else:
info = parseFullStatusReport(ManageProjectName)

print info

if __name__ == "__main__":
printEnvironmentInfo(sys.argv[1])
32 changes: 32 additions & 0 deletions src/main/webapp/help-optsingleCheckout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<!--
The MIT License
Copyright 2016 Vector Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<div>
For Pipeline Jobs, the user can choose to use the main Pipeline Job's Workspace as
a dedicated single checkout directory. This checkout directory must be available
to all executors across all nodes either by having all executors running on the same
computer or have the main Pipeline Job's Workspace on a shared network drive.
<br/><br/>
This option is only recommended for use with VectorCAST version 2019 SP3 and above
</div>

0 comments on commit 58bdc75

Please sign in to comment.