Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
indexers
editorial-content
Commits
57719a8e
Commit
57719a8e
authored
Mar 19, 2019
by
Alessandro CERIONI
Browse files
Added GitLab CI. Loading the configuration from environment variables.
parent
2637cf26
Pipeline
#3236
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
57719a8e
variables
:
GHOST_API
:
https://ghost-intothesky.alpha.grandlyon.com/ghost/api
#GHOST_ADMIN_API_KEY:
INDEXER__ES_URL
:
https://elastic2.alpha.grandlyon.com
INDEXER__ES_POSTS_INDEX
:
posts.ingest.v5
INDEXER__ES_PAGES_INDEX
:
pages.ingest.v5
REINDEXER__ES_SOURCE_URL
:
https://elastic2.alpha.grandlyon.com:443
REINDEXER__ES_DESTINATION_URL
:
https://elastic2.alpha.grandlyon.com
REINDEXER__SOURCE_POSTS_INDEX
:
posts.ingest.v5
REINDEXER__SOURCE_PAGES_INDEX
:
pages.ingest.v5
REINDEXER__DESTINATION_POSTS_INDEX
:
posts.v5
REINDEXER__DESTINATION_PAGES_INDEX
:
pages.v5
REINDEXER__POSTS_TEMPLATE_NAME
:
ghost-posts-template
REINDEXER__PAGES_TEMPLATE_NAME
:
ghost-pages-template
stages
:
-
build
-
deploy
build_development
:
stage
:
build
only
:
-
development
script
:
-
export TAG=dev
-
export CONTENT_INDEXER_BIND_PORT=4000
-
docker-compose build
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker-compose push
build_release
:
stage
:
build
only
:
-
tags
except
:
-
/^(?!master).+@/
script
:
-
export TAG=$(echo $CI_COMMIT_TAG | sed 's/v//g')
-
export CONTENT_INDEXER_BIND_PORT=4000
-
docker-compose build
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker-compose push
deploy_development
:
stage
:
deploy
only
:
-
development
script
:
-
export TAG=dev
-
export CONTENT_INDEXER_BIND_PORT=4000
-
envsubst < config.template.yml > config.yml
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker-compose pull
-
docker-compose --project-name service-email-${TAG} up -d --force-recreate
environment
:
name
:
development
deploy_staging
:
stage
:
deploy
only
:
-
development
when
:
manual
script
:
-
export TAG=staging
-
export CONTENT_INDEXER_BIND_PORT=4100
-
envsubst < config.template.yml > config.yml
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
TAG=dev docker-compose pull
-
docker tag $CI_REGISTRY/refonte-data/service-email:dev $CI_REGISTRY/refonte-data/service-email:${TAG}
-
docker push $CI_REGISTRY/refonte-data/service-email:${TAG}
-
docker-compose --project-name service-email-${TAG} up -d --force-recreate
environment
:
name
:
staging
config.template.yaml
View file @
57719a8e
content_getter
:
# wp_api: <the_wordpress_api_url>
# wp_username: <the_wordpress_username>
# wp_password: <the_wordpress_password>
ghost_api
:
<the_ghost_api_url, ex. https://your-domain/ghost/api>
ghost_admin_api_key
:
<the_ghost_admin_api_key>
ghost_api
:
${GHOST_API}
ghost_admin_api_key
:
${GHOST_ADMIN_API_KEY}
indexer
:
url
:
<the_elasticsearch_url>
url
:
${INDEXER__ES_URL}
index
:
posts
:
<the_elasticsearch_index_for_posts>
pages
:
<the_elasticsearch_index_for_pages>
posts
:
${INDEXER__ES_POSTS_INDEX}
pages
:
${INDEXER__ES_PAGES_INDEX}
reindexer
:
source_url
:
<the_source_elasticsearch_url>
destination_url
:
<the_destination_elasticsearch_url>
source_url
:
${REINDEXER__ES_SOURCE_URL}
destination_url
:
${REINDEXER__ES_DESTINATION_URL}
source_index
:
posts
:
<the_source_elasticsearch_index_for_posts>
pages
:
<the_source_elasticsearch_index_for_pages>
posts
:
${REINDEXER__SOURCE_POSTS_INDEX}
pages
:
${REINDEXER__SOURCE_PAGES_INDEX}
destination_index
:
posts
:
<the_destination_elasticsearch_index_for_posts>
pages
:
<the_destination_elasticsearch_index_for_pages>
posts
:
${REINDEXER__DESTINATION_POSTS_INDEX}
pages
:
${REINDEXER__DESTINATION_PAGES_INDEX}}
template
:
posts
:
<the_name_to_use_for_the_elasticsearch_dynamic_template_for_posts>
pages
:
<the_name_to_use_for_the_elasticsearch_dynamic_template_for_pages>
posts
:
${REINDEXER__POSTS_TEMPLATE_NAME}
pages
:
${REINDEXER__PAGES_TEMPLATE_NAME}
docker-compose.yml
View file @
57719a8e
...
...
@@ -3,7 +3,8 @@ version: "3.0"
services
:
api
:
build
:
.
image
:
registry.alpha.grandlyon.com/refonte-data/content-indexer:${TAG}
ports
:
-
8000
:8000
-
${CONTENT_INDEXER_BIND_PORT}
:8000
volumes
:
-
./config.yaml:/app/config.yaml
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment