Skip to content

Commit

Permalink
feat: Adds execution of elasticsearch index building
Browse files Browse the repository at this point in the history
Adds execution of elasticsearch index building
  • Loading branch information
erkenes committed Oct 11, 2022
1 parent ca61dbc commit e1d92e6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/InitNeos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ on:
default: false
required: false
type: boolean
exec_elasticsearch_index:
default: false
required: false
type: boolean
exec_elasticsearch_queue:
default: false
required: false
type: boolean
secrets:
HOST:
required: true
Expand Down Expand Up @@ -112,3 +120,33 @@ jobs:
then
exit 1
fi
- name: Build Elasticsearch Index (Classic)
if: ${{ inputs.exec_elasticsearch_index }}
uses: appleboy/ssh-action@c732d38392bd59adadcb5e688fb1f7f1d29c6951
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.AVENCY_SSH_KEY }}
timeout: 120s
script: |
phpContainerID=$(docker ps -aqf "name=${{ inputs.containername }}")
docker exec $phpContainerID su -c "/data/flow nodeindex:build --workspace live" -s /bin/sh www-data
if [ $? != 0 ]
then
exit 1
fi
- name: Build Elasticsearch Index (Queue)
if: ${{ inputs.exec_elasticsearch_queue }}
uses: appleboy/ssh-action@c732d38392bd59adadcb5e688fb1f7f1d29c6951
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.AVENCY_SSH_KEY }}
timeout: 120s
script: |
phpContainerID=$(docker ps -aqf "name=${{ inputs.containername }}")
docker exec $phpContainerID su -c "/data/flow nodeindexqueue:build --workspace live" -s /bin/sh www-data
if [ $? != 0 ]
then
exit 1
fi
12 changes: 11 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
exec_migrate_database: true
exec_publish_resource: true
exec_command_migration: false
exec_elasticsearch_index: false
exec_elasticsearch_queue: false
secrets:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
Expand Down Expand Up @@ -54,4 +56,12 @@ Publishes the static resources.

#### exec_command_migration

Executes pending command migrations. [Requires additional Package](https://github.com/swisscomeventandmedia/Swisscom.CommandMigration)
Executes pending command migrations. [Requires additional Package](https://github.com/swisscomeventandmedia/Swisscom.CommandMigration)

#### exec_elasticsearch_index

Builds an ElasticSearch Index. Can not be used with `exec_elasticsearch_queue`. [Requires additional Package](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryAdaptor)

#### exec_elasticsearch_queue

Builds an Elasticsearch Queue Index. Can not be used with `exec_elasticsearch_index`. [Requires additional Package](https://github.com/Flowpack/Flowpack.ElasticSearch.ContentRepositoryQueueIndexer)

0 comments on commit e1d92e6

Please sign in to comment.