Skip to content

Commit

Permalink
Add check to make sure schema has the right version
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 13, 2024
1 parent 8bc061e commit 24a1554
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,24 @@ jobs:
run: |
cd solr-${{ inputs.solr_version }}
make build CKAN_VERSION=${{ inputs.ckan_version }} CKAN_BRANCH=${{ inputs.ckan_branch }}
- name: Assert the image has the right schema version
run: |
VERSION_IN_SCHEMA=$(
docker run --rm \
ckan/ckan-solr:${{ inputs.ckan_version }}-solr${{ inputs.solr_version }} \
grep -o "<schema name=\"ckan-[0-9]\.[0-9]*" /opt/solr/server/solr/configsets/ckan/conf/managed-schema | cut -d'-' -f2
)
if [ "$VERSION_IN_SCHEMA" != "${{ inputs.ckan_version }}" ]; then
echo "Version in schema $VERSION_IN_SCHEMA does not match CKAN version ${{ inputs.ckan_version }}"
exit 1
fi
- name: Run the built image
run: |
docker run --name ckan-solr -p 8983:8983 -d ckan/ckan-solr:${{ inputs.ckan_version }}-solr${{ inputs.solr_version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down

0 comments on commit 24a1554

Please sign in to comment.