Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/12213 ) Change subject: contrib/jenkins*: build and publish manuals .. contrib/jenkins*: build and publish manuals Add contrib/jenkins-build-manuals.sh, which clones or updates osmo-gsm-manuals and builds the manuals. When the environment variable PUBLISH=1 is set, it also uploads them. Call jenkins-build-manuals.sh from jenkins-run.sh, without PUBLISH=1, so the manuals get build-tested in the osmo-gsm-tester_gerrit job. A new job master-osmo-gsm-tester will be added in the future, which will run PUBLISH=1 jenkins-build-manuals.sh. The jenkins-build-manuals.sh script does not use the osmo-ci.git scripts for installing dependencies and cleaning up the workspace. These scripts are not available on the node, which runs the osmo-gsm-tester_gerrit job, and it is not trivial to add just them (without building the osmo-ci Docker image etc.). The only dependency is osmo-gsm-manuals, and it does not need to be compiled, so it seemed to be the most maintainable solution to implement the clone/update and clean up in a few lines of shell code instead. Related: OS#3385 Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd --- A contrib/jenkins-build-manuals.sh M contrib/jenkins-make-check-and-run.sh 2 files changed, 41 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Neels Hofmeyr: Looks good to me, approved diff --git a/contrib/jenkins-build-manuals.sh b/contrib/jenkins-build-manuals.sh new file mode 100755 index 000..48f7780 --- /dev/null +++ b/contrib/jenkins-build-manuals.sh @@ -0,0 +1,40 @@ +#!/bin/sh -ex +# environment variables: +# * PUBLISH: upload manuals after building if set to "1" + +base="$PWD" +export OSMO_GSM_MANUALS_DIR="$base/osmo-gsm-manuals" + +# Sanity check +if ! [ -d "$base/doc/manuals" ]; then + echo "ERROR: this script needs to be executed from the top dir of osmo-gsm-tester.git." + exit 1 +fi + +# Clone/update osmo-gsm-manuals and wipe local modifications +if [ -d "$OSMO_GSM_MANUALS_DIR" ]; then + git -C "$OSMO_GSM_MANUALS_DIR" pull +else + git clone "https://git.osmocom.org/osmo-gsm-manuals; "$OSMO_GSM_MANUALS_DIR" +fi +git -C "$OSMO_GSM_MANUALS_DIR" checkout -f HEAD + +# Copy manuals source to empty temp dir (so we can easily clean up afterwards) +temp="$base/_manuals_temp" +if [ -d "$temp" ]; then + rm -rf "$temp" +fi +cp -r "$base/doc/manuals" "$temp" + +# Build the manuals +cd "$temp" +make +make check + +# Publish +if [ "$PUBLISH" = "1" ]; then + make publish +fi + +# Clean up +rm -r "$temp" diff --git a/contrib/jenkins-make-check-and-run.sh b/contrib/jenkins-make-check-and-run.sh index 3017fd4..2a9bc82 100755 --- a/contrib/jenkins-make-check-and-run.sh +++ b/contrib/jenkins-make-check-and-run.sh @@ -8,6 +8,7 @@ cd osmo-gsm-tester make deps make check +./contrib/jenkins-build-manuals.sh cd "$base" PATH="$base/osmo-gsm-tester/src:$PATH" \ -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12213 ) Change subject: contrib/jenkins*: build and publish manuals .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Tue, 11 Dec 2018 11:47:33 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/12213 ) Change subject: contrib/jenkins*: build and publish manuals .. Patch Set 4: Well osmo-gsm-tester main unit currently can only run 1 job at a time, seuqnetially, and right now it's running the TTCN3 tests on real HW, which may take around 30min - 1 hour :) -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 10 Dec 2018 12:06:03 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12213 to look at the new patch set (#4). Change subject: contrib/jenkins*: build and publish manuals .. contrib/jenkins*: build and publish manuals Add contrib/jenkins-build-manuals.sh, which clones or updates osmo-gsm-manuals and builds the manuals. When the environment variable PUBLISH=1 is set, it also uploads them. Call jenkins-build-manuals.sh from jenkins-run.sh, without PUBLISH=1, so the manuals get build-tested in the osmo-gsm-tester_gerrit job. A new job master-osmo-gsm-tester will be added in the future, which will run PUBLISH=1 jenkins-build-manuals.sh. The jenkins-build-manuals.sh script does not use the osmo-ci.git scripts for installing dependencies and cleaning up the workspace. These scripts are not available on the node, which runs the osmo-gsm-tester_gerrit job, and it is not trivial to add just them (without building the osmo-ci Docker image etc.). The only dependency is osmo-gsm-manuals, and it does not need to be compiled, so it seemed to be the most maintainable solution to implement the clone/update and clean up in a few lines of shell code instead. Related: OS#3385 Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd --- A contrib/jenkins-build-manuals.sh M contrib/jenkins-make-check-and-run.sh 2 files changed, 41 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/12213/4 -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 4 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
Hello Pau Espin Pedrol, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/12213 to look at the new patch set (#3). Change subject: contrib/jenkins*: build and publish manuals .. contrib/jenkins*: build and publish manuals Add contrib/jenkins-build-manuals.sh, which clones or updates osmo-gsm-manuals and builds the manuals. When the environment variable PUBLISH=1 is set, it also uploads them. Call jenkins-build-manuals.sh from jenkins-run.sh, without PUBLISH=1, so the manuals get build-tested in the osmo-gsm-tester_gerrit job. A new job master-osmo-gsm-tester will be added in the future, which will run PUBLISH=1 jenkins-build-manuals.sh. The jenkins-build-manuals.sh script does not use the osmo-ci.git scripts for installing dependencies and cleaning up the workspace. These scripts are not available on the node, which runs the osmo-gsm-tester_gerrit job, and it is not trivial to add just them (without building the osmo-ci Docker image etc.). The only dependency is osmo-gsm-manuals, and it does not need to be compiled, so it seemed to be the most maintainable solution to implement the clone/update and clean up in a few lines of shell code instead. Related: OS#3385 Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd --- A contrib/jenkins-build-manuals.sh M contrib/jenkins-make-check-and-run.sh 2 files changed, 42 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/12213/3 -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 3 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12213 ) Change subject: contrib/jenkins*: build and publish manuals .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/12213/2/contrib/jenkins-make-check-and-run.sh File contrib/jenkins-make-check-and-run.sh: https://gerrit.osmocom.org/#/c/12213/2/contrib/jenkins-make-check-and-run.sh@17 PS2, Line 17: $base/osmo-gsm-tester/contrib/jenkins-build-manuals.sh > Please call it after make check and beforeswitching to $base dir. […] Will do. Yeah, I've realized that the path is wrong and pushed a second patch. But the build slave is so busy that Jenkins only got around to build the first one. Thanks for the quick review! :) -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: osmith Gerrit-Comment-Date: Mon, 10 Dec 2018 11:49:24 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/12213 ) Change subject: contrib/jenkins*: build and publish manuals .. Patch Set 2: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/12213/2/contrib/jenkins-make-check-and-run.sh File contrib/jenkins-make-check-and-run.sh: https://gerrit.osmocom.org/#/c/12213/2/contrib/jenkins-make-check-and-run.sh@17 PS2, Line 17: $base/osmo-gsm-tester/contrib/jenkins-build-manuals.sh Please call it after make check and beforeswitching to $base dir. BTW; test failed: ./osmo-gsm-tester/contrib/jenkins-make-check-and-run.sh: 17: ./osmo-gsm-tester/contrib/jenkins-make-check-and-run.sh: ./jenkins-build-manuals.sh: not found -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 2 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 10 Dec 2018 11:46:58 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/12213 ) Change subject: contrib/jenkins*: build and publish manuals .. contrib/jenkins*: build and publish manuals Add contrib/jenkins-build-manuals.sh, which clones or updates osmo-gsm-manuals and builds the manuals. When the environment variable PUBLISH=1 is set, it also uploads them. Call jenkins-build-manuals.sh from jenkins-run.sh, without PUBLISH=1, so the manuals get build-tested in the osmo-gsm-tester_gerrit job. A new job master-osmo-gsm-tester will be added in the future, which will run PUBLISH=1 jenkins-build-manuals.sh. The jenkins-build-manuals.sh script does not use the osmo-ci.git scripts for installing dependencies and cleaning up the workspace. These scripts are not available on the node, which runs the osmo-gsm-tester_gerrit job, and it is not trivial to add just them (without building the osmo-ci Docker image etc.). The only dependency is osmo-gsm-manuals, and it does not need to be compiled, so it seemed to be the most maintainable solution to implement the clone/update and clean up in a few lines of shell code instead. Related: OS#3385 Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd --- A contrib/jenkins-build-manuals.sh M contrib/jenkins-make-check-and-run.sh 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/12213/2 -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 2 Gerrit-Owner: osmith
Change in osmo-gsm-tester[master]: contrib/jenkins*: build and publish manuals
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/12213 Change subject: contrib/jenkins*: build and publish manuals .. contrib/jenkins*: build and publish manuals Add contrib/jenkins-build-manuals.sh, which clones or updates osmo-gsm-manuals and builds the manuals. When the environment variable PUBLISH=1 is set, it also uploads them. Call jenkins-build-manuals.sh from jenkins-run.sh, without PUBLISH=1, so the manuals get build-tested in the osmo-gsm-tester_gerrit job. A new job master-osmo-gsm-tester will be added in the future, which will run PUBLISH=1 jenkins-build-manuals.sh. The jenkins-build-manuals.sh script does not use the osmo-ci.git scripts for installing dependencies and cleaning up the workspace. These scripts are not available on the node, which runs the osmo-gsm-tester_gerrit job, and it is not trivial to add just them (without building the osmo-ci Docker image etc.). The only dependency is osmo-gsm-manuals, and it does not need to be compiled, so it seemed to be the most maintainable solution to implement the clone/update and clean up in a few lines of shell code instead. Related: OS#3385 Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd --- A contrib/jenkins-build-manuals.sh M contrib/jenkins-make-check-and-run.sh 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/13/12213/1 diff --git a/contrib/jenkins-build-manuals.sh b/contrib/jenkins-build-manuals.sh new file mode 100755 index 000..0984f6c --- /dev/null +++ b/contrib/jenkins-build-manuals.sh @@ -0,0 +1,34 @@ +#!/bin/sh -ex +# environment variables: +# * PUBLISH: upload manuals after building if set to "1" + +base="$PWD" +export OSMO_GSM_MANUALS_DIR="$base/osmo-gsm-manuals" + +# Clone/update osmo-gsm-manuals and wipe local modifications +if [ -d "$OSMO_GSM_MANUALS_DIR" ]; then + git -C "$OSMO_GSM_MANUALS_DIR" pull +else + git clone "https://git.osmocom.org/osmo-gsm-manuals; "$OSMO_GSM_MANUALS_DIR" +fi +git -C "$OSMO_GSM_MANUALS_DIR" checkout -f HEAD + +# Copy manuals source to empty temp dir (so we can easily clean up afterwards) +temp="$base/_manuals_temp" +if [ -d "$temp" ]; then + rm -rf "$temp" +fi +cp -r "$base/doc/manuals" "$temp" + +# Build the manuals +cd "$temp" +make +make check + +# Publish +if [ "$PUBLISH" = "1" ]; then + make publish +fi + +# Clean up +rm -r "$temp" diff --git a/contrib/jenkins-make-check-and-run.sh b/contrib/jenkins-make-check-and-run.sh index 3017fd4..4f87fbd 100755 --- a/contrib/jenkins-make-check-and-run.sh +++ b/contrib/jenkins-make-check-and-run.sh @@ -1,4 +1,5 @@ #!/bin/sh + set -e -x base="$PWD" @@ -12,3 +13,5 @@ PATH="$base/osmo-gsm-tester/src:$PATH" \ "$run_script" + +./jenkins-build-manuals.sh -- To view, visit https://gerrit.osmocom.org/12213 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I4ebfe12a164f807b63bc897aff44db83fc0705bd Gerrit-Change-Number: 12213 Gerrit-PatchSet: 1 Gerrit-Owner: osmith