🚀 📦 Adding scs-101-shipped ci
This commit is contained in:
31
.github/workflows/scs101shipped.yml
vendored
Normal file
31
.github/workflows/scs101shipped.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: scs-101 shipped ci
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'scs-101/scs-101-shipped/**'
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Docker Build and Push
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
cp scs-101/Dockerfile scs-101/scs-101-shipped/Dockerfile
|
||||
cd scs-101/scs-101-shipped
|
||||
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin
|
||||
docker build --build-arg GITHUB_TOKEN=$GITHUB_TOKEN -t ghcr.io/ehsaniara/scs-kafka-intro:scs-101-shipped .
|
||||
docker push ghcr.io/ehsaniara/scs-kafka-intro:scs-101-shipped
|
||||
@@ -13,10 +13,11 @@ lib project for core projects
|
||||
|
||||
## 2- scs-101-order
|
||||
|
||||
|
||||
[](https://github.com/ehsaniara/scs-kafka-intro/actions/workflows/scs101order.yml)
|
||||
|
||||
## 3- scs-101-order-branch
|
||||
|
||||
[](https://github.com/ehsaniara/scs-kafka-intro/actions/workflows/scs101orderbranch.yml)
|
||||
|
||||
## 4- scs-101-shipped
|
||||
|
||||
|
||||
49
scs-101/scs-101-shipped/k8s.yml
Normal file
49
scs-101/scs-101-shipped/k8s.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: scs-101-shipped-service
|
||||
labels:
|
||||
app: scs-101-shipped
|
||||
version: 0.0.1-SNAPSHOT
|
||||
spec:
|
||||
ports:
|
||||
- port: 8080
|
||||
protocol: "TCP"
|
||||
name: http
|
||||
targetPort: http
|
||||
selector:
|
||||
app: scs-101-shipped
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: scs-101-shipped
|
||||
labels:
|
||||
app: scs-101-shipped
|
||||
version: 0.0.1-SNAPSHOT
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: scs-101-shipped
|
||||
version: 0.0.1-SNAPSHOT
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: scs-101-shipped
|
||||
version: 0.0.1-SNAPSHOT
|
||||
spec:
|
||||
containers:
|
||||
- name: scs-101-shipped
|
||||
image: ghcr.io/ehsaniara/scs-kafka-intro:scs-101-shipped
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: kube
|
||||
- name: MY_POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
@@ -2,4 +2,8 @@ spring.application.name: scs-101-shipped
|
||||
spring.cloud.stream.bindings.shippedConsumer-in-0.destination: scs-101.shipped
|
||||
server.port: 8084
|
||||
logging.level.com.ehsaniara.scs_kafka_intro: debug
|
||||
---
|
||||
spring:
|
||||
config.activate.on-profile: kube
|
||||
cloud.stream.kafka.streams.binder.brokers: my-cluster-kafka-bootstrap.kafka:9092
|
||||
|
||||
|
||||
Reference in New Issue
Block a user