Build container images

So that we can do a fully containerized deployment, build images
based on Apache.

Change-Id: Ia3099370c86f02dc0000b7ec81c5e20594d180a7
This commit is contained in:
Monty Taylor 2019-12-04 10:33:47 -06:00
parent c445307dc2
commit 9834cbd75f
2 changed files with 82 additions and 0 deletions

View File

@ -1,3 +1,51 @@
- secret:
name: storyboard-webclient-opendev-dockerhub
data:
username: opendevzuul
password: !encrypted/pkcs1-oaep
- B5wZLst+L/wCwsJp0gizyokxuGkVpcPNJ2aOeDqR0bO4wIZYwo0S7fO1MeD03QfGNGVOF
McOtIGCFk5GY4a5lnOxbt6xGvqGWNKD8UgEIiHcEHGE8tiVOaG80dEXe8sZvGLh7rXIEV
sSRrKUCpxVEVzlbf6dcCtGS4O5j1jliMIwzbbILzk2eV0iIWiOo8cbmG0cqHNICcczSRG
5vLXEKpJH5q98XhQ99q42hiRfdhs6fYCiwQdi+Y4eLdsKvg8dkaT4pMYMLlHXiM5SnNmg
DVVPmEYF7aDZ6waT+xvOnBN+I5jApkppbSCWk5osugsz8dESGl3uIXkkHSsyeIa/zKUMt
AaLX2ic7jopBMbDtOGk+i2Lb3EiKPryzwSG6PUxWlStN7S7Nz7wRpKB9qvG7I/trFwb1c
3rhMLwDT6WYN9+EdjHYHiZj5hWB7gJgDQpqa+0hgawfSFj5/QdVPrnNHrjf5p+0ZdrAWX
SkIuz2DZuSwbFHF1pgQTSHZ7CgXatYc2MLMyoRNFU7PPgZlxSxj2G3IHCaHjLhOxGmcmq
8RJgB0SzbguihNTtoCc58n0hSGx86cYzGfuOGUjrsayeLGiO/lypLLyVFP6+ca9PxnScf
8FrlQjGmSK+etzCKlE2dpZFtiGU17yysrI2OaLYf6xzkG74SkQgiVtOKSvKWbA=
- job:
name: storyboard-webclient-build-opendev-image
parent: opendev-build-docker-image
dependencies: opendev-buildset-registry
description: Build OpenDev Docker images for storyboard webclient
vars: &storyboard_webclient_opendev_image_vars
zuul_work_dir: src/opendev.org/opendev/storyboard-webclient
docker_images:
- context: .
repository: opendevorg/storyboard-webclient
target: storyboard-webclient
- job:
name: storyboard-webclient-upload-opendev-image
parent: opendev-upload-docker-image
description: Build OpenDev storyboard-webclient Docker images and upload to Docker Hub.
vars: *storyboard_webclient_opendev_image_vars
secrets:
- name: docker_credentials
secret: storyboard-webclient-opendev-dockerhub
pass-to-parent: true
- job:
name: storyboard-webclient-promote-opendev-image
parent: opendev-promote-docker-image
description: Promote previously uploaded storyboard-webclient Docker images.
vars: *storyboard_webclient_opendev_image_vars
secrets:
- name: docker_credentials
secret: storyboard-webclient-opendev-dockerhub
pass-to-parent: true
- job:
name: storyboard-webclient-nodejs-npm8-run-test-functional
parent: nodejs-npm-run-test
@ -39,6 +87,8 @@
javascript_content_dir: build
npm_command: draft
node_version: 8
- opendev-buildset-registry
- storyboard-webclient-build-opendev-image
gate:
jobs:
- nodejs-npm-run-lint:
@ -52,8 +102,13 @@
javascript_content_dir: build
npm_command: draft
node_version: 8
- opendev-buildset-registry
- storyboard-webclient-upload-opendev-image
post:
jobs:
- publish-openstack-javascript-content:
vars:
node_version: 8
promote:
jobs:
- storyboard-webclient-promote-opendev-image

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
# Copyright (c) 2019 Red Hat, Inc.
#
# 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.
FROM docker.io/library/node:10 as builder
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN yarn install --production=false
RUN npm rebuild node-sass --force
RUN npm run-script build
FROM docker.io/library/httpd:2.4 as storyboard-webclient
COPY --from=builder /usr/src/app/build/ /usr/local/apache2/htdocs/