Update .gitlab-ci.yml file
adding search-engine
This commit is contained in:
parent
2047873de7
commit
15533a412e
@ -2,11 +2,16 @@ variables:
|
||||
INSTANCE: 'Writerside/in'
|
||||
ARTIFACT: 'webHelpIN2-all.zip'
|
||||
DOCKER_VERSION: '241.16003'
|
||||
ALGOLIA_APP_NAME: 'IH6YW1953U'
|
||||
ALGOLIA_INDEX_NAME: 'ZUSAMMENFASSUNGEN'
|
||||
CONFIG_JSON_PRODUCT: 'IN'
|
||||
CONFIG_JSON_VERSION: '1.0'
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
- search
|
||||
|
||||
build:
|
||||
stage: build
|
||||
@ -47,4 +52,34 @@ pages:
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 1 week
|
||||
|
||||
|
||||
search:
|
||||
stage: search
|
||||
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
|
||||
dependencies:
|
||||
- build
|
||||
- test
|
||||
- pages
|
||||
script:
|
||||
- echo "Checking contents of the public directory..."
|
||||
- ls -la public
|
||||
- if [ -z "$ALGOLIA_KEY" ]; then
|
||||
echo "ALGOLIA_KEY is not set in Gitlab secrets";
|
||||
exit 1;
|
||||
fi
|
||||
- echo "ALGOLIA_KEY is set"
|
||||
- PROJECT_ID=$(echo $INSTANCE | cut -d'/' -f2 | tr '[:lower:]' '[:upper:]')
|
||||
- ALGOLIA_ARTIFACT="algolia-indexes-${PROJECT_ID}.zip"
|
||||
- echo "ALGOLIA_ARTIFACT is $ALGOLIA_ARTIFACT"
|
||||
- if [ ! -f "public/$ALGOLIA_ARTIFACT" ]; then
|
||||
echo "Artifacts file public/$ALGOLIA_ARTIFACT not found!";
|
||||
exit 1;
|
||||
fi
|
||||
- unzip -O UTF-8 public/$ALGOLIA_ARTIFACT -d algolia-indexes
|
||||
- env "algolia-key=$ALGOLIA_KEY" java -jar /opt/builder/help-publication-agent.jar update-index --application-name $ALGOLIA_APP_NAME --index-name $ALGOLIA_INDEX_NAME --product $CONFIG_JSON_PRODUCT --version $CONFIG_JSON_VERSION --index-directory algolia-indexes/ 2>&1 | tee algolia-update-index-log.txt
|
||||
artifacts:
|
||||
paths:
|
||||
- algolia-update-index-log.txt
|
||||
expire_in: 1 week
|
Loading…
x
Reference in New Issue
Block a user