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

refactor: remove fuseki image creation and change sipi image creation to sbt (DEV-544) #2011

Merged
merged 17 commits into from Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions .bazelrc

This file was deleted.

1 change: 0 additions & 1 deletion .bazelversion

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/main.yml
Expand Up @@ -28,11 +28,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
Expand Down Expand Up @@ -75,11 +70,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
Expand Down Expand Up @@ -121,11 +111,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
Expand Down Expand Up @@ -221,11 +206,6 @@ jobs:
with:
format: YYYY-MM-DD
utcOffset: "+02:00"
- name: use daily bazel disk cache
uses: actions/cache@v2
with:
path: ~/.bazel_disk_cache
key: ${{ runner.OS }}-bazel_disk_cache-${{ steps.current-time.outputs.formattedTime }}
- name: setup java version
uses: joschi/setup-jdk@v2
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -18,7 +18,6 @@ webapi-it
webapi-test
upgrade/project
sipi/test
bazel-*

**/project/target/
**/target/
Expand Down
7 changes: 0 additions & 7 deletions BUILD.bazel

This file was deleted.

55 changes: 15 additions & 40 deletions Makefile
Expand Up @@ -34,53 +34,33 @@ docs-clean: ## cleans the project directory
@rm -rf site/

#################################
# Bazel targets
# Docker targets
#################################

.PHONY: build
build: docker-build ## build all targets (excluding docs)

.PHOBY: check-for-outdated-deps
check-for-outdated-deps: ## check for outdated maven dependencies
@bazel run @maven//:outdated

.PHONY: buildifier
buildifier: ## format Bazel WORKSPACE and BUILD.bazel files
@bazel run :buildifier

#################################
# Docker targets
#################################

.PHONY: docker-build-knora-api-image
docker-build-knora-api-image: # build and publish knora-api docker image locally
.PHONY: docker-build-dsp-api-image
docker-build-dsp-api-image: # build and publish dsp-api docker image locally
@sbt "webapi / Docker / publishLocal"

.PHONY: docker-publish-knora-api-image
docker-publish-knora-api-image: # publish knora-api image to Dockerhub
@bazel run //docker/knora-api:push

.PHONY: docker-build-knora-jena-fuseki-image
docker-build-knora-jena-fuseki-image: # build and publish knora-jena-fuseki docker image locally
@bazel run //docker/knora-jena-fuseki:image
.PHONY: docker-publish-dsp-api-image
docker-publish-dsp-api-image: # publish dsp-api image to Dockerhub
@sbt "webapi / Docker / publish"

.PHONY: docker-publish-knora-jena-fuseki-image
docker-publish-knora-jena-fuseki-image: # publish knora-jena-fuseki image to Dockerhub
@bazel run //docker/knora-jena-fuseki:push
.PHONY: docker-build-sipi-image
docker-build-sipi-image: # build and publish sipi docker image locally
@sbt "sipi / Docker / publishLocal"

.PHONY: docker-build-knora-sipi-image
docker-build-knora-sipi-image: # build and publish knora-sipi docker image locally
@bazel run --action_env=PULLER_TIMEOUT=2400 //docker/knora-sipi:image

.PHONY: docker-publish-knora-sipi-image
docker-publish-knora-sipi-image: # publish knora-sipi image to Dockerhub
@bazel run //docker/knora-sipi:push
.PHONY: docker-publish-sipi-image
docker-publish-sipi-image: # publish sipi image to Dockerhub
@sbt "sipi / Docker / publish"

.PHONY: docker-build
docker-build: docker-build-knora-api-image docker-build-knora-jena-fuseki-image docker-build-knora-sipi-image ## build and publish all Docker images locally
docker-build: docker-build-dsp-api-image docker-build-sipi-image ## build and publish all Docker images locally

.PHONY: docker-publish
docker-publish: docker-publish-knora-api-image docker-publish-knora-jena-fuseki-image docker-publish-knora-sipi-image ## publish all Docker images to Dockerhub
docker-publish: docker-publish-dsp-api-image docker-publish-sipi-image ## publish all Docker images to Dockerhub

#################################
## Docker-Compose targets
Expand Down Expand Up @@ -188,18 +168,14 @@ stack-without-api-and-sipi: stack-up ## starts the knora-stack without knora-api
@docker compose -f docker-compose.yml stop sipi

.PHONY: stack-db-only
stack-db-only: env-file docker-build-knora-jena-fuseki-image ## starts only fuseki.
stack-db-only: env-file ## starts only fuseki.
@docker compose -f docker-compose.yml up -d db
$(CURRENT_DIR)/webapi/scripts/wait-for-db.sh

#################################
## Test Targets
#################################

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

.PHONY: client-test-data
client-test-data: export KNORA_WEBAPI_COLLECT_CLIENT_TEST_DATA := true
client-test-data: build ## runs the dsp-api e2e tests and generates client test data.
Expand Down Expand Up @@ -301,7 +277,6 @@ clean-local-tmp:

clean: docs-clean clean-local-tmp clean-docker ## clean build artifacts
@rm -rf .env
@bazel clean

.PHONY: clean-sipi-tmp
clean-sipi-tmp: ## deletes all files in Sipi's tmp folder
Expand Down
18 changes: 1 addition & 17 deletions README.md
Expand Up @@ -54,7 +54,6 @@ Each developer machine should have the following prerequisites installed:
* Homebrew (on macOS): https://brew.sh
* [OpenJDK](https://adoptopenjdk.net) 11
* [sbt](https://www.scala-sbt.org/)
* [Bazel](https://bazel.build)

#### Java Adoptopenjdk 11

Expand All @@ -71,19 +70,6 @@ To pin the version of Java, please add this environment variable to you startup
export JAVA_HOME=`/usr/libexec/java_home -v 11`
```

#### Bazel build tools

To install, follow these steps:

```shell
npm install -g @bazel/bazelisk
```

This will install [bazelisk](https://github.com/bazelbuild/bazelisk) which is
a wrapper to the `bazel` binary. It will, when `bazel` is run on the command line,
automatically install the supported Bazel version, defined in the `.bazelversion`
file in the root of the `knora-api` repository.

### For building the documentation

See [docs/Readme.md](docs/Readme.md).
Expand All @@ -92,9 +78,7 @@ See [docs/Readme.md](docs/Readme.md).

### Run the Knora API server

With [Bazel](https://docs.bazel.build/versions/3.3.0/install-os-x.html) and
[Docker](https://www.docker.com) installed, run the following to create a test
repository and load some test data into the triplestore:
Run the following to create a test repository and load some test data into the triplestore:

```shell
make init-db-test
Expand Down
38 changes: 0 additions & 38 deletions RELEASING.md

This file was deleted.