Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

update README.md: add warning "no longer maintained" (#871) #3590

update README.md: add warning "no longer maintained" (#871)

update README.md: add warning "no longer maintained" (#871) #3590

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
build-java:
# Do not run this job for pull requests where both branches are from the same repo.
# Jobs that depend on this one will be skipped too.
# This prevents duplicate CI runs for our own pull requests, whilst preserving the ability to
# run the CI for each branch push to a fork, and for each pull request originating from a fork.
if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v3.0.11
with:
path: ~/.m2
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-
- name: Build and test with Maven
run: mvn --batch-mode package
- name: Generate unit test reports
if: failure()
run: mvn --batch-mode surefire-report:report-only
- name: Upload unit-test-results
if: always()
uses: actions/upload-artifact@v3
with:
name: unit-test-results
path: "**/target/surefire-reports/TEST-*.xml"
- name: Upload alerting-storm jar
uses: actions/upload-artifact@v3
with:
name: alerting-storm
path: alerting/alerting-storm/target/alerting-storm-*.jar
- name: Upload enriching-storm jar
uses: actions/upload-artifact@v3
with:
name: enriching-storm
path: enriching/enriching-storm/target/enriching-storm-*.jar
- name: Upload parsing-storm jar
uses: actions/upload-artifact@v3
with:
name: parsing-storm
path: parsing/parsing-storm/target/parsing-storm-*.jar
- name: Upload config-editor-rest jar
uses: actions/upload-artifact@v3
with:
name: config-editor-rest
path: config-editor/config-editor-rest/target/config-editor-rest-*.jar
- name: Upload responding-stream jar
uses: actions/upload-artifact@v3
with:
name: responding-stream
path: responding/responding-stream/target/responding-stream-*.jar
- name: Upload storm-topology-manager jar
uses: actions/upload-artifact@v3
with:
name: storm-topology-manager
path: deployment/storm-topology-manager/target/storm-topology-manager-*.jar
- name: Upload siembol-monitoring jar
uses: actions/upload-artifact@v3
with:
name: siembol-monitoring
path: deployment/siembol-monitoring/target/siembol-monitoring-*.jar
build-docker-storm:
runs-on: ubuntu-latest
needs: build-java
strategy:
matrix:
component: [alerting-storm, enriching-storm, parsing-storm]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download jar
uses: actions/download-artifact@v3
with:
name: ${{ matrix.component }}
path: deployment/docker
- name: Get component info
id: info
run: |
[xml]$xml = Get-Content ./*/${{ matrix.component}}/pom.xml
echo "::set-output name=version::$($xml.project.parent.version)"
echo "::set-output name=class::$($xml.project.build.plugins.plugin.executions.execution.configuration.transformers.transformer.mainClass)"
shell: pwsh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4.1.1
with:
images: gresearchdev/siembol-${{ matrix.component }}
flavor: |
latest=${{ github.ref == 'refs/heads/main' && !endsWith(steps.info.outputs.version, '-SNAPSHOT') }}
# We use raw because our release process is not done on tag push (yet)
tags: |
type=raw,value=${{ steps.info.outputs.version }}
type=raw,value=snapshot,enable=${{ github.ref == 'refs/heads/main' && endsWith(steps.info.outputs.version, '-SNAPSHOT') }}
labels: |
org.opencontainers.image.title=siembol-${{ matrix.component }}
- name: Build and export Docker image
uses: docker/build-push-action@v3
with:
context: deployment/docker
file: deployment/docker/Dockerfile.storm
build-args: |
JAR=${{ matrix.component }}-${{ steps.info.outputs.version }}.jar
CLASS=${{ steps.info.outputs.class }}
pull: true
outputs: type=docker,dest=image.tar
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Only run this step for main and hotfix branches.
- name: Upload Docker image
if: github.event_name == 'push' && !github.event.repository.fork && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') )
uses: actions/upload-artifact@v3
with:
name: docker-${{ matrix.component }}
path: image.tar
build-docker-java:
runs-on: ubuntu-latest
needs: build-java
strategy:
matrix:
component: [config-editor-rest, responding-stream, storm-topology-manager, siembol-monitoring]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download jar
uses: actions/download-artifact@v3
with:
name: ${{ matrix.component }}
path: deployment/docker/${{ matrix.component }}
- name: Copy config defaults
run: |
cp config/${{ matrix.component}}/application.properties deployment/docker/${{ matrix.component}}/
if [ "${{ matrix.component}}" == "config-editor-rest" ]
then
mkdir deployment/docker/config-editor-rest/ui-config
cp config/config-editor-rest/*.json deployment/docker/config-editor-rest/ui-config/
fi
if [ "${{ matrix.component }}" == "storm-topology-manager" ]
then
cp config/storm-topology-manager/storm-submit.yaml deployment/docker/${{ matrix.component }}/
fi
- name: Get component info
id: info
run: |
[xml]$xml = Get-Content ./*/${{ matrix.component}}/pom.xml
echo "::set-output name=version::$($xml.project.parent.version)"
shell: pwsh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4.1.1
with:
images: gresearchdev/siembol-${{ matrix.component }}
flavor: |
latest=${{ github.ref == 'refs/heads/main' && !endsWith(steps.info.outputs.version, '-SNAPSHOT') }}
# We use raw because our release process is not done on tag push (yet)
tags: |
type=raw,value=${{ steps.info.outputs.version }}
type=raw,value=snapshot,enable=${{ github.ref == 'refs/heads/main' && endsWith(steps.info.outputs.version, '-SNAPSHOT') }}
labels: |
org.opencontainers.image.title=siembol-${{ matrix.component }}
- name: Build and export Docker image
uses: docker/build-push-action@v3
with:
context: deployment/docker
file: deployment/docker/Dockerfile.java
build-args: |
APP=${{ matrix.component}}
VERSION=${{ steps.info.outputs.version }}
pull: true
outputs: type=docker,dest=image.tar
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Only run this step for main and hotfix branches.
- name: Upload Docker image
if: github.event_name == 'push' && !github.event.repository.fork && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') )
uses: actions/upload-artifact@v3
with:
name: docker-${{ matrix.component }}
path: image.tar
build-js-config-editor-ui:
# Do not run this job for pull requests where both branches are from the same repo.
# Jobs that depend on this one will be skipped too.
# This prevents duplicate CI runs for our own pull requests, whilst preserving the ability to
# run the CI for each branch push to a fork, and for each pull request originating from a fork.
if: github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
runs-on: ubuntu-latest
defaults:
run:
working-directory: config-editor/config-editor-ui
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
cache-dependency-path: config-editor/config-editor-ui/package-lock.json
- name: Install NPM packages
run: npm ci --legacy-peer-deps
- name: Testing
run: npm run test-ci
- name: Generate build-info.json
run: |
jq "{appName: \"Config Editor UI\", appVersion: .version, angularVersion: .dependencies[\"@angular/core\"], buildDate: \"$(date -u +%Y%m%d-%H:%M:%S)\", siembolCompileTimeVersion: .siembolCompileTimeVersion}" package.json > src/assets/build-info.json
- name: Build
run: npm run build-prod
- name: Copy config defaults
run: cp -r ../../config/config-editor-ui dist/config
- name: Uploading dist
uses: actions/upload-artifact@v3
with:
name: config-editor-ui
path: config-editor/config-editor-ui/dist
build-docker-config-editor-ui:
runs-on: ubuntu-latest
needs: build-js-config-editor-ui
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download dist
uses: actions/download-artifact@v3
with:
name: config-editor-ui
path: deployment/docker/config-editor-ui
- name: Get version
id: info
run: echo "::set-output name=version::$(jq -r .appVersion deployment/docker/config-editor-ui/assets/build-info.json)"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4.1.1
with:
images: gresearchdev/siembol-config-editor-ui
flavor: |
latest=${{ github.ref == 'refs/heads/main' && !endsWith(steps.info.outputs.version, '-dev') }}
# We use raw because our release process is not done on tag push (yet)
tags: |
type=raw,value=${{ steps.info.outputs.version }}
type=raw,value=snapshot,enable=${{ github.ref == 'refs/heads/main' && endsWith(steps.info.outputs.version, '-dev') }}
labels: |
org.opencontainers.image.title=siembol-config-editor-ui
- name: Build and export Docker image
uses: docker/build-push-action@v3
with:
context: deployment/docker
file: deployment/docker/Dockerfile.config-editor-ui
pull: true
outputs: type=docker,dest=image.tar
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Only run this step for main and hotfix branches.
- name: Upload Docker image
if: github.event_name == 'push' && !github.event.repository.fork && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') )
uses: actions/upload-artifact@v3
with:
name: docker-config-editor-ui
path: image.tar
release-version:
# Only run this job for main and hotfix branches.
# Jobs that depend on this one will be skipped too.
if: github.event_name == 'push' && !github.event.repository.fork && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') )
runs-on: ubuntu-latest
needs: build-java
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get release version
id: version
run: |
version=$(grep --max-count=1 "<version>" pom.xml | sed -E "s/.*>(.+)<.*/\1/")
echo "::set-output name=version::$version"
shell: bash
release:
runs-on: ubuntu-latest
needs: release-version
environment: release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache Maven packages
uses: actions/cache@v3.0.11
with:
path: |
~/.m2
!~/.m2/settings.xml
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-
- name: Set up Maven Central Repository
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
with:
java-version: '17'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Release artifacts
run: mvn --batch-mode deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
release-docker:
# Only run this job for main and hotfix branches.
# Jobs that depend on this one will be skipped too.
if: github.event_name == 'push' && !github.event.repository.fork && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/') )
runs-on: ubuntu-latest
needs: [build-docker-storm, build-docker-java, build-docker-config-editor-ui]
environment: release
strategy:
matrix:
component: [alerting-storm, enriching-storm, parsing-storm, config-editor-rest, responding-stream, storm-topology-manager, config-editor-ui, siembol-monitoring]
fail-fast: false
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Download Docker image
uses: actions/download-artifact@v3
with:
name: docker-${{ matrix.component }}
- name: Load Docker image
run: docker load --input image.tar
- name: Publish Docker image
run: docker push --all-tags gresearchdev/siembol-${{ matrix.component }}
event_file:
name: "Event File"
needs: build-java
if: always() && needs.build-java.result != 'skipped'
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}