Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check to make sure schema has the right version #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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