Skip to content

Commit d64899f

Browse files
authored
Adding global-microservices-springdata-nosql to demo-livelab (#169)
* LiveLab v0 - global-microservices-springdata-nosql to demo-livelab * Update build and push images to the latest GitHub action * optimizing the build of the zip files
1 parent 5d77e78 commit d64899f

38 files changed

+1493
-7
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build and publish Demo Movie container image to GitHub Container Registry
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'demo-livelab/global-microservices-springdata-nosql/code-nosql-spring-sdk/*'
9+
- '.github/workflows/build-and-push-demo-movie-image.yml'
10+
workflow_dispatch:
11+
12+
env:
13+
IMAGE_NAME: demo-nosql-movie-example-app
14+
15+
16+
jobs:
17+
build-and-push:
18+
name: Build and push Movie Demo container image
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
-
23+
name: Checkout
24+
uses: actions/checkout@v4
25+
-
26+
name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
-
29+
name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
-
32+
name: Repository owner needs to be lowercase
33+
id: repo-owner
34+
run: |
35+
REPO_OWNER="${{ github.repository_owner }}"
36+
echo "repo-owner=${REPO_OWNER,,}" >> "$GITHUB_OUTPUT"
37+
-
38+
name: Get current date
39+
id: date
40+
run: echo "date=$(date +'%Y-%m')" >> "$GITHUB_OUTPUT"
41+
-
42+
name: Login to Docker Hub
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.actor }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
-
49+
name: Generate container image metadata
50+
id: meta
51+
uses: docker/metadata-action@v5
52+
with:
53+
images: ghcr.io/${{ steps.repo-owner.outputs.repo-owner }}/${{ env.IMAGE_NAME }}
54+
flavor: |
55+
latest=false
56+
tags: |
57+
type=raw,value=latest
58+
type=raw,value=${{ env.TAG }}
59+
env:
60+
TAG: ${{ steps.date.outputs.date }}
61+
-
62+
name: Build and push
63+
uses: docker/build-push-action@v5
64+
with:
65+
context: ./demo-livelab/global-microservices-springdata-nosql/code-nosql-spring-sdk/
66+
platforms: linux/amd64,linux/arm64
67+
push: true
68+
tags: ${{ steps.meta.outputs.tags }}
69+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/build-and-push-demo-vod-image.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
steps:
2121
-
2222
name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
-
2525
name: Set up QEMU
26-
uses: docker/setup-qemu-action@v2
26+
uses: docker/setup-qemu-action@v3
2727
-
2828
name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v2
29+
uses: docker/setup-buildx-action@v3
3030
-
3131
name: Repository owner needs to be lowercase
3232
id: repo-owner
@@ -39,15 +39,15 @@ jobs:
3939
run: echo "date=$(date +'%Y-%m')" >> "$GITHUB_OUTPUT"
4040
-
4141
name: Login to Docker Hub
42-
uses: docker/login-action@v2
42+
uses: docker/login-action@v3
4343
with:
4444
registry: ghcr.io
4545
username: ${{ github.actor }}
4646
password: ${{ secrets.GITHUB_TOKEN }}
4747
-
4848
name: Generate container image metadata
4949
id: meta
50-
uses: docker/metadata-action@v4
50+
uses: docker/metadata-action@v5
5151
with:
5252
images: ghcr.io/${{ steps.repo-owner.outputs.repo-owner }}/${{ env.IMAGE_NAME }}
5353
flavor: |
@@ -59,7 +59,7 @@ jobs:
5959
TAG: ${{ steps.date.outputs.date }}
6060
-
6161
name: Build and push
62-
uses: docker/build-push-action@v4
62+
uses: docker/build-push-action@v5
6363
with:
6464
context: ./demo-livelab/video-on-demand-with-nosql-database/demo-vod/
6565
platforms: linux/amd64,linux/arm64

.github/workflows/nosql-examples-build-zips.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
for EXAMPLE_FOLDER in $FOLDERS;
1919
do
2020
RESOURCE=$(cut -d "/" -f 1 <<< "$EXAMPLE_FOLDER")
21-
zip -r ../zips/$RESOURCE.zip $EXAMPLE_FOLDER
21+
zip -r ../zips/$RESOURCE.zip $EXAMPLE_FOLDER -x \*.jar -x \*.gif
2222
done
2323
cd ..
2424
FOLDERS=$(ls -1 -d examples-nosql-*/*/ )
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# video-on-demand-with-nosql-database
2+
Demo Video On Demand streaming application using GraphQL and NoSQL
3+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ghcr.io/graalvm/jdk:ol8-java17
2+
EXPOSE 8000
3+
ARG JAR_FILE=target/spring-data-rest-nosql-0.0.1.jar
4+
ADD ${JAR_FILE} spring-data-rest-nosql-0.0.1.jar
5+
RUN ls -aldrt
6+
ENTRYPOINT ["java","-jar","./spring-data-rest-nosql-0.0.1.jar"]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Getting Started
2+
3+
### Reference Documentation
4+
For further reference, please consider the following sections:
5+
6+
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
7+
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.2.0/maven-plugin/reference/html/)
8+
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.2.0/maven-plugin/reference/html/#build-image)
9+
* [Rest Repositories](https://docs.spring.io/spring-boot/docs/3.2.0/reference/htmlsingle/index.html#howto.data-access.exposing-spring-data-repositories-as-rest)
10+
11+
### Guides
12+
The following guides illustrate how to use some features concretely:
13+
14+
* [Accessing JPA Data with REST](https://spring.io/guides/gs/accessing-data-rest/)
15+
* [Accessing Neo4j Data with REST](https://spring.io/guides/gs/accessing-neo4j-data-rest/)
16+
* [Accessing MongoDB Data with REST](https://spring.io/guides/gs/accessing-mongodb-data-rest/)
17+

0 commit comments

Comments
 (0)