Skip to content

removed dependency check and renamed. #1

removed dependency check and renamed.

removed dependency check and renamed. #1

name: Docker Build And Push Snapshot
on:
push:
branches:
- hotfix/*
workflow_dispatch:
jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
environment: development
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17 # Spring 3 needs at least java 17
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build artifacts
run: |
./gradlew assemble bootJarWithFrontend :inspectit-ocelot-core:cyclonedxBom :inspectit-ocelot-configurationserver:cyclonedxBom -PbuildVersion=snapshot
mkdir artifacts
cp ./inspectit-ocelot-agent/build/inspectit-ocelot-agent-snapshot.jar ./artifacts
cp ./components/inspectit-ocelot-configurationserver/build/libs/inspectit-ocelot-configurationserver-snapshot.jar ./artifacts
mkdir boms
cp ./inspectit-ocelot-core/build/reports/bom.json ./boms/inspectit-ocelot-agent-bom.json
cp ./inspectit-ocelot-core/build/reports/bom.xml ./boms/inspectit-ocelot-agent-bom.xml
cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.json ./boms/inspectit-ocelot-configurationserver-bom.json
cp ./components/inspectit-ocelot-configurationserver/build/reports/bom.xml ./boms/inspectit-ocelot-configurationserver-bom.xml
zip -r ./artifacts/software-bill-of-materials.zip ./boms
build_and_publish_docker_images:
name: "Build and Push Docker Images"
runs-on: ubuntu-latest
needs: build
environment: development
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17 # Spring 3 needs at least java 17
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build Docker Images
run: ./gradlew dockerTag -PbuildVersion=snapshot
- name: Push Docker Images
run: |
docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
docker push inspectit/inspectit-ocelot-agent:action-snapshot
docker push inspectit/inspectit-ocelot-agent:action-snapshot
docker push inspectit/inspectit-ocelot-configurationserver:action-snapshot
docker push inspectit/inspectit-ocelot-configurationserver:action-snapshot