summaryrefslogtreecommitdiffstats
path: root/jjb/releng
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2016-07-20 16:48:59 -0700
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2016-07-20 17:23:57 -0700
commita1d82bbf246837c4ff83ca95246157aacf465c0a (patch)
treeb9279cbaee7ec6fa1a5b1eea28cafd164d3219b9 /jjb/releng
parentc9ea19c97740b1f082b58ac3f4937d3bc5284dec (diff)
Move Releng Jobs under 'releng' folder
This should help clarify what jobs belong to releng, and that the yaml file is unaffiliated with 'releng-defaults' and 'releng-macros'. - Step [1/2] in publishing jobs to the Jenkins sandbox - Explicitly passes the '-r' to jenkins-jobs so that other understand releng recursively tests jobs. This option is implied by the jenkins-job-builder configuration on the server. JIRA: RELENG-91 Change-Id: Ic4bad170b3d311376a2d081089ac538b53595728 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'jjb/releng')
-rw-r--r--jjb/releng/releng-ci-jobs.yml124
-rwxr-xr-xjjb/releng/verify-releng.sh21
2 files changed, 145 insertions, 0 deletions
diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml
new file mode 100644
index 000000000..60551f5bb
--- /dev/null
+++ b/jjb/releng/releng-ci-jobs.yml
@@ -0,0 +1,124 @@
+- project:
+ name: builder-jobs
+ jobs:
+ - 'builder-verify-jjb'
+ - 'builder-merge'
+ - 'artifacts-api'
+
+ project: 'releng'
+
+- job-template:
+ name: builder-verify-jjb
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'releng'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ file-paths:
+ - compare-type: ANT
+ pattern: jjb/**
+ - compare-type: ANT
+ pattern: jjb-templates/**
+ - compare-type: ANT
+ pattern: utils/**
+
+
+ builders:
+ - shell:
+ !include-raw: verify-releng.sh
+
+ publishers:
+ - archive-artifacts:
+ artifacts: 'job_output/*'
+
+- job-template:
+ name: 'builder-merge'
+
+ # builder-merge job to run JJB update
+ #
+ # This job's purpose is to update all the JJB
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: 'remerge'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'releng'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ file-paths:
+ - compare-type: ANT
+ pattern: jjb/**
+ - compare-type: ANT
+ pattern: utils/**
+
+ builders:
+ - shell: |
+ source /opt/virtualenv/jenkins-job-builder/bin/activate
+ cd /opt/jenkins-ci/releng
+ git pull
+ jenkins-jobs update --delete-old jjb/
+
+- job-template:
+ name: 'artifacts-api'
+
+ # Generate and upload the JSON file to used for artifacts site
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ triggers:
+ - timed: '@hourly'
+
+ builders:
+ - build-and-upload-artifacts-json-api
diff --git a/jjb/releng/verify-releng.sh b/jjb/releng/verify-releng.sh
new file mode 100755
index 000000000..5c2dbff7a
--- /dev/null
+++ b/jjb/releng/verify-releng.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# SPDX-license-identifier: Apache-2.0
+##############################################################################
+# Copyright (c) 2016 Linux Foundation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+#test for non-ascii characters, these can pass the test and end up breaking things in production
+for x in $(find . -name *\.yml); do
+
+ if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then
+ echo "file "$x" contains non-ascii characters"
+ exit 1
+ fi
+
+done
+
+source /opt/virtualenv/jenkins-job-builder/bin/activate
+jenkins-jobs test -o job_output -r jjb/