Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions releases #79

Merged
merged 23 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
77ba585
nightly release action added
stas-panasiuk May 23, 2024
f53228b
nightly release debug prints
stas-panasiuk May 23, 2024
23ca3d3
nightly release debug prints #2
stas-panasiuk May 23, 2024
f3a4325
artifact empty fix
stas-panasiuk May 23, 2024
41ace84
parcel added to the artifact
stas-panasiuk May 23, 2024
b2b97f9
Added publish_release
stas-panasiuk May 23, 2024
9317f6b
temp PR trigger for publish
stas-panasiuk May 23, 2024
877b6d2
action name fix
stas-panasiuk May 23, 2024
4a97285
deploy fix
stas-panasiuk May 23, 2024
13e4581
merged nightly and publish + fixed github token
stas-panasiuk May 23, 2024
8cecc50
switch to gh releases
stas-panasiuk May 23, 2024
6c13679
temporarily removed gh releases
stas-panasiuk May 23, 2024
20d4649
Updated readme + added workflow_dispatch inputs
stas-panasiuk May 24, 2024
cb533c1
readme upd
stas-panasiuk May 24, 2024
de16192
Release action nightly logic fix
stas-panasiuk Jun 3, 2024
1695710
temporary update to create a release without merging
stas-panasiuk Jul 3, 2024
f9c3991
Revert "temporary update to create a release without merging"
stas-panasiuk Jul 3, 2024
fb0d314
cyber csd added to release artifacts
stas-panasiuk Jul 5, 2024
59919c2
temporary update to create a release without merging
stas-panasiuk Jul 3, 2024
e1679dc
Revert "temporary update to create a release without merging"
stas-panasiuk Jul 5, 2024
d99b86a
cyber csd added to release artifacts #2
stas-panasiuk Jul 7, 2024
80d4c46
temporary update to create a release without merging
stas-panasiuk Jul 3, 2024
eba0066
Revert "temporary update to create a release without merging"
stas-panasiuk Jul 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish Release

on:
schedule:
# At 0:00am each day on the default branch
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
tag:
description: 'Version tag'
required: true
type: string
name:
description: 'Release name'
required: true
type: string
skip_tests:
description: 'Skip tests'
required: true
default: false
type: boolean

jobs:
# checks if there's a commit in last 24hr
check_date:
runs-on: ubuntu-latest
outputs:
should_run: ${{ env.SHOULD_RUN }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}

- id: should_run
continue-on-error: true
name: check latest commit is less than a day
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "SHOULD_RUN=false" >> $GITHUB_ENV
publish_release:
needs: check_date
if: ${{ github.event_name == 'workflow_dispatch' || env.SHOULD_RUN != 'false' }}
runs-on: ubuntu-latest
container: maven:3-eclipse-temurin-8
steps:
- uses: actions/checkout@v3

- name: Cache local Maven repository
uses: actions/cache/restore@v3
with:
path: /root/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Build and Test with Maven
run: mvn -P '!add-dependencies-for-IDEA,full-build,include-front-end' -B package -DskipTests=${{ github.event_name == 'workflow_dispatch' && inputs.skip_tests || true }} --file flink-cyber/pom.xml

- name: Release
uses: softprops/action-gh-release@v2
if: ${{ github.event_name == 'workflow_dispatch' }}
with:
tag_name: ${{ inputs.tag }}
name: ${{ inputs.name }}
draft: true
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}
files: |
flink-cyber/cyber-csd/target/cyber-csd--*
flink-cyber/cyber-csd/target/CYBERSEC-*
flink-cyber/cyber-parcel/target/CYBERSEC-*

- name: Get current date
id: date
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: cybersec-${{ github.event_name == 'workflow_dispatch' && 'release' || 'nightly' }}-${{ env.CURRENT_DATE }}
path: |
flink-cyber/cyber-csd/target/cyber-csd--*
flink-cyber/cyber-csd/target/CYBERSEC-*
flink-cyber/cyber-parcel/target/CYBERSEC-*
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ The Cyber Toolkit is flexible and configurable so the ingestion can be changed w
3. [Event Generation](flink-cyber/caracal-generator/README.md)

## Packaging
The Cybersec Toolkit includes a Cloudera Manager parcel and service for easier installation.
The Cybersec Toolkit includes a Cloudera Manager parcel and service for easier installation.

Artifacts are available for download on the [releases page](https://github.com/cloudera/cybersec/releases).
You can also find less stable, but more up to date artifacts by selecting one of successful runs on [this page](https://github.com/cloudera/cybersec/actions/workflows/publish_release.yml) and scrolling to the bottom of the selected run page.

Or you can find artifacts after the build in the following directories:
1. [Parcel](flink-cyber/cyber-parcel)
2. [Cloudera Service](flink-cyber/cyber-csd)

Expand Down
Loading