diff --git a/jjb/jjb-templates/jq-color-jobs.yaml b/jjb/jjb-templates/jq-color-jobs.yaml new file mode 100644 index 0000000..dd1d0ea --- /dev/null +++ b/jjb/jjb-templates/jq-color-jobs.yaml @@ -0,0 +1,91 @@ +--- +- job-boiler-plate: &job_boiler_plate + name: job-boiler-plate + + project-type: freestyle + node: "{build-node}" + + ###################### + # Default parameters # + ###################### + + branch: main + submodule-recursive: true + + ##################### + # Job Configuration # + ##################### + + properties: + - lf-infra-properties: + project: "{project}" + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + publishers: + - lf-infra-publish + +- verify-boiler-plate: &verify_boiler_plate + name: verify-boiler-plate + + concurrent: true + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '$sha1' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + submodule-disable: false + submodule-timeout: 10 + + triggers: + - github-pull-request: + trigger-phrase: '^recheck$' + only-trigger-phrase: false + permit-all: true + github-hooks: true + auto-close-on-fail: false + white-list-target-branches: + - '{branch}' + +- merge-boiler-plate: &merge_boiler_plate + name: merge-boiler-plate + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '' + branch: 'refs/heads/{branch}' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + submodule-disable: false + submodule-timeout: 10 + + triggers: + - github + +- job-template: + name: '{project-name}-{stream}-verify-nodejs' + + <<: *job_boiler_plate + # yamllint disable-line rule:key-duplicates + <<: *verify_boiler_plate + + builders: + - shell: !include-raw-escape: + - ../shell/jquery-color-build.sh diff --git a/jjb/jjb-templates/jq-migrate-jobs.yaml b/jjb/jjb-templates/jq-migrate-jobs.yaml new file mode 100644 index 0000000..2e240a2 --- /dev/null +++ b/jjb/jjb-templates/jq-migrate-jobs.yaml @@ -0,0 +1,91 @@ +--- +- job-boiler-plate: &job_boiler_plate + name: job-boiler-plate + + project-type: freestyle + node: "{build-node}" + + ###################### + # Default parameters # + ###################### + + branch: main + submodule-recursive: true + + ##################### + # Job Configuration # + ##################### + + properties: + - lf-infra-properties: + project: "{project}" + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + publishers: + - lf-infra-publish + +- verify-boiler-plate: &verify_boiler_plate + name: verify-boiler-plate + + concurrent: true + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '$sha1' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + submodule-disable: false + submodule-timeout: 10 + + triggers: + - github-pull-request: + trigger-phrase: '^recheck$' + only-trigger-phrase: false + permit-all: true + github-hooks: true + auto-close-on-fail: false + white-list-target-branches: + - '{branch}' + +- merge-boiler-plate: &merge_boiler_plate + name: merge-boiler-plate + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '' + branch: 'refs/heads/{branch}' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + submodule-disable: false + submodule-timeout: 10 + + triggers: + - github + +- job-template: + name: '{project-name}-{stream}-verify-nodejs' + + <<: *job_boiler_plate + # yamllint disable-line rule:key-duplicates + <<: *verify_boiler_plate + + builders: + - shell: !include-raw-escape: + - ../shell/jquery-migrate-build.sh diff --git a/jjb/jjb-templates/jq-ui-jobs.yaml b/jjb/jjb-templates/jq-ui-jobs.yaml new file mode 100644 index 0000000..c8a0934 --- /dev/null +++ b/jjb/jjb-templates/jq-ui-jobs.yaml @@ -0,0 +1,91 @@ +--- +- job-boiler-plate: &job_boiler_plate + name: job-boiler-plate + + project-type: freestyle + node: "{build-node}" + + ###################### + # Default parameters # + ###################### + + branch: main + submodule-recursive: true + + ##################### + # Job Configuration # + ##################### + + properties: + - lf-infra-properties: + project: "{project}" + build-days-to-keep: "{build-days-to-keep}" + + parameters: + - lf-infra-parameters: + project: '{project}' + branch: '{branch}' + stream: '{stream}' + lftools-version: '{lftools-version}' + + wrappers: + - lf-infra-wrappers: + build-timeout: "{build-timeout}" + jenkins-ssh-credential: "{jenkins-ssh-credential}" + + publishers: + - lf-infra-publish + +- verify-boiler-plate: &verify_boiler_plate + name: verify-boiler-plate + + concurrent: true + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '+refs/pull/*:refs/remotes/origin/pr/*' + branch: '$sha1' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + submodule-disable: false + submodule-timeout: 10 + + triggers: + - github-pull-request: + trigger-phrase: '^recheck$' + only-trigger-phrase: false + permit-all: true + github-hooks: true + auto-close-on-fail: false + white-list-target-branches: + - '{branch}' + +- merge-boiler-plate: &merge_boiler_plate + name: merge-boiler-plate + + scm: + - lf-infra-github-scm: + url: '{git-clone-url}{github-org}/{project}' + refspec: '' + branch: 'refs/heads/{branch}' + submodule-recursive: '{submodule-recursive}' + choosing-strategy: default + jenkins-ssh-credential: '{jenkins-ssh-credential}' + submodule-disable: false + submodule-timeout: 10 + + triggers: + - github + +- job-template: + name: '{project-name}-{stream}-verify-nodejs' + + <<: *job_boiler_plate + # yamllint disable-line rule:key-duplicates + <<: *verify_boiler_plate + + builders: + - shell: !include-raw-escape: + - ../shell/jquery-ui-build.sh diff --git a/jjb/jquery-color/jquery-color.yaml b/jjb/jquery-color/jquery-color.yaml index 8a73d6e..0a6278c 100644 --- a/jjb/jquery-color/jquery-color.yaml +++ b/jjb/jquery-color/jquery-color.yaml @@ -7,6 +7,19 @@ stream: - 'main': branch: 'main' + - '1.x-3.x_core': + branch: 'main' + - 'git_core: + branch: 'main' + - '2.x-1.x_core': + branch: 'main' + - '2.x-2.x-3.x_core': + branch: '2.x-stable' + - '2.x-git_core': + branch: '2.x-stable' + + jobs: + - '{project-name}-{stream}-verify-nodejs' views: - project-view diff --git a/jjb/jquery-migrate/jquery-migrate.yaml b/jjb/jquery-migrate/jquery-migrate.yaml index 681106b..ccbd54e 100644 --- a/jjb/jquery-migrate/jquery-migrate.yaml +++ b/jjb/jquery-migrate/jquery-migrate.yaml @@ -5,8 +5,12 @@ project: jquery-migrate mvn-settings: jquery-migrate-settings stream: - - 'main': + - '3.x_core': branch: 'main' + - 'git_core': + branch: 'main' + jobs: + - '{project-name}-{stream}-verify-nodejs' views: - project-view diff --git a/jjb/jquery-ui/jquery-ui.yaml b/jjb/jquery-ui/jquery-ui.yaml index 95461b3..7a9b62d 100644 --- a/jjb/jquery-ui/jquery-ui.yaml +++ b/jjb/jquery-ui/jquery-ui.yaml @@ -5,8 +5,43 @@ project: jquery-ui mvn-settings: jquery-ui-settings stream: - - 'main': + - 'git_core': branch: 'main' + - '1.10.x_core': + branch: 'main' + - '1.11.x_core': + branch: 'main' + - '1.12.x_core': + branch: 'main' + - '1.8.x_core': + branch: 'main' + - '1.9.x_core': + branch: 'main' + - '2.0.x_core': + branch: 'main' + - '2.1.x_core': + branch: 'main' + - '2.2.x_core': + branch: 'main' + - '3.x_core': + branch: 'main' + - '3.0.x_core': + branch: 'main' + - '3.1.x_core': + branch: 'main' + - '3.2.x_core': + branch: 'main' + - '3.3.x_core': + branch: 'main' + - '3.4.x_core': + branch: 'main' + - '3.5.x_core': + branch: 'main' + - '3.6.x_core': + branch: 'main' + + jobs: + - '{project-name}-{stream}-verify-nodejs' views: - project-view diff --git a/jjb/shell/jquery-color-build.sh b/jjb/shell/jquery-color-build.sh new file mode 100644 index 0000000..5855744 --- /dev/null +++ b/jjb/shell/jquery-color-build.sh @@ -0,0 +1,23 @@ +#!/bin/sh -exu + +node --version +npm --version + +npm install +npm test + +export COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD)} +"`npm bin`/grunt" + +scp dist/jquery.color.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/color/jquery.color-git.js +scp dist/jquery.color.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/color/jquery.color-git.min.js +scp dist/jquery.color.svg-names.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/color/jquery.color.svg-names-git.js +scp dist/jquery.color.svg-names.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/color/jquery.color.svg-names-git.min.js +scp dist/jquery.color.plus-names.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/color/jquery.color.plus-names-git.js +scp dist/jquery.color.plus-names.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/color/jquery.color.plus-names-git.min.js + +/usr/local/bin/tools/jenkins-testswarm-static-copy.sh jquery-color ${COMMIT} + +set +e +"`npm bin`/grunt" testswarm:${COMMIT}:/usr/local/bin/tools/node-testswarm-config.json:jquerycolor:jquery-color +exit 0 \ No newline at end of file diff --git a/jjb/shell/jquery-core-build.sh b/jjb/shell/jquery-core-build.sh index 582a21f..7959704 100644 --- a/jjb/shell/jquery-core-build.sh +++ b/jjb/shell/jquery-core-build.sh @@ -2,31 +2,43 @@ # Deletes cache and artefacts of npm, bower, git submodules and jenkins builds git clean -dffx export COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD)} +export branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') echo "Checking nodejs version" which node node --version echo "Checking npm version" which npm npm --version -echo "Installing npm" +echo "Installing npm dependencies" npm install "$(npm bin)/grunt" custom:slim --filename=jquery.slim.js npm run jenkins echo "Coping files to codeorigin.jquery.com" -scp dist/jquery.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.js -scp dist/jquery.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.min.js -scp dist/jquery.slim.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.slim.js -scp dist/jquery.slim.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.slim.min.js -echo "Refreshing cache" -set +e -curl -s http://codeorigin.jquery.com/jquery-git.js?reload -curl -s http://codeorigin.jquery.com/jquery-git.min.js?reload -curl -s http://codeorigin.jquery.com/jquery-git.slim.js?reload -curl -s http://codeorigin.jquery.com/jquery-git.slim.min.js?reload +if [ `git branch --list main` ] +then + scp dist/jquery.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.js + scp dist/jquery.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.min.js + scp dist/jquery.slim.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.slim.js + scp dist/jquery.slim.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-git.slim.min.js +elif [ `git branch --list 3.x-stable` ] + scp dist/jquery.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-3.x-git.js + scp dist/jquery.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-3.x-git.min.js + scp dist/jquery.slim.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-3.x-git.slim.js + scp dist/jquery.slim.min.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-3.x-git.slim.min.js +fi + +#echo "Refreshing cache" To be removed, not needed anymore +#set +e +#curl -s http://codeorigin.jquery.com/jquery-git.js?reload +#curl -s http://codeorigin.jquery.com/jquery-git.min.js?reload +#curl -s http://codeorigin.jquery.com/jquery-git.slim.js?reload +#curl -s http://codeorigin.jquery.com/jquery-git.slim.min.js?reload + echo "Running jenkins-testswarm-static-copy.sh" set -e /usr/local/bin/tools/jenkins-testswarm-static-copy.sh jquery "${COMMIT}" echo "Creating and running new testswarm job" set +e -grunt testswarm:"${COMMIT}":/usr/local/bin/tools/node-testswarm-config.json:jquery:jquery +grunt testswarm:"${COMMIT}":/usr/local/bin/tools/node-testswarm-config.json:jquery:jquerytesting + exit 0 diff --git a/jjb/shell/jquery-migrate-build.sh b/jjb/shell/jquery-migrate-build.sh new file mode 100644 index 0000000..6a2730a --- /dev/null +++ b/jjb/shell/jquery-migrate-build.sh @@ -0,0 +1,16 @@ +#!/bin/sh -exu + +node --version +npm --version + +npm install + +export COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD)} +npm run build + +scp dist/jquery-migrate.js wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-migrate-git.js +scp dist/jquery-migrate.min.js wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/jquery-migrate-git.min.js + +/usr/local/bin/tools/jenkins-testswarm-static-copy.sh jquery-migrate ${COMMIT} + +"`npm bin`/grunt" testswarm:${COMMIT}:/usr/local/bin/tools/node-testswarm-config.json:jquerymigrate:jquery-3:3600000 diff --git a/jjb/shell/jquery-ui-build.sh b/jjb/shell/jquery-ui-build.sh new file mode 100644 index 0000000..f5f30a8 --- /dev/null +++ b/jjb/shell/jquery-ui-build.sh @@ -0,0 +1,18 @@ +#!/bin/sh -exu + +node --version +npm --version + +npm install + +export COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD)} +/usr/local/bin/tools/jenkins-testswarm-static-copy.sh jquery-ui ${COMMIT} + +"`npm bin`/grunt" jenkins +scp dist/jquery-ui.js jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/ui/jquery-ui-git.js +scp dist/jquery-ui.css jenkins@wp-03.ops.jquery.net:/var/www/codeorigin.jquery.com/git/ui/jquery-ui-git.css + +## disable exit-on-error to mark builds as unstable +set +e +"`npm bin`/grunt" testswarm-multi-jquery:${COMMIT}:/usr/local/bin/tools/node-testswarm-config.json:git:jquery-ui-future +exit 0 \ No newline at end of file