Skip to content

Commit

Permalink
chore (deps): bump sipi version (#1794)(DSP-1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
subotic committed Jan 25, 2021
1 parent 48d77cd commit 69ae7fd
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Expand Up @@ -205,7 +205,9 @@ jobs:
docker system prune --all --force --volumes
df -h
- name: run API integration tests
run: make test-it
run: |
make test-docker
make test-it
- name: Disk Free After
run: |
df -h
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -55,3 +55,4 @@ dump.rdb
/site/
dependencies.txt
/client-test-data.zip
/db_staging_dump.trig
14 changes: 14 additions & 0 deletions Makefile
Expand Up @@ -218,6 +218,10 @@ stack-db-only: docker-build-knora-jena-fuseki-image env-file ## starts only fuse
## Test Targets
#################################

.PHONY: test-docker
test-docker: docker-build ## runs Docker image tests
bazel test //docker/...

.PHONY: test-webapi
test-webapi: docker-build ## runs all dsp-api tests.
bazel test //webapi/...
Expand Down Expand Up @@ -299,6 +303,16 @@ init-db-test-unit-minimal: stack-down-delete-volumes stack-db-only ## initialize
@echo $@
@$(MAKE) -C webapi/scripts fuseki-init-knora-test-unit-minimal

db_staging_dump.trig:
@echo $@
@curl -X GET -H "Accept: application/trig" -u "admin:${DB_STAGING_PASSWORD}" "https://db.staging.dasch.swiss/dsp-repo" > "db_staging_dump.trig"

.PHONY: init-db-test-from-staging
init-db-test-from-staging: db_staging_dump.trig init-db-test-empty ## init local database with data from staging
@echo $@
@curl -X POST -H "Content-Type: application/sparql-update" -d "DROP ALL" -u "admin:test" "http://localhost:3030/knora-test"
@curl -X POST -H "Content-Type: application/trig" --data-binary "@${CURRENT_DIR}/db_staging_dump.trig" -u "admin:test" "http://localhost:3030/knora-test"

#################################
## Other
#################################
Expand Down
8 changes: 4 additions & 4 deletions WORKSPACE
Expand Up @@ -237,22 +237,22 @@ container_pull(
)

# get sipi
load("//third_party:versions.bzl", "SIPI_REPOSITORY", "SIPI_TAG", "SIPI_IMAGE_DIGEST")
load("//third_party:versions.bzl", "SIPI_REPOSITORY", "SIPI_VERSION", "SIPI_IMAGE_DIGEST")
container_pull(
name = "sipi",
registry = "docker.io",
repository = SIPI_REPOSITORY,
tag = SIPI_TAG,
tag = SIPI_VERSION,
digest = SIPI_IMAGE_DIGEST,
)

# get fuseki
load("//third_party:versions.bzl", "FUSEKI_REPOSITORY", "FUSEKI_TAG", "FUSEKI_IMAGE_DIGEST")
load("//third_party:versions.bzl", "FUSEKI_REPOSITORY", "FUSEKI_VERSION", "FUSEKI_IMAGE_DIGEST")
container_pull(
name = "jenafuseki",
registry = "docker.io",
repository = FUSEKI_REPOSITORY,
tag = FUSEKI_TAG,
tag = FUSEKI_VERSION,
digest = FUSEKI_IMAGE_DIGEST,
)

Expand Down
7 changes: 7 additions & 0 deletions docker/knora-sipi/BUILD.bazel
Expand Up @@ -32,3 +32,10 @@ container_push(
# cmd = "docker load -i $(location //docker/knora-sipi:image) >$@",
# outs = ["build-output.txt"],
#)

# for documentation of yaml, please see https://github.com/GoogleContainerTools/container-structure-test
container_test(
name = "sipi_image_test",
configs = ["sipi_image_test_config.yaml"],
image = ":image",
)
24 changes: 24 additions & 0 deletions docker/knora-sipi/sipi_image_test_config.yaml
@@ -0,0 +1,24 @@
schemaVersion: 2.0.0

metadataTest:
entrypoint: ['/sipi/sipi']
cmd: [
'--config=/sipi/config/sipi.config.lua'
]

fileExistenceTests:
- name: 'sipi.binary'
path: '/sipi/sipi'
shouldExist: true

- name: 'sipi.config.lua'
path: '/sipi/config/sipi.config.lua'
shouldExist: true

- name: 'sipi.init.lua'
path: '/sipi/config/sipi.init.lua'
shouldExist: true

- name: 'test.html'
path: '/sipi/server/test.html'
shouldExist: true
3 changes: 1 addition & 2 deletions sipi/Makefile
Expand Up @@ -6,8 +6,7 @@ print-env-file: env-file ## prints the env file used by sipi

.PHONY: env-file
env-file: ## write the env file used by sipi
@echo SIPI_IMAGE=$(SIPI_IMAGE) > .env
@echo DOCKERHOST=$(DOCKERHOST) >> .env
@echo DOCKERHOST=$(DOCKERHOST) > .env

.PHONY: up
up: env-file ## start sipi
Expand Down
4 changes: 2 additions & 2 deletions sipi/docker-compose.yml
Expand Up @@ -3,7 +3,7 @@ version: '3'
services:
# sipi using default (production-like) configuration with additional routes for testing
sipi:
image: ${SIPI_IMAGE}
image: bazel/docker/knora-sipi:image
container_name: sipi
ports:
- "1024:1024"
Expand All @@ -25,7 +25,7 @@ services:

# sipi using configuration which disables authentication
sipi-no-auth:
image: ${SIPI_IMAGE}
image: bazel/docker/knora-sipi:image
container_name: sipi-no-auth
ports:
- "1024:1024"
Expand Down
8 changes: 3 additions & 5 deletions third_party/versions.bzl
Expand Up @@ -8,14 +8,12 @@ METRICS_VERSION = "4.0.1"

# SIPI - digest takes precedence!
SIPI_REPOSITORY = "daschswiss/sipi"
SIPI_VERSION = "3.0.0-rc.9"
SIPI_TAG = "v" + SIPI_VERSION
SIPI_VERSION = "3.0.3"
SIPI_IMAGE = SIPI_REPOSITORY + ":" + SIPI_VERSION
SIPI_IMAGE_DIGEST = "sha256:fdb962adb9a08bfcabac0e01b31979c6612e5b59afae34e56d8916b4ca57aa0d"
SIPI_IMAGE_DIGEST = "sha256:54d1cef3b923d87fa0feaf259b44e6b683a5e94392bc4b94b35685cffc7a9ca1"

# Jena Fuseki - digest takes precedence!
FUSEKI_REPOSITORY = "daschswiss/apache-jena-fuseki"
FUSEKI_VERSION = "1.0.5" # contains Fuseki 3.16
FUSEKI_TAG = FUSEKI_VERSION
FUSEKI_IMAGE = FUSEKI_REPOSITORY + ":" + FUSEKI_TAG
FUSEKI_IMAGE = FUSEKI_REPOSITORY + ":" + FUSEKI_VERSION
FUSEKI_IMAGE_DIGEST = "sha256:5caba3d092ccc04fe8dc988137d97c012b020eeb649f439511429d6b4ae467ec"
4 changes: 0 additions & 4 deletions vars.mk
@@ -1,7 +1,3 @@
SIPI_VERSION := v3.0.0-rc.3
SIPI_REPOSITORY := daschswiss/sipi
SIPI_IMAGE := $(SIPI_REPOSITORY):$(SIPI_VERSION)

FUSEKI_HEAP_SIZE := 3G

KNORA_WEBAPI_DB_CONNECTIONS := 2
Expand Down

0 comments on commit 69ae7fd

Please sign in to comment.