Image builds and publishing, CI gates
This patch set removes porthole-images-build and porthole-images-upload zuul jobs, as they seem to be not used. Parent job upload-docker-image currently does not support quay.io registry. Add Zuul jobs to build and upload to quay.io mysqlclient-utility container image, basing on other Airship project jobs. Change Dockerfile of mysqlclient-utility to make it more consistent with other Airship Dockerfiles. Removed mysqlclient-utility/build.sh, as this seem not to be used. Rewrite Makefile to support build-image-$(IMAGE_NAME) target, which should be used to build images from different directories and allows to base them on different base image. Remove Makefile targets (pull-all-images, pull-images, dev-deploy) which could not be executed anyway, because of absence of scripts they refer to. Remove other unused Makefile targets. Adjust copyright (license) message in files which are largely sourced from Airship Apache 2.0 code. Removed calicoctl, ceph, compute and openstack -utility jobs, as this jobs only do linting of the same code multiple time, burdening OpenStack Infrastructure. Added one linting job which runs agains complete code base. Removed unused helm_install.sh, helm_tk.sh and install_*_utility.sh scripts. Change-Id: I2d8f4b0cfaa6a8def0539ce6c40cc3c320f36a7d
This commit is contained in:
parent
7ff0ba880b
commit
33ce528756
@ -1,28 +1,35 @@
|
||||
ARG FROM=docker.io/ubuntu:xenial
|
||||
ARG FROM=ubuntu:16.04
|
||||
FROM ${FROM}
|
||||
MAINTAINER Trung Thai <tthai@att.com>
|
||||
|
||||
RUN set -xe \
|
||||
&& sed -i '/nobody/d' /etc/passwd \
|
||||
&& echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd ;\
|
||||
apt-get update ;\
|
||||
apt-get dist-upgrade -y ;\
|
||||
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
|
||||
org.opencontainers.image.url='https://airshipit.org' \
|
||||
org.opencontainers.image.documentation='https://opendev.org/airship/porthole' \
|
||||
org.opencontainers.image.source='https://opendev.org/airship/porthole' \
|
||||
org.opencontainers.image.vendor='The Airship Authors' \
|
||||
org.opencontainers.image.licenses='Apache-2.0'
|
||||
|
||||
RUN set -xe && \
|
||||
sed -i '/nobody/d' /etc/passwd && \
|
||||
echo "nobody:x:65534:65534:nobody:/nonexistent:/bin/bash" >> /etc/passwd && \
|
||||
apt-get update && \
|
||||
apt-get dist-upgrade -y && \
|
||||
apt-get install -y \
|
||||
bash \
|
||||
moreutils \
|
||||
vim \
|
||||
sudo \
|
||||
screen \
|
||||
rsyslog \
|
||||
mysql-client \
|
||||
python-oslo.rootwrap \
|
||||
python3-oslo.rootwrap \
|
||||
mysql-client ;\
|
||||
sed -i 's/$PrivDropToUser syslog/$PrivDropToUser nobody/' /etc/rsyslog.conf ; \
|
||||
apt-get clean -y ;\
|
||||
screen \
|
||||
sudo \
|
||||
rsyslog \
|
||||
vim && \
|
||||
sed -i 's/$PrivDropToUser syslog/$PrivDropToUser nobody/' /etc/rsyslog.conf && \
|
||||
apt-get clean -y && \
|
||||
rm -rf \
|
||||
/tmp/* \
|
||||
/var/cache/debconf/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/log/* \
|
||||
/tmp/* \
|
||||
/var/tmp/*
|
||||
|
||||
CMD ["/bin/bash"]
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
SCRIPT=`realpath $0`
|
||||
SCRIPT_DIR=`dirname ${SCRIPT}`
|
||||
## Only build from main folder
|
||||
cd ${SCRIPT_DIR}/..
|
||||
|
||||
IMAGE="mysqlclient-utility"
|
||||
VERSION=${VERSION:-latest}
|
||||
DISTRO=${DISTRO:-ubuntu_xenial}
|
||||
REGISTRY_URI=${REGISTRY_URI:-"airshipit/"}
|
||||
EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""}
|
||||
docker build \
|
||||
-f ${IMAGE}/Dockerfile.${DISTRO} \
|
||||
--network=host \
|
||||
-t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} \
|
||||
${extra_build_args} ${IMAGE}
|
||||
|
||||
cd -
|
114
Makefile
114
Makefile
@ -1,10 +1,10 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
# 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
|
||||
# https://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,
|
||||
@ -15,48 +15,86 @@
|
||||
# It's necessary to set this because some environments don't link sh -> bash.
|
||||
SHELL := /bin/bash
|
||||
|
||||
HELM := helm
|
||||
TASK := build
|
||||
# APP INFO
|
||||
DOCKER_REGISTRY ?= quay.io
|
||||
IMAGE_PREFIX ?= airshipit
|
||||
IMAGE_NAME ?=
|
||||
IMAGE_TAG ?= latest
|
||||
PROXY ?= http://proxy.foo.com:8000
|
||||
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||
USE_PROXY ?= false
|
||||
PUSH_IMAGE ?= false
|
||||
# use this variable for image labels added in internal build process
|
||||
LABEL ?= org.airshipit.build=community
|
||||
COMMIT ?= $(shell git rev-parse HEAD)
|
||||
DISTRO_SUFFIX ?= $(DISTRO)
|
||||
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}-${DISTRO_SUFFIX}
|
||||
BASE_IMAGE ?=
|
||||
|
||||
EXCLUDES := helm-toolkit docs tools logs tmp Dockerfiles zuul.d
|
||||
CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
|
||||
# VERSION INFO
|
||||
GIT_COMMIT = ${COMMIT}
|
||||
GIT_SHA = $(shell git rev-parse --short HEAD)
|
||||
GIT_TAG = $(shell git describe --tags --abbrev=0 --exact-match 2>/dev/null)
|
||||
GIT_DIRTY = $(shell test -n "`git status --porcelain`" && echo "dirty" || echo "clean")
|
||||
|
||||
.PHONY: $(EXCLUDES) $(CHARTS)
|
||||
ifdef VERSION
|
||||
DOCKER_VERSION = $(VERSION)
|
||||
endif
|
||||
|
||||
all: $(CHARTS)
|
||||
ifeq "$(DISTRO_SUFFIX)" ""
|
||||
DOCKERFILE = "Dockerfiles/$(IMAGE_NAME)/Dockerfile"
|
||||
else
|
||||
DOCKERFILE = "Dockerfiles/$(IMAGE_NAME)/Dockerfile.$(DISTRO_SUFFIX)"
|
||||
endif
|
||||
|
||||
$(CHARTS):
|
||||
@echo
|
||||
@echo "===== Processing [$@] chart ====="
|
||||
@make $(TASK)-$@
|
||||
info:
|
||||
@echo "Version: ${VERSION}"
|
||||
@echo "Git Tag: ${GIT_TAG}"
|
||||
@echo "Git Commit: ${GIT_COMMIT}"
|
||||
@echo "Git Tree State: ${GIT_DIRTY}"
|
||||
@echo "Docker Version: ${DOCKER_VERSION}"
|
||||
@echo "Registry: ${DOCKER_REGISTRY}"
|
||||
|
||||
init-%:
|
||||
if [ -f $*/Makefile ]; then make -C $*; fi
|
||||
if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
|
||||
all:
|
||||
@echo "And what is there's nothing in there? You die, and there's" \
|
||||
"nothing beyond that. Nothing. Nothing remains. Someone might" \
|
||||
"remember you for a little while after but not for long.">&2; exit 2
|
||||
|
||||
lint-%: init-%
|
||||
if [ -d $* ]; then $(HELM) lint $*; fi
|
||||
check-docker:
|
||||
@if [ -z $$(which docker) ]; then \
|
||||
echo "Missing \`docker\` client which is required for development"; \
|
||||
exit 2; \
|
||||
fi
|
||||
|
||||
build-%: lint-%
|
||||
if [ -d $* ]; then $(HELM) package $*; fi
|
||||
_BASE_IMAGE_ARG := $(if $(BASE_IMAGE),--build-arg FROM="${BASE_IMAGE}" ,)
|
||||
|
||||
clean:
|
||||
@echo "Removed .b64, _partials.tpl, and _globals.tpl files"
|
||||
rm -f helm-toolkit/secrets/*.b64
|
||||
rm -f */templates/_partials.tpl
|
||||
rm -f */templates/_globals.tpl
|
||||
rm -f *tgz */charts/*tgz
|
||||
rm -f */requirements.lock
|
||||
-rm -rf */charts */tmpcharts
|
||||
build-image-$(IMAGE_NAME): check-docker
|
||||
ifeq "$(IMAGE_NAME)" ""
|
||||
@echo "Missing \`IMAGE_NAME\` variable." >&2; exit 2
|
||||
endif
|
||||
ifeq ($(USE_PROXY), true)
|
||||
docker build --network host -t $(IMAGE) --label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)" \
|
||||
-f $(DOCKERFILE) \
|
||||
$(_BASE_IMAGE_ARG) \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
--build-arg HTTP_PROXY=$(PROXY) \
|
||||
--build-arg HTTPS_PROXY=$(PROXY) \
|
||||
--build-arg no_proxy=$(NO_PROXY) \
|
||||
--build-arg NO_PROXY=$(NO_PROXY) .
|
||||
else
|
||||
docker build --network host -t $(IMAGE) --label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)" \
|
||||
-f $(DOCKERFILE) \
|
||||
$(_BASE_IMAGE_ARG) .
|
||||
endif
|
||||
ifeq ($(PUSH_IMAGE), true)
|
||||
docker push $(IMAGE)
|
||||
endif
|
||||
|
||||
pull-all-images:
|
||||
@./tools/pull-images.sh
|
||||
|
||||
pull-images:
|
||||
@./tools/pull-images.sh $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
dev-deploy:
|
||||
@./tools/gate/devel/start.sh $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
%:
|
||||
@:
|
||||
.PHONY: all build-image-$(IMAGE_NAME) build-image-% check-docker info
|
||||
|
@ -1,54 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
#NOTE: Lint and package chart
|
||||
: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
|
||||
#: ${PORTHOLE_PATH}:=""
|
||||
make -C ${OSH_INFRA_PATH} ceph-provisioners
|
||||
|
||||
#NOTE: Deploy command
|
||||
: ${OSH_EXTRA_HELM_ARGS:=""}
|
||||
tee /tmp/ceph-utility-config.yaml <<EOF
|
||||
endpoints:
|
||||
identity:
|
||||
namespace: openstack
|
||||
object_store:
|
||||
namespace: ceph
|
||||
ceph_mon:
|
||||
namespace: ceph
|
||||
network:
|
||||
public: 172.17.0.1/16
|
||||
cluster: 172.17.0.1/16
|
||||
deployment:
|
||||
storage_secrets: false
|
||||
ceph: false
|
||||
rbd_provisioner: false
|
||||
cephfs_provisioner: false
|
||||
client_secrets: true
|
||||
rgw_keystone_user_and_endpoints: false
|
||||
bootstrap:
|
||||
enabled: false
|
||||
conf:
|
||||
rgw_ks:
|
||||
enabled: true
|
||||
EOF
|
||||
helm upgrade --install ceph-utility-config ${OSH_INFRA_PATH}/ceph-provisioners \
|
||||
--namespace=utility \
|
||||
--values=/tmp/ceph-utility-config.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_CEPH_NS_ACTIVATE}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./${OSH_INFRA_PATH}/tools/deployment/common/wait-for-pods.sh utility
|
||||
|
||||
make ceph-utility
|
||||
helm upgrade --install ceph-utility ceph-utility \
|
||||
--namespace=utility
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./${OSH_INFRA_PATH}/tools/deployment/common/wait-for-pods.sh utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get -n utility jobs --show-all
|
||||
kubectl get -n utility secrets
|
||||
kubectl get -n utility configmaps
|
@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
#NOTE: Lint and package chart
|
||||
: ${OSH_INFRA_PATH:="../../openstack-helm-infra"}
|
||||
|
||||
make compute-utility
|
||||
|
||||
helm upgrade --install compute-utility compute-utility --namespace=utility
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./${OSH_INFRA_PATH}/tools/deployment/common/wait-for-pods.sh utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get -n utility jobs
|
||||
kubectl get -n utility secrets
|
||||
kubectl get -n utility configmaps
|
||||
kubectl get -n utility pods
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
#NOTE: Lint and package chart
|
||||
: ${OSH_INFRA_PATH:="../../openstack-helm-infra"}
|
||||
|
||||
typeset uc=mysqlclient-utility
|
||||
|
||||
make ${uc}
|
||||
helm upgrade --install ${uc} ${uc} --namespace=utility
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./${OSH_INFRA_PATH}/tools/deployment/common/wait-for-pods.sh utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get pods -n utility |grep ${uc}
|
||||
helm status ${uc}
|
||||
|
||||
helm test ${uc} --timeout 900
|
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
#NOTE: Lint and package chart
|
||||
: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
|
||||
|
||||
make openstack-utility
|
||||
|
||||
helm upgrade --install openstack-utility openstack-utility --namespace=utility
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./${OSH_INFRA_PATH}/tools/deployment/common/wait-for-pods.sh utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get pods --all-namespaces | grep openstack-utility
|
||||
helm status openstack-utility
|
||||
export OS_CLOUD=openstack_helm
|
||||
sleep 30 #NOTE(portdirect): Wait for ingress controller to update rules and restart Nginx
|
||||
openstack endpoint list
|
||||
helm test openstack-utility --timeout 900
|
@ -1,3 +1,17 @@
|
||||
# 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
|
||||
#
|
||||
# https://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:
|
||||
- include_vars: vars.yaml
|
||||
@ -46,8 +60,12 @@
|
||||
jump: ACCEPT
|
||||
become: True
|
||||
|
||||
- name: Debug tag generation inputs
|
||||
- name: Debug inputs
|
||||
block:
|
||||
- debug:
|
||||
var: distro_suffix
|
||||
- debug:
|
||||
var: image_name
|
||||
- debug:
|
||||
var: publish
|
||||
- debug:
|
||||
@ -75,20 +93,20 @@
|
||||
block:
|
||||
- make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: images
|
||||
target: "build-image-{{ image_name }}"
|
||||
params:
|
||||
DISTRO_SUFFIX: "{{ distro_suffix }}"
|
||||
IMAGE_NAME: "{{ image_name }}"
|
||||
IMAGE_TAG: "{{ item }}"
|
||||
with_items: "{{ image_tags.stdout_lines }}"
|
||||
|
||||
- shell: "docker images"
|
||||
register: docker_images
|
||||
|
||||
- debug:
|
||||
var: docker_images
|
||||
|
||||
become: True
|
||||
|
||||
- name: Publish images
|
||||
when: publish
|
||||
block:
|
||||
- docker_login:
|
||||
username: "{{ quay_credentials.username }}"
|
||||
@ -96,17 +114,18 @@
|
||||
registry_url: "https://quay.io/api/v1/"
|
||||
- make:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
target: images
|
||||
target: "build-image-{{ image_name }}"
|
||||
params:
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
DISTRO_SUFFIX: "{{ distro_suffix }}"
|
||||
DOCKER_REGISTRY: "quay.io"
|
||||
IMAGE_NAME: "{{ image_name }}"
|
||||
IMAGE_PREFIX: "airshipit"
|
||||
IMAGE_TAG: "{{ item }}"
|
||||
COMMIT: "{{ zuul.newrev | default('') }}"
|
||||
PUSH_IMAGE: "true"
|
||||
with_items: "{{ image_tags.stdout_lines }}"
|
||||
- shell: "docker images"
|
||||
register: docker_images
|
||||
- debug:
|
||||
var: docker_images
|
||||
when: publish
|
||||
become: True
|
@ -15,6 +15,10 @@
|
||||
- hosts: primary
|
||||
tasks:
|
||||
- name: Execute a Whitespace Linter check
|
||||
command: find . -not -path "*/\.*" -not -path "*/doc/build/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {} \;
|
||||
command: >
|
||||
find .
|
||||
-not -path "*/.git/*"
|
||||
-type f
|
||||
-exec egrep -l " +$" {} \;
|
||||
register: result
|
||||
failed_when: result.stdout != ""
|
@ -1,44 +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 -x
|
||||
|
||||
HELM=$1
|
||||
HELM_ARTIFACT_URL=${HELM_ARTIFACT_URL:-"https://storage.googleapis.com/kubernetes-helm/helm-v2.14.0-linux-amd64.tar.gz"}
|
||||
|
||||
|
||||
function install_helm_binary {
|
||||
if [[ -z "${HELM}" ]]
|
||||
then
|
||||
echo "No Helm binary target location."
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [[ -w "$(dirname ${HELM})" ]]
|
||||
then
|
||||
TMP_DIR=${BUILD_DIR:-$(mktemp -d)}
|
||||
curl -o "${TMP_DIR}/helm.tar.gz" "${HELM_ARTIFACT_URL}"
|
||||
pushd ${TMP_DIR}
|
||||
tar -xvzf helm.tar.gz
|
||||
cp "linux-amd64/helm" "helm"
|
||||
popd
|
||||
else
|
||||
echo "Cannot write to ${HELM}"
|
||||
exit -1
|
||||
fi
|
||||
}
|
||||
|
||||
install_helm_binary
|
@ -1,76 +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.
|
||||
#
|
||||
# Script to setup helm-toolkit and helm dep up the shipyard chart
|
||||
#
|
||||
HELM=$1
|
||||
HTK_REPO=${HTK_REPO:-"https://github.com/openstack/openstack-helm-infra"}
|
||||
HTK_PATH=${HTK_PATH:-""}
|
||||
HTK_STABLE_COMMIT=${HTK_COMMIT:-"200b5e902b3a176fbfbe669b6a10a254c9b50f5d"}
|
||||
DEP_UP_LIST=${DEP_UP_LIST:-"porthole"}
|
||||
BUILD_DIR=${BUILD_DIR:-$(mktemp -d)}
|
||||
|
||||
if [[ ! -z $(echo $http_proxy) ]]
|
||||
then
|
||||
export no_proxy=$no_proxy,127.0.0.1
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
||||
# Use ./helm as we expect this to be run in a already
|
||||
# configured build directory
|
||||
|
||||
function helm_serve {
|
||||
if [[ -d "$HOME/.helm" ]]; then
|
||||
echo ".helm directory found"
|
||||
else
|
||||
${HELM} init --client-only --skip-refresh
|
||||
fi
|
||||
if [[ -z $(curl --noproxy '*' -s 127.0.0.1:8879 | grep 'Helm Repository') ]]; then
|
||||
"${HELM}" serve & > /dev/null
|
||||
while [[ -z $(curl --noproxy '*' -s 127.0.0.1:8879 | grep 'Helm Repository') ]]; do
|
||||
sleep 1
|
||||
echo "Waiting for Helm Repository"
|
||||
done
|
||||
else
|
||||
echo "Helm serve already running"
|
||||
fi
|
||||
|
||||
if "${HELM}" repo list | grep -q "^stable" ; then
|
||||
"${HELM}" repo remove stable
|
||||
fi
|
||||
|
||||
${HELM} repo add local http://localhost:8879/charts
|
||||
}
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
pushd "$BUILD_DIR"
|
||||
git clone $HTK_REPO || true
|
||||
pushd openstack-helm-infra/$HTK_PATH
|
||||
git reset --hard "${HTK_STABLE_COMMIT}"
|
||||
|
||||
helm_serve
|
||||
# OSH Makefile is bugged, so ensure helm is in the path
|
||||
if [[ ${HELM} != "helm" ]]
|
||||
then
|
||||
export PATH=${PATH}:$(dirname ${HELM})
|
||||
fi
|
||||
|
||||
make helm-toolkit
|
||||
popd && popd
|
||||
for c in $DEP_UP_LIST
|
||||
do
|
||||
${HELM} dep up charts/$c
|
||||
done
|
@ -1,8 +1,10 @@
|
||||
# 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
|
||||
# https://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,
|
||||
@ -10,6 +12,21 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- porthole-lint
|
||||
- porthole-image-build-mysqlclient-utility
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- porthole-lint
|
||||
- porthole-image-build-mysqlclient-utility
|
||||
|
||||
post:
|
||||
jobs:
|
||||
- porthole-image-upload-mysqlclient-utility
|
||||
|
||||
- nodeset:
|
||||
name: airship-porthole-single-node
|
||||
nodes:
|
||||
@ -17,28 +34,28 @@
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: porthole-images-build
|
||||
parent: build-docker-image
|
||||
name: porthole-images
|
||||
abstract: true
|
||||
ansible-version: 2.8
|
||||
description: |
|
||||
irrelevant-files:
|
||||
- ^\.git.*
|
||||
- ^.*\.(example|md|rst)$
|
||||
- ^doc/.*
|
||||
- ^releasenotes/.*
|
||||
timeout: 3600
|
||||
timeout: 1800
|
||||
post-timeout: 1800
|
||||
run: tools/gate/playbooks/docker-image-build.yaml
|
||||
nodeset: airship-porthole-single-node
|
||||
vars:
|
||||
publish: false
|
||||
tags:
|
||||
dynamic:
|
||||
branch: true
|
||||
commit: false
|
||||
static:
|
||||
- latest
|
||||
|
||||
- job:
|
||||
name: porthole-images-upload
|
||||
parent: upload-docker-image
|
||||
abstract: true
|
||||
ansible-version: 2.8
|
||||
secrets:
|
||||
name: quay_credentials
|
||||
secret: quay_credentials
|
||||
pass-to-parent: true
|
||||
timeout: 3600
|
||||
name: porthole-lint
|
||||
description: |
|
||||
Lints files for trailing whitespace
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: airship-porthole-single-node
|
||||
|
||||
- secret:
|
||||
name: quay_credentials
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Copyright 2019 The Openstack-Helm Authors.
|
||||
#
|
||||
# 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.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- porthole-calicoctl-utility-lint-ws
|
||||
gate:
|
||||
jobs:
|
||||
- porthole-calicoctl-utility-lint-ws
|
||||
|
||||
- nodeset:
|
||||
name: porthole-calicoctl-utility-single-node
|
||||
nodes:
|
||||
- name: primary
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: porthole-calicoctl-utility-lint-ws
|
||||
description: |
|
||||
Lints all files by checking them for whitespace.
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: porthole-calicoctl-utility-single-node
|
@ -1,35 +0,0 @@
|
||||
# Copyright 2019 The Openstack-Helm Authors.
|
||||
#
|
||||
# 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.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- porthole-ceph-utility-lint-ws
|
||||
gate:
|
||||
jobs:
|
||||
- porthole-ceph-utility-lint-ws
|
||||
|
||||
- nodeset:
|
||||
name: porthole-ceph-utility-single-node
|
||||
nodes:
|
||||
- name: primary
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: porthole-ceph-utility-lint-ws
|
||||
description: |
|
||||
Lints all files by checking them for whitespace.
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: porthole-ceph-utility-single-node
|
@ -1,36 +0,0 @@
|
||||
# Copyright 2019 The Openstack-Helm Authors.
|
||||
#
|
||||
# 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.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- porthole-compute-utility-lint-ws
|
||||
gate:
|
||||
jobs:
|
||||
- porthole-compute-utility-lint-ws
|
||||
|
||||
- nodeset:
|
||||
name: porthole-compute-utility-single-node
|
||||
nodes:
|
||||
- name: primary
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: porthole-compute-utility-lint-ws
|
||||
description: |
|
||||
Lints all files by checking them for whitespace.
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: porthole-compute-utility-single-node
|
||||
|
@ -1,10 +1,10 @@
|
||||
# Copyright 2019 The Airship Authors.
|
||||
# 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
|
||||
# https://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,
|
||||
@ -12,64 +12,32 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- porthole-mysqlclient-lint-ws
|
||||
- porthole-mysqlclient-images-build
|
||||
|
||||
gate:
|
||||
jobs:
|
||||
- porthole-mysqlclient-lint-ws
|
||||
- porthole-mysqlclient-images-build
|
||||
|
||||
post:
|
||||
jobs:
|
||||
- porthole-mysqlclient-images-upload
|
||||
|
||||
- job:
|
||||
name: porthole-mysqlclient-lint-ws
|
||||
description: |
|
||||
Lints all files for trailing whitespace
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: airship-porthole-single-node
|
||||
|
||||
- job:
|
||||
name: porthole-mysqlclient-images-build
|
||||
parent: porthole-images-build
|
||||
description: Build mysqclient images
|
||||
vars: &mysqlclient_vars
|
||||
currentdate: "{{ now(utc=True,fmt='%Y%m%d') }}"
|
||||
docker_images:
|
||||
- context: Dockerfiles/mysqlclient-utility
|
||||
repository: porthole/mysqlclient-utility
|
||||
dockerfile: Dockerfile.ubuntu_xenial
|
||||
tags:
|
||||
- latest-ubuntu_xenial
|
||||
- "ubuntu_xenial-{{ currentdate }}"
|
||||
files: &mysqlclient_files
|
||||
- Dockerfiles/mysqlclient-utility/.*
|
||||
- zuul.d/mysqlclient-utility.yaml
|
||||
|
||||
- job:
|
||||
name: porthole-mysqlclient-images-upload
|
||||
timeout: 1800
|
||||
run: tools/gate/playbooks/docker-image-upload.yaml
|
||||
nodeset: airship-porthole-single-node
|
||||
secrets:
|
||||
- quay_credentials
|
||||
name: porthole-image-build-mysqlclient-utility
|
||||
parent: &parent porthole-images
|
||||
vars:
|
||||
image_name: &image_name mysqlclient-utility
|
||||
distro_suffix: &distro_suffix ubuntu_xenial
|
||||
files: &mysqlclient_files
|
||||
- ^Dockerfiles/mysqlclient-utility/.*$
|
||||
- ^install_mysqlclient_utility.sh$
|
||||
- ^mysqlclient-utility/.*$
|
||||
- ^Makefile$
|
||||
- ^tools/.*$
|
||||
- ^zuul.d/.*$
|
||||
|
||||
- job:
|
||||
name: porthole-image-upload-mysqlclient-utility
|
||||
parent: *parent
|
||||
secrets:
|
||||
- name: quay_credentials
|
||||
secret: quay_credentials
|
||||
pass-to-parent: true
|
||||
vars:
|
||||
image_name: *image_name
|
||||
distro_suffix: *distro_suffix
|
||||
publish: true
|
||||
tags:
|
||||
dynamic:
|
||||
branch: true
|
||||
commit: true
|
||||
static:
|
||||
- latest
|
||||
irrelevant-files:
|
||||
- ^charts/.*$
|
||||
- ^etc/.*$
|
||||
- ^tests/.*$
|
||||
- ^tools/.*$
|
||||
|
||||
files: *mysqlclient_files
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Copyright 2019 The Openstack-Helm Authors.
|
||||
#
|
||||
# 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.
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- porthole-openstack-utility-lint-ws
|
||||
gate:
|
||||
jobs:
|
||||
- porthole-openstack-utility-lint-ws
|
||||
|
||||
- nodeset:
|
||||
name: porthole-openstack-utility-single-node
|
||||
nodes:
|
||||
- name: primary
|
||||
label: ubuntu-xenial
|
||||
|
||||
- job:
|
||||
name: porthole-openstack-utility-lint-ws
|
||||
description: |
|
||||
Lints all files by checking them for whitespace.
|
||||
run: tools/gate/playbooks/zuul-linter.yaml
|
||||
timeout: 300
|
||||
nodeset: porthole-openstack-utility-single-node
|
Loading…
Reference in New Issue
Block a user