Skip to content

Commit

Permalink
update scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Aug 9, 2021
1 parent 3fae306 commit f26b074
Show file tree
Hide file tree
Showing 48 changed files with 929 additions and 281 deletions.
6 changes: 0 additions & 6 deletions aemdesign-testing/asciidoctor-convert-reports
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@

#TESTING
#./asciidoctor-convert-reports -images ./images -root ./root -source source1 -base base1 -input ./input -output ./output -filter *.files -pdf -html
## Generate HTML
#./asciidoctor-convert-reports -images remote-seleniumhub-chrome/generated-docs/html -root ./remote-seleniumhub-chrome -source coderay -base ./ -input remote-seleniumhub-chrome/spock-reports -output remote-seleniumhub-chrome/generated-docs -filter *.ad -html
## Generate PDF
#./asciidoctor-convert-reports -images remote-seleniumhub-chrome/generated-docs/pdf -root remote-seleniumhub-chrome -source coderay -base ./ -input remote-seleniumhub-chrome/spock-reports -output remote-seleniumhub-chrome/generated-docs -filter *.ad -pdf
## Generate HTML and PDF
#./asciidoctor-convert-reports -images remote-seleniumhub-chrome/generated-docs/pdf -root remote-seleniumhub-chrome -source coderay -base ./ -input remote-seleniumhub-chrome/spock-reports -output remote-seleniumhub-chrome/generated-docs -filter *.ad -html -pdf

PATH_PDF="pdf"
PATH_HTML="html"
Expand Down
22 changes: 13 additions & 9 deletions aemdesign-testing/asciidoctor-convert-reports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Param(
[string]$TEST_REPORT_PATH = "generated-docs/summary.html",
[string]$TEST_DRIVER_NAME = "remote-seleniumhub-chrome",
[string]$DOCKER_SCRIPT = "./asciidoctor-convert-reports -images ${TEST_DRIVER_NAME}/generated-docs/pdf -root . -source coderay -base ./ -input ${TEST_DRIVER_NAME}/spock-reports -output ${TEST_DRIVER_NAME}/generated-docs -filter *.ad -html",
[string]$DOCKER_COMPOSE_COMMAND = "docker-compose --profile=dotest up testing",
[string]$FUNCTIONS_URI = "https://github.com/aem-design/aemdesign-docker/releases/latest/download/functions.ps1"
)

Expand All @@ -33,25 +34,23 @@ $PARENT_PROJECT_WITH_GIT_NAME = $( Resolve-Path "${PARENT_PROJECT_WITH_GIT}" | S
$PARENT_PROJECT_LOCATION = $( Resolve-Path "${PWD}\.." )
$PARENT_PROJECT_NAME = $( Resolve-Path "$PARENT_PROJECT_LOCATION" | Split-Path -Leaf )
$PROJECT_NAME = $( Resolve-Path "${PWD}" | Split-Path -Leaf )
$CURRENT_PROJECT_LOCATION = "${PARENT_PROJECT_WITH_GIT_NAME}/${PROJECT_NAME}"

$REPORT_ROOT="/build/${PARENT_PROJECT_WITH_GIT_NAME}/${PROJECT_NAME}"


$DOCKER_COMMAND="docker run --rm --net=host --name ${TEST_DRIVER_NAME} -v ${PARENT_PROJECT_WITH_GIT}:/build/${PARENT_PROJECT_WITH_GIT_NAME} -v ${MAVEN_DIR}:/build/.m2 -w ""/build/${PARENT_PROJECT_WITH_GIT_NAME}/${PROJECT_NAME}"" ${TEST_IMAGE} bash -l -c '${DOCKER_SCRIPT} -Dmaven.repo.local=/build/.m2/repository' "


printSectionLine "Project Root: ${PROJECT_ROOT_DIR}"
printSectionLine "Maven Plugins Directory: ${MAVEN_DIR}"
printSectionLine "Parent Project with GIT Directory: ${PARENT_PROJECT_WITH_GIT}"
printSectionLine "Parent Project with GIT Directory Name: ${PARENT_PROJECT_WITH_GIT_NAME}"
printSectionLine "Parent Project Name: ${PARENT_PROJECT_NAME}"
printSectionLine "Current Project Name: ${PROJECT_NAME}"
printSectionLine "Current Project Location: ${CURRENT_PROJECT_LOCATION}"
printSectionLine "Testing Directory: ${CURRENT_PATH}"
printSectionLine "Testing Sub Directory: ${PARENT_PROJECT_LOCATION}"
printSectionLine "Docker Script:"
printSectionLine " ${DOCKER_SCRIPT}"
printSectionLine "Docker Command:"
printSectionLine " ${DOCKER_COMMAND}"
printSectionLine "Docker Compose Command:"
printSectionLine " ${DOCKER_COMPOSE_COMMAND}"

if ( -Not( $SILENT ) )
{
Expand Down Expand Up @@ -80,11 +79,16 @@ foreach ($REPORT in $SPOCK_REPORTS)
}


debug "${DOCKER_COMMAND}"
printSubSectionStart "Docker Compose Execute"

$Env:MAVEN_COMMAND = "${DOCKER_SCRIPT}"
$Env:PARENT_PROJECT_WITH_GIT = "${PARENT_PROJECT_WITH_GIT}"
$Env:PARENT_PROJECT_WITH_GIT_NAME = "${PARENT_PROJECT_WITH_GIT_NAME}"
$Env:CURRENT_PROJECT_LOCATION = "${CURRENT_PROJECT_LOCATION}"
$Env:MAVEN_DIR = "${MAVEN_DIR}"

printSubSectionStart "Docker Command Execute"

Invoke-Expression "${DOCKER_COMMAND}"
Invoke-Expression "${DOCKER_COMPOSE_COMMAND}"



9 changes: 0 additions & 9 deletions aemdesign-testing/install

This file was deleted.

21 changes: 0 additions & 21 deletions aemdesign-testing/seleniumhub-start

This file was deleted.

42 changes: 0 additions & 42 deletions aemdesign-testing/seleniumhub-start.ps1

This file was deleted.

14 changes: 0 additions & 14 deletions aemdesign-testing/seleniumhub-stop

This file was deleted.

32 changes: 0 additions & 32 deletions aemdesign-testing/seleniumhub-stop.ps1

This file was deleted.

Loading

0 comments on commit f26b074

Please sign in to comment.