Add skeleton of airship-core type

This adds a basic airship-core type and test-site definition, which initially
will point back to airshipctl for everything but site-specific configuration.

Gating is added under a dependent changeset:
https://review.opendev.org/#/c/741648

This removes the yaml-lint job / make target, since that chokes on CRs whose
definitions are not present.  YAML validation will be re-enabled by borrowing
the YAML validation from the airshipctl project, which leverages kustomize
and a live kubernetes API server.

Change-Id: I51c469f74be1270325f523343c02d36c2512e739
This commit is contained in:
Matt McEuen
2020-07-10 16:27:02 -05:00
parent 7f8bf5f411
commit e1cd035938
27 changed files with 365 additions and 126 deletions

View File

@@ -1,30 +0,0 @@
#!/bin/bash
# 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.
set -xe
INSTALL_PREFIX=$1
INSTALL_PREFIX=${INSTALL_PREFIX:-'/tmp/kubeval'}
KUBEVAL_URL=https://github.com/instrumenta/kubeval/releases/download
KUBEVAL_VER=${KUBEVAL_VER:-'0.14.0'}
URL="${KUBEVAL_URL}/${KUBEVAL_VER}/kubeval-linux-amd64.tar.gz"
TMP=$(mktemp -d)
pushd $TMP
curl -fL $URL | tar -xz
install -D -t ${INSTALL_PREFIX}/bin kubeval
popd
rm -rf $TMP

View File

@@ -1,21 +0,0 @@
# 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: all
tasks:
- name: Install KubeVal
shell: |
set -xe
./tools/gate/install-kubeval.sh
args:
chdir: "{{ zuul.project.src_dir }}"
become: yes

View File

@@ -1,23 +0,0 @@
# 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-bionic
tasks:
- name: Lint site
shell: |
set -xe
./tools/gate/run-lint.sh
args:
chdir: "{{ zuul.project.src_dir }}"
become: yes

View File

@@ -1,38 +0,0 @@
#!/bin/bash
# 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.
set -xe
ROOT=$1
KUBEVAL_BIN=${KUBEVAL_BIN:-/tmp/kubeval/bin}
PATH=${KUBEVAL_BIN}:$PATH
EXCLUDE_DIRS=(
'*/\.git/*'
'*/kustomizeconfig/*'
'*/tools/*'
)
EXCLUDE_FILES=(
'.zuul.yaml'
'kustomization.yaml'
)
function join { local d=$1; shift; printf '%s' "${@/#/$d}"; }
FILTER="$(join ' -not -path ' ${EXCLUDE_DIRS[*]})"
FILTER="$FILTER $(join ' -not -name ' ${EXCLUDE_FILES[*]})"
find $ROOT -type f \( -name "*\.yaml" $FILTER \) | xargs -r kubeval