Skip to content

Commit

Permalink
Update package names (#1)
Browse files Browse the repository at this point in the history
* updated package names
---------

Co-authored-by: Jens Plüddemann <jens.plueddemann@novatec-gmbh.de>
  • Loading branch information
JenSeReal and Jens Plüddemann authored Nov 5, 2024
1 parent f3a5797 commit d1f7374
Show file tree
Hide file tree
Showing 15 changed files with 133 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3-eclipse-temurin-21 AS dind
FROM maven:3-eclipse-temurin-21 AS dind

ARG DEBIAN_FRONTEND=noninteractive
ENV PIP_ROOT_USER_ACTION=ignore
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/provide-docker-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Provide needed docker images in ghcr.io

on:
workflow_dispatch:
push:

env:
REGISTRY_IMAGE: ghcr.io/lftraining/lfs148-code

jobs:
retag_and_push:
name: Provide docker image ${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }} on ghcr.io
runs-on: [ubuntu-latest]
strategy:
matrix:
image:
- name: todobackend-springboot
tag: v2404
namespace: maeddes
- name: todoui-thymeleaf
tag: v2404
namespace: maeddes
- name: todoui-flask
tag: v2404
namespace: maeddes
- name: simple-generator
tag: v2404
namespace: maeddes
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pull image from Docker Hub
run: |
docker pull docker.io/${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }}
- name: Retag the image for GitHub Container Registry
run: |
docker tag ${{ matrix.image.namespace }}/${{ matrix.image.name }}:${{ matrix.image.tag }} ${{ env.REGISTRY_IMAGE }}-${{ matrix.image.name }}:${{ matrix.image.tag }}
- name: Push image to GitHub Container Registry
run: |
docker push ${{ env.REGISTRY_IMAGE }}-${{ matrix.image.name }}:${{ matrix.image.tag }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
*.jar

settings.json
.envrc
.direnv
.devenv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/maven:3-eclipse-temurin-21 as build
FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app

COPY pom.xml .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<artifactId>todobackend-automatic</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>todobackend-automatic</name>
<description>Novatec Demo Application</description>
<description>Demo Application</description>

<properties>
<java.version>21</java.version>
Expand Down Expand Up @@ -53,6 +53,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ String someInternalMethod(String todo){
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
if(todo.equals("fail")){

System.out.println("Failing ...");
throw new RuntimeException();
}

}
return todo;

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/maven:3-eclipse-temurin-21 as build
FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app

COPY pom.xml .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<artifactId>todobackend-automatic-solution</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>todobackend-automatic-solution</name>
<description>Novatec Demo Application</description>
<description>Demo Application</description>

<properties>
<java.version>21</java.version>
Expand Down Expand Up @@ -53,6 +53,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ String someInternalMethod(@SpanAttribute String todo){
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
if(todo.equals("fail")){

System.out.println("Failing ...");
throw new RuntimeException();
}

}
return todo;

}
Expand Down
8 changes: 4 additions & 4 deletions exercises/otel-in-action/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- POSTGRES_DB=mydb

todobackend-springboot:
image: maeddes/todobackend-springboot:v2404
image: ghcr.io/lftraining/lfs148-code-todobackend-springboot:v2404
networks:
- todonet
build:
Expand All @@ -37,7 +37,7 @@ services:
- postgresdb

todoui-thymeleaf:
image: maeddes/todoui-thymeleaf:v2404
image: ghcr.io/lftraining/lfs148-code-todoui-thymeleaf:v2404
build:
context: ./todoui-thymeleaf
dockerfile: Dockerfile #-multistage
Expand All @@ -56,7 +56,7 @@ services:
- OTEL_LOGS_EXPORTER=none

todoui-flask:
image: maeddes/todoui-flask:v2404
image: ghcr.io/lftraining/lfs148-code-todoui-flask:v2404
build:
context: ./todoui-flask
networks:
Expand All @@ -70,7 +70,7 @@ services:
- OTEL_METRICS_EXPORTER=otlp

loadgenerator:
image: maeddes/simple-generator:v2404
image: ghcr.io/lftraining/lfs148-code-simple-generator:v2404
build:
context: ./loadgenerator
networks:
Expand Down
2 changes: 1 addition & 1 deletion exercises/otel-in-action/todobackend-springboot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/maven:3-eclipse-temurin-21 as build
FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app

COPY pom.xml .
Expand Down
16 changes: 15 additions & 1 deletion exercises/otel-in-action/todobackend-springboot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<artifactId>todobackend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>todobackend</name>
<description>Novatec Demo Application</description>
<description>Demo Application</description>

<properties>
<java.version>21</java.version>
Expand Down Expand Up @@ -53,6 +53,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ String someInternalMethod(@SpanAttribute String todo){
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
if(todo.equals("fail")){

System.out.println("Failing ...");
throw new RuntimeException();
}

}
return todo;

}
Expand Down
2 changes: 1 addition & 1 deletion exercises/otel-in-action/todoui-thymeleaf/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/maven:3-eclipse-temurin-21 as build
FROM docker.io/maven:3-eclipse-temurin-21 AS build
WORKDIR /workspace/app

COPY pom.xml .
Expand Down
20 changes: 17 additions & 3 deletions exercises/otel-in-action/todoui-thymeleaf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>

<!--
Expand All @@ -50,8 +64,8 @@
<artifactId>opentelemetry-instrumentation-annotations</artifactId>
<version>1.29.0</version>
</dependency>
-->
-->

<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
Expand All @@ -71,7 +85,7 @@
<artifactId>opentelemetry-exporter-otlp</artifactId>
<version>1.23.1</version>
</dependency> -->


</dependencies>

Expand Down

0 comments on commit d1f7374

Please sign in to comment.