Updates to armada
- update github.com ssh host key - fix bionic image upload to Quay.io - fix armada_image_run.sh script - fix armada config presense Change-Id: I2af589baabb9e76e2e1a29ff266d6c3b7ae412e3
This commit is contained in:
parent
966742ec74
commit
275dc4506f
@ -36,8 +36,6 @@
|
||||
- armada-airskiff-deploy-bionic
|
||||
post:
|
||||
jobs:
|
||||
- armada-docker-build-gate-ubuntu_bionic
|
||||
- armada-docker-build-gate-ubuntu_focal
|
||||
- armada-docker-publish-ubuntu_focal
|
||||
- armada-docker-publish-ubuntu_bionic
|
||||
- armada-upload-git-mirror
|
||||
@ -222,15 +220,15 @@
|
||||
git_mirror_repository: airshipit/armada
|
||||
secrets:
|
||||
- name: git_mirror_credentials
|
||||
secret: armada-airshipit-github-secret
|
||||
secret: armada-airshipit-github-secret-2023-03-23
|
||||
pass-to-parent: true
|
||||
|
||||
- secret:
|
||||
name: armada-airshipit-github-secret
|
||||
name: armada-airshipit-github-secret-2023-03-23
|
||||
data:
|
||||
user: git
|
||||
host: github.com
|
||||
host_key: github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
|
||||
host_key: github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=
|
||||
ssh_key: !encrypted/pkcs1-oaep
|
||||
- Ctq8uiBKJa7YVWphZu4y/M7cajpPKKIx9kc0xM8fIfkUBWG++JXFjvqVMn1wolfBCbfw5
|
||||
fSqNyEazE+Vr8Gk/9iwpgD13b7O+ar7CfY/HmkjeqRQYqGDEsBzCKEksK4zjzzRBufqpC
|
||||
|
@ -88,6 +88,7 @@ RUN set -ex \
|
||||
/usr/share/doc-base
|
||||
|
||||
COPY . ./
|
||||
COPY etc/armada /etc/armada
|
||||
|
||||
# Setting the version explicitly for PBR
|
||||
ENV PBR_VERSION 0.8.0
|
||||
@ -95,7 +96,6 @@ ENV PATH=$PATH:/usr/bin/git
|
||||
ENV GIT_PYTHON_GIT_EXECUTABLE=/usr/bin/git
|
||||
|
||||
RUN \
|
||||
mv etc/armada /etc/ && \
|
||||
chown -R armada:users . && \
|
||||
python3 setup.py install
|
||||
|
||||
|
@ -88,12 +88,12 @@ RUN set -ex \
|
||||
/usr/share/doc-base
|
||||
|
||||
COPY . ./
|
||||
COPY etc/armada /etc/armada
|
||||
|
||||
# Setting the version explicitly for PBR
|
||||
ENV PBR_VERSION 0.8.0
|
||||
|
||||
RUN \
|
||||
mv etc/armada /etc/ && \
|
||||
chown -R armada:users . && \
|
||||
python3 setup.py install
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
|
||||
# Copyright 2017 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.
|
||||
@ -13,49 +12,37 @@
|
||||
# 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.
|
||||
|
||||
IMAGE=$1
|
||||
|
||||
#
|
||||
set -x
|
||||
|
||||
# Create container
|
||||
function create {
|
||||
docker run \
|
||||
-v $(pwd)/etc:/etc \
|
||||
-d \
|
||||
--name armada-api-test \
|
||||
-p 127.0.0.1:8000:8000 \
|
||||
${IMAGE} \
|
||||
server
|
||||
}
|
||||
IMAGE=$1
|
||||
USE_PROXY=${USE_PROXY:-false}
|
||||
CONTAINER_NAME=armada_test_$(date +%Y%m%d%H%M%s%s)
|
||||
|
||||
# Verify container was successfully created
|
||||
# If not successful, print out logs
|
||||
function health_check {
|
||||
GOOD="HTTP/1.1 204 No Content"
|
||||
if curl\
|
||||
-m 5 \
|
||||
-v \
|
||||
--silent \
|
||||
127.0.0.1:8000/api/v1.0/health \
|
||||
--stderr - \
|
||||
| grep "$GOOD"
|
||||
then
|
||||
echo "Health Check Success"
|
||||
exit 0
|
||||
else
|
||||
echo "Failed Health Check"
|
||||
docker logs armada-api-test
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
docker create \
|
||||
-p 8000:8000 \
|
||||
--name ${CONTAINER_NAME} ${IMAGE}
|
||||
|
||||
# Remove container
|
||||
function cleanup {
|
||||
docker rm -fv armada-api-test
|
||||
}
|
||||
docker start ${CONTAINER_NAME} &
|
||||
sleep 5
|
||||
|
||||
trap cleanup EXIT
|
||||
# If the image build pipeline is running in a pod/docker (docker-in-docker),
|
||||
# we'll need to exec into the nested container's network namespace to acces the
|
||||
# armada api.
|
||||
GOOD="HTTP/1.1 204 No Content"
|
||||
RESULT="$(curl -i 'http://127.0.0.1:8000/api/v1.0/health' --noproxy '*' | tr '\r' '\n' | head -1)"
|
||||
if [[ "${RESULT}" != "${GOOD}" ]]; then
|
||||
if docker exec -t ${CONTAINER_NAME} /bin/bash -c "curl -i 'http://127.0.0.1:8000/api/v1.0/health' --noproxy '*' | tr '\r' '\n' | head -1 "; then
|
||||
RESULT="${GOOD}"
|
||||
fi
|
||||
fi
|
||||
|
||||
create
|
||||
health_check
|
||||
docker stop ${CONTAINER_NAME}
|
||||
docker logs ${CONTAINER_NAME}
|
||||
docker rm ${CONTAINER_NAME}
|
||||
|
||||
if [[ ${RESULT} == ${GOOD} ]]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user