Skip to content

Commit be205c1

Browse files
github actions workflow file added
1 parent 6a77f60 commit be205c1

File tree

1 file changed

+48
-0
lines changed
  • app-dev/devops-and-containers/container-instances/ci-java-springboot-with-grafana-prometheus-example/files

1 file changed

+48
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Docker Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore:
7+
- 'README.md'
8+
- 'www-data/**'
9+
pull_request:
10+
branches: [ "main" ]
11+
12+
jobs:
13+
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
-
21+
name: Login to OCIR
22+
uses: docker/login-action@v3
23+
with:
24+
registry: fra.ocir.io
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.AUTH_TOKEN }}
27+
28+
- name: Build and Push the Sidecar image to OCIR
29+
run: |
30+
cd sidecar
31+
docker build . -t fra.ocir.io/${{ secrets.TENANCY_NAMESPACE }}/prometheus-sidecar:1.0.0
32+
docker push -q fra.ocir.io/${{ secrets.TENANCY_NAMESPACE }}/prometheus-sidecar:1.0.0
33+
-
34+
name: Set up JDK 21
35+
uses: actions/setup-java@v4
36+
with:
37+
java-version: '21'
38+
distribution: 'temurin'
39+
cache: maven
40+
- name: Build with Maven
41+
run: |
42+
cd PrometheusJavaDemo
43+
mvn clean package
44+
docker build . -t fra.ocir.io/${{ secrets.TENANCY_NAMESPACE }}/prometheusjavademo:1.0.0
45+
docker push -q fra.ocir.io/${{ secrets.TENANCY_NAMESPACE }}/prometheusjavademo:1.0.0
46+
- name: update Stack Manager with webhook
47+
run: |
48+
# curl -X PUT -H "Authorization: Basic ${{ secrets.STACK_MGR_AUTH }}" "${{ secrets.STACK_MGR_URL }}/webhook/restart?ciname=javaApp&compartmentname=mika.rinne"

0 commit comments

Comments
 (0)