Skip to content

Commit 72cbc13

Browse files
mikeferoMichael Fero
authored andcommitted
CPP-906 - Migrate Job-Creator build.yaml to Jenkins pipelines (datastax#30)
- Per-commit, scheduling, deploy release artifacts, and adhoc testing - Scheduling uses branch validation to determine if it should execute - Deploy uses Jenkins credentials and secrets to upload to Artifactory - Adhoc testing adds the ability to run one or all server versions - Documents can be generated with documentor (adhoc and monthly) - Adds parameters for adhoc building, testing, and deployment - Uses HTML descriptions for external users - Descriptive builds for Jenkins UI - Log rotation is used to minimize server storage - Timeouts are used for entire pipeline and per particular stage - Retry logic is used for false positive failures in unit tests - Artifacts are archived in Jenkins for per-commit builds - Artifacts force into OS specific directories; avoids overwrite - Error logic to archive logs for evaluating issues - Clean workspace logic for static MacOS node - Allow AppVeyor to ignore Jenkins pipeline changes - Rename configure_environment; was only used for testing - Add Slack notifications for start and end of runs - Per-Commit, scheduled, and release runs only - Works for both OSS and DSE drivers Note: All Server versions for scheduled/adhoc are available. This required a workaround due to the following Jenkins issue, https://issues.jenkins-ci.org/browse/JENKINS-37984. Co-authored-by: Michael Fero <michael.fero@datastax.com>
1 parent 9db1d6d commit 72cbc13

File tree

6 files changed

+1025
-93
lines changed

6 files changed

+1025
-93
lines changed

.build.linux.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616
##
1717

18-
configure_environment() {
18+
configure_testing_environment() {
1919
if ! grep -lq "127.254.254.254" /etc/hosts; then
2020
printf "\n\n%s\n" "127.254.254.254 cpp-driver.hostname." | sudo tee -a /etc/hosts
2121
fi
@@ -33,7 +33,7 @@ install_libuv() {(
3333
[[ -d build ]] && rm -rf build
3434
mkdir build
3535

36-
if [ "${OS_NAME}" = "ubuntu" ]; then
36+
if [ "${OS_DISTRO}" = "ubuntu" ]; then
3737
./build_deb.sh ${LIBUV_VERSION}
3838
else
3939
./build_rpm.sh ${LIBUV_VERSION}
@@ -43,7 +43,7 @@ install_libuv() {(
4343
[[ -d packages ]] || mkdir packages
4444
find libuv-packaging/build -type f \( -name "*.deb" -o -name "*.rpm" \) -exec mv {} packages \;
4545

46-
if [ "${OS_NAME}" = "ubuntu" ]; then
46+
if [ "${OS_DISTRO}" = "ubuntu" ]; then
4747
sudo dpkg -i packages/libuv*.deb
4848
else
4949
sudo rpm -U --force packages/libuv*.rpm
@@ -66,7 +66,7 @@ install_driver() {(
6666
[[ -d build ]] && rm -rf build
6767
mkdir build
6868

69-
if [ "${OS_NAME}" = "ubuntu" ]; then
69+
if [ "${OS_DISTRO}" = "ubuntu" ]; then
7070
./build_deb.sh
7171
else
7272
./build_rpm.sh
@@ -76,7 +76,7 @@ install_driver() {(
7676
[[ -d packages ]] || mkdir packages
7777
find build -type f \( -name "*.deb" -o -name "*.rpm" \) -exec mv {} packages \;
7878

79-
if [ "${OS_NAME}" = "ubuntu" ]; then
79+
if [ "${OS_DISTRO}" = "ubuntu" ]; then
8080
sudo dpkg -i packages/*cpp-driver*.deb
8181
else
8282
sudo rpm -i packages/*cpp-driver*.rpm

.build.osx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616
##
1717

18-
configure_environment() {
18+
configure_testing_environment() {
1919
true
2020
}
2121

.build.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,9 @@
2020
#set -n #Check Syntax
2121
set -e #Fail fast on non-zero exit status
2222

23-
WORKER_INFORMATION=($(echo ${OS_VERSION} | tr "/" " "))
24-
OS_NAME=${WORKER_INFORMATION[0]}
25-
RELEASE=${WORKER_INFORMATION[1]}
26-
SHA=$(echo ${GIT_COMMIT} | cut -c1-7)
27-
2823
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
29-
if [ "${OS_NAME}" = "osx" ]; then
24+
25+
if [ "${OS_DISTRO}" = "osx" ]; then
3026
LIB_SUFFIX="dylib"
3127
PROCS=$(sysctl -n hw.logicalcpu)
3228
. ${SCRIPT_DIR}/.build.osx.sh

0 commit comments

Comments
 (0)