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

build: bump sipi version (DEV-188) #1931

Merged
merged 13 commits into from Nov 3, 2021
88 changes: 10 additions & 78 deletions .github/workflows/main.yml
Expand Up @@ -40,17 +40,9 @@ jobs:
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
run: df -h
- name: Run build everything
run: make build
- name: Disk Free After
run: |
df -h
docker system df

# ------------------------------------------
# ------------------------------------------
Expand All @@ -71,10 +63,7 @@ jobs:
run: sudo apt-get install ca-certificates-java expect redis-tools unzip
- name: Generate api-client-test-data
run: make client-test-data
- name: Disk Free After
run: |
df -h
docker system df

# ------------------------------------------
# ------------------------------------------

Expand Down Expand Up @@ -117,18 +106,8 @@ jobs:
run: |
make env-file
make print-env-file
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: Run API unit tests
run: make test-unit
- name: Disk Free After
run: |
df -h
docker system df

api-e2e-tests:
name: API E2E Tests
Expand Down Expand Up @@ -172,18 +151,8 @@ jobs:
run: |
make env-file
make print-env-file
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: run API E2E tests
run: make test-e2e
- name: Disk Free After
run: |
df -h
docker system df

api-integration-tests:
name: API Integration Tests
Expand Down Expand Up @@ -224,20 +193,10 @@ jobs:
run: |
make env-file
make print-env-file
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: run API integration tests
run: |
make test-docker
make test-it
- name: Disk Free After
run: |
df -h
docker system df

upgrade-integration-tests:
name: Upgrade Integration Tests
Expand Down Expand Up @@ -276,18 +235,8 @@ jobs:
${{ runner.OS }}-
- name: install requirements
run: sudo apt-get install expect
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: test repository upgrade
run: make test-repository-upgrade
- name: Disk Free After
run: |
df -h
docker system df

docs-build-test:
name: Docs Build Test
Expand All @@ -312,18 +261,8 @@ jobs:
npm install --global typedoc
npm install --global @bazel/bazelisk
sudo apt-get install graphviz
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: run docs build
run: make docs-build
- name: Disk Free After
run: |
df -h
docker system df

release-please:
name: Prepare next release
Expand All @@ -336,7 +275,14 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
release-type: simple
package-name: dsp-api
changelog-types: '[{"type": "feat", "section": "Enhancements", "hidden": false }, {"type": "fix", "section": "Bug Fixes", "hidden": false }, {"type": "chore", "section": "Maintenance", "hidden": false }, {"type": "refactor", "section": "Maintenance", "hidden": false }, {"type": "docs", "section": "Documentation", "hidden": false }]'
changelog-types: '[
{"type": "feat", "section": "Enhancements", "hidden": false },
{"type": "fix", "section": "Bug Fixes", "hidden": false },
{"type": "build", "section": "Maintenance", "hidden": false },
{"type": "chore", "section": "Maintenance", "hidden": false },
{"type": "refactor", "section": "Maintenance", "hidden": false },
{"type": "docs", "section": "Documentation", "hidden": false }
]'

# publish only on release
publish:
Expand Down Expand Up @@ -394,20 +340,10 @@ jobs:
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Disk Free
run: |
df -h
docker system df
docker system prune --all --force --volumes
df -h
- name: Build and publish all images to Dockerhub
run: |
echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
make docker-publish
- name: Disk Free After
run: |
df -h
docker system df

# google chat notification about release
notification:
Expand Down Expand Up @@ -455,7 +391,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CUSTOM_DOMAIN: docs-api.dasch.swiss
REQUIREMENTS: docs/requirements.txt
- name: Disk Free After
run: |
df -h
docker system df
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1 @@
* @subotic
23 changes: 9 additions & 14 deletions WORKSPACE
@@ -1,7 +1,7 @@
workspace(name = "io_dasch_dsp_api")

# load http_archive method
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

#####################################
# Skylib #
Expand All @@ -20,9 +20,9 @@ http_archive(
# Docker #
#####################################

rules_docker_version = "0.19.0"
rules_docker_version = "0.20.0" # 12.10.2021

rules_docker_version_sha256 = "1f4e59843b61981a96835dc4ac377ad4da9f8c334ebe5e0bb3f58f80c09735f4"
rules_docker_version_sha256 = "92779d3445e7bdc79b961030b996cb0c91820ade7ffa7edca69273f404b085d5"

http_archive(
name = "io_bazel_rules_docker",
Expand Down Expand Up @@ -60,32 +60,29 @@ container_pull(
# get openjdk
container_pull(
name = "openjdk11",
digest = "sha256:0e51b455654bd162c485a6a6b5b120cc82db453d9265cc90f0c4fb5d14e2f62e",
digest = "sha256:8f0a99f12dfc7ff2524f1550ffd6ab432597cd20417413b46cb96c7b9ec2b7f0", # 16.10.2021
registry = "docker.io",
repository = "adoptopenjdk",
tag = "11-jre-hotspot-bionic",
repository = "eclipse-temurin",
# tag = "11-jre-focal", # Ubuntu 20.04
)

# get sipi
load("//third_party:versions.bzl", "SIPI_IMAGE_DIGEST", "SIPI_REPOSITORY", "SIPI_VERSION")
load("//third_party:versions.bzl", "FUSEKI_IMAGE_DIGEST", "FUSEKI_REPOSITORY", "SIPI_IMAGE_DIGEST", "SIPI_REPOSITORY")

container_pull(
name = "sipi",
digest = SIPI_IMAGE_DIGEST,
registry = "docker.io",
repository = SIPI_REPOSITORY,
tag = SIPI_VERSION,
# tag = SIPI_VERSION,
)

# get fuseki
load("//third_party:versions.bzl", "FUSEKI_IMAGE_DIGEST", "FUSEKI_REPOSITORY", "FUSEKI_VERSION")

container_pull(
name = "jenafuseki",
digest = FUSEKI_IMAGE_DIGEST,
registry = "docker.io",
repository = FUSEKI_REPOSITORY,
tag = FUSEKI_VERSION,
# tag = FUSEKI_VERSION,
)

#####################################
Expand Down Expand Up @@ -230,8 +227,6 @@ http_archive(
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

# bazel buildtools providing buildifier
http_archive(
name = "com_github_bazelbuild_buildtools",
Expand Down
4 changes: 3 additions & 1 deletion sipi/scripts/file_info.lua
Expand Up @@ -28,6 +28,7 @@ local AUDIO_MP4 = "audio/mp4"
local AUDIO_WAV = "audio/wav"
local AUDIO_X_WAV = "audio/x-wav"
local AUDIO_VND_WAVE = "audio/vnd.wave"
local APPLICATION_CSV = "application/csv"
local APPLICATION_PDF = "application/pdf"
local APPLICATION_DOC = "application/msword"
local APPLICATION_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
Expand Down Expand Up @@ -60,7 +61,8 @@ local audio_mime_types = {
local text_mime_types = {
TEXT_PLAIN,
APPLICATION_XML,
TEXT_XML
TEXT_XML,
APPLICATION_CSV
}

local document_mime_types = {
Expand Down
4 changes: 2 additions & 2 deletions third_party/versions.bzl
Expand Up @@ -8,9 +8,9 @@ METRICS_VERSION = "4.0.1"

# SIPI - digest takes precedence!
SIPI_REPOSITORY = "daschswiss/sipi"
SIPI_VERSION = "3.1.0"
SIPI_VERSION = "3.3.0"
SIPI_IMAGE = SIPI_REPOSITORY + ":" + SIPI_VERSION
SIPI_IMAGE_DIGEST = "sha256:51774e98160af255e4b542d9f1944afe43265001b20b365003848820384ea299"
SIPI_IMAGE_DIGEST = "sha256:24ff26999d3727aa4a0c4751fc5706761cea01e9df02e08e676160f234d8506d"

# Jena Fuseki - digest takes precedence!
FUSEKI_REPOSITORY = "daschswiss/apache-jena-fuseki"
Expand Down
Expand Up @@ -1095,7 +1095,7 @@ class ListsResponderADM(responderData: ResponderData) extends Responder(responde

if (changeNodeRequest.labels.nonEmpty) {
if (updatedNode.getLabels.stringLiterals.diff(changeNodeRequest.labels.get.value).nonEmpty)
throw UpdateNotPerformedException("Lists's 'labels' where not updated. Please report this as a possible bug.")
throw UpdateNotPerformedException("Lists's 'labels' were not updated. Please report this as a possible bug.")
}

if (changeNodeRequest.comments.nonEmpty) {
Expand Down