Commit 42db4f6d authored by Yori Fournier's avatar Yori Fournier
Browse files

add the building of pgapp, pgdata and wpdb

parent 75ad761e
Pipeline #1932 passed with stage
image: openshift/origin-cli
default:
tags:
- debian
timeout: 1h 00m
stages:
- build
variables:
OPENSHIFT_SERVER: https://${OPENSHIFT_IP}:${OPENSHIFT_PORT}/
OPENSHIFT_DOMAIN: apps.okd.aip.de
# Configure this variable in Secure Variables:
#OPENSHIFT_TOKEN:
#OPENSHIFT_PROJECT: python
.login_to_okd: &login_to_okd
- oc login "$OPENSHIFT_SERVER" --token="$OPENSHIFT_TOKEN" --insecure-skip-tls-verify
- oc project "$CI_PROJECT_NAME-$CI_PROJECT_ID" 2> /dev/null || oc new-project "$CI_PROJECT_NAME-$CI_PROJECT_ID"
.build_image: &build_image
- oc new-build --strategy=docker --binary --name "$APP" --to "build-$APP"
- oc start-build $APP --from-dir=./docker/$APP --follow
build-pgapp:
stage: build
variables:
APP: pgapp
DOCKER_FILE: dockerfile
APP_HOST: $CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
before_script:
- *login_to_okd
script:
- *build_image
build-pgdata:
stage: build
variables:
APP: pgdata
DOCKER_FILE: dockerfile
APP_HOST: $CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
before_script:
- *login_to_okd
script:
- *build_image
build-wpdb:
stage: build
variables:
APP: wpdb
DOCKER_FILE: dockerfile
APP_HOST: $CI_PROJECT_NAME-$CI_ENVIRONMENT_SLUG.$OPENSHIFT_DOMAIN
before_script:
- *login_to_okd
script:
- *build_image
FROM postgres:latest
ENV PATH="${PATH}:/opt:/vol/tools/shed"
RUN apt update -y && apt install -y \
postgresql-client
# create DB, user, permissions
# not necessary, but for sake of clarity
CMD ["postgres"]
FROM postgres:latest
ENV PATH="${PATH}:/opt:/vol/tools/shed"
RUN apt update -y && apt install -y \
postgresql-client
COPY ./opt/ /
# create DB, user, permissions
# not necessary, but for sake of clarity
CMD ["postgres"]
#!/bin/sh
postgres
#!/bin/bash
fol="${HOME}/source/testing/sql/postgres/"
role="daiquiri_data"
psql -U ${role} daiquiri_data <"${fol}/data.sql"
psql -U ${role} daiquiri_data <"${fol}/test.sql"
psql -U ${role} test_daiquiri_data <"${fol}/data.sql"
psql -U ${role} test_daiquiri_data <"${fol}/test.sql"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment