Merge "[aiab] Add a site linting gate to Zuul"
This commit is contained in:
commit
f355cebd09
22
.zuul.yaml
22
.zuul.yaml
|
@ -21,12 +21,14 @@
|
||||||
- treasuremap-seaworthy-site-lint
|
- treasuremap-seaworthy-site-lint
|
||||||
- treasuremap-airskiff-site-lint
|
- treasuremap-airskiff-site-lint
|
||||||
- treasuremap-airsloop-site-lint
|
- treasuremap-airsloop-site-lint
|
||||||
|
- treasuremap-aiab-site-lint
|
||||||
- treasuremap-airskiff-deployment-ubuntu
|
- treasuremap-airskiff-deployment-ubuntu
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- treasuremap-seaworthy-site-lint
|
- treasuremap-seaworthy-site-lint
|
||||||
- treasuremap-airskiff-site-lint
|
- treasuremap-airskiff-site-lint
|
||||||
- treasuremap-airsloop-site-lint
|
- treasuremap-airsloop-site-lint
|
||||||
|
- treasuremap-aiab-site-lint
|
||||||
- treasuremap-airskiff-deployment-ubuntu
|
- treasuremap-airskiff-deployment-ubuntu
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -67,6 +69,7 @@
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
- ^site/airskiff/.*$
|
- ^site/airskiff/.*$
|
||||||
- ^site/airsloop/.*$
|
- ^site/airsloop/.*$
|
||||||
|
- ^site/aiab/.*$
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: treasuremap-airskiff-site-lint
|
name: treasuremap-airskiff-site-lint
|
||||||
|
@ -80,6 +83,7 @@
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
- ^site/seaworthy/.*$
|
- ^site/seaworthy/.*$
|
||||||
- ^site/airsloop/.*$
|
- ^site/airsloop/.*$
|
||||||
|
- ^site/aiab/.*$
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: treasuremap-airsloop-site-lint
|
name: treasuremap-airsloop-site-lint
|
||||||
|
@ -93,6 +97,23 @@
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
- ^site/seaworthy/.*$
|
- ^site/seaworthy/.*$
|
||||||
- ^site/airskiff/.*$
|
- ^site/airskiff/.*$
|
||||||
|
- ^site/aiab/.*$
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: treasuremap-aiab-site-lint
|
||||||
|
description: |
|
||||||
|
Lint the aiab site using Pegleg.
|
||||||
|
parent: treasuremap-site-lint
|
||||||
|
pre-run:
|
||||||
|
- tools/gate/playbooks/generate-certs.yaml
|
||||||
|
vars:
|
||||||
|
site: aiab
|
||||||
|
irrelevant-files:
|
||||||
|
- ^.*\.rst$
|
||||||
|
- ^doc/.*$
|
||||||
|
- ^site/seaworthy/.*$
|
||||||
|
- ^site/airskiff/.*$
|
||||||
|
- ^site/airsloop/.*$
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: treasuremap-airskiff-deployment-ubuntu
|
name: treasuremap-airskiff-deployment-ubuntu
|
||||||
|
@ -111,6 +132,7 @@
|
||||||
- ^doc/.*$
|
- ^doc/.*$
|
||||||
- ^site/seaworthy/.*$
|
- ^site/seaworthy/.*$
|
||||||
- ^site/airsloop/.*$
|
- ^site/airsloop/.*$
|
||||||
|
- ^site/aiab/.*$
|
||||||
|
|
||||||
- secret:
|
- secret:
|
||||||
name: airshipit-github-secret
|
name: airshipit-github-secret
|
||||||
|
|
|
@ -161,8 +161,10 @@ function install_dependencies() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function run_pegleg_collect() {
|
function run_pegleg_collect() {
|
||||||
# Runs pegleg collect to get the documents combined
|
|
||||||
pushd ${WORKSPACE}
|
pushd ${WORKSPACE}
|
||||||
|
# Make sure certificates generated during prior runs are deleted.
|
||||||
|
rm -f treasuremap/site/${TARGET_SITE}/secrets/certificates.yaml
|
||||||
|
# Run pegleg collect to get the documents combined.
|
||||||
${PEGLEG} site -r /target/treasuremap collect ${TARGET_SITE} -s /target/collected
|
${PEGLEG} site -r /target/treasuremap collect ${TARGET_SITE} -s /target/collected
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
@ -182,7 +184,7 @@ function generate_certs() {
|
||||||
# Generate certificates
|
# Generate certificates
|
||||||
${PROMENADE} generate-certs -o /target/genesis /target/genesis/treasuremap.yaml
|
${PROMENADE} generate-certs -o /target/genesis /target/genesis/treasuremap.yaml
|
||||||
# Copy the generated certs back into the deployment_files structure
|
# Copy the generated certs back into the deployment_files structure
|
||||||
cp genesis/certificates.yaml treasuremap/site/${TARGET_SITE}/secrets
|
cp genesis/certificates.yaml treasuremap/site/${TARGET_SITE}/secrets/
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +252,7 @@ function setup_deploy_site() {
|
||||||
cp ${WORKSPACE}/genesis/*.yaml ${WORKSPACE}/site
|
cp ${WORKSPACE}/genesis/*.yaml ${WORKSPACE}/site
|
||||||
print_shipyard_info2
|
print_shipyard_info2
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_shipyard_info2() {
|
function print_shipyard_info2() {
|
||||||
set +x
|
set +x
|
||||||
echo " "
|
echo " "
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Copyright 2019 AT&T Intellectual Property. All other rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
- hosts: ubuntu-xenial
|
||||||
|
tasks:
|
||||||
|
- name: Generate site certificates
|
||||||
|
shell: |
|
||||||
|
set -xe;
|
||||||
|
SITE="{{ site }}"
|
||||||
|
|
||||||
|
mkdir collected
|
||||||
|
./tools/airship pegleg site \
|
||||||
|
-r . collect ${SITE} \
|
||||||
|
-s /target/collected
|
||||||
|
./tools/airship promenade generate-certs \
|
||||||
|
-o /target/site/${SITE}/secrets \
|
||||||
|
/target/collected/treasuremap.yaml
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
|
become: yes
|
Loading…
Reference in New Issue