Skip to content

Commit c51b98c

Browse files
clean up actions (#20)
1 parent e59a127 commit c51b98c

File tree

8 files changed

+121
-55
lines changed

8 files changed

+121
-55
lines changed
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1+
name: AST Java Wrapper CI
12

2-
name: Integration Tests
3-
4-
on:
5-
push:
6-
branches:
7-
- main
8-
- master
9-
pull_request:
10-
types: [opened, reopened, synchronize]
11-
branches:
12-
- master
13-
- main
3+
on: [pull_request]
144

155
jobs:
16-
run_tests:
6+
integration-tests:
177
runs-on: ubuntu-latest
188
steps:
199
- name: Checkout the repository
@@ -34,3 +24,18 @@ jobs:
3424
CX_TENANT: ${{ secrets.TENANT }}
3525
PATH_TO_EXECUTABLE: /tmp/cx-linux
3626
run: mvn -B test --file pom.xml
27+
cx-scan:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2
32+
- name: Checkmarx AST CLI Action
33+
uses: checkmarxDev/ast-github-action@master
34+
with:
35+
project_name: ast-cli-java-wrapper
36+
branch: master
37+
base_uri: ${{ secrets.BASE_URI }}
38+
cx_tenant: ${{ secrets.TENANT }}
39+
cx_client_id: ${{ secrets.CLIENT_ID }}
40+
cx_client_secret: ${{ secrets.CLIENT_SECRET }}
41+
additional_params: --tags galactica-team

.github/workflows/manual-tag.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Manual Tag Creation
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Next release tag'
8+
required: true
9+
10+
jobs:
11+
tag-creation:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/[email protected]
16+
with:
17+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
18+
- name: Tag
19+
run: |
20+
echo ${{ github.event.inputs.tag }}
21+
echo "NEXT_VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
22+
- name: Create tag
23+
uses: actions-ecosystem/action-push-tag@v1
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
26+
with:
27+
tag: ${{ env.NEXT_VERSION }}

.github/workflows/maven-publish.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release Creation
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set env
15+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
16+
17+
- name: Cache local Maven repository
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.m2/repository
21+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: |
23+
${{ runner.os }}-maven-
24+
25+
- name: Set up JDK 11
26+
uses: actions/setup-java@v2
27+
with:
28+
java-version: 11
29+
distribution: 'adopt'
30+
settings-path: ${{ github.workspace }}
31+
32+
- name: Update the POM version.
33+
run: mvn -B versions:set -DnewVersion='${{ env.RELEASE_VERSION }}' --file pom.xml -s $GITHUB_WORKSPACE/settings.xml -DskipTests
34+
env:
35+
GITHUB_TOKEN: ${{ github.token}}
36+
37+
- name: Publish to GitHub Packages Apache Maven
38+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -DskipTests

.github/workflows/update-cli.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update checkmarx ast cli
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: '*/5 * * * *'
5+
- cron: '0 * * * *'
66

77
jobs:
88
updateCheckmarxJenkins:

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#################################
2+
# Compiled source #
3+
#################################
4+
target/
5+
6+
#################################
7+
# Docker & Compose files #
8+
#################################
9+
/distribution/docker/
10+
docker-compose.override.yml
11+
.env
12+
13+
#################################
14+
# IDE generated files #
15+
#################################
16+
.idea/
17+
.resources/
18+
*.iml
19+
.settings/
20+
.classpath
21+
.project
22+
23+
#################################
24+
# Logs and temp files #
25+
#################################
26+
*.log
27+
*.swp
28+
*~
29+
30+
#################################
31+
# OS generated files #
32+
#################################
33+
Thumbs.db
34+
.directory
35+
.DS_Store

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# AST Java Wrapper
2+
Release documentation: https://checkmarx.atlassian.net/wiki/spaces/AID/pages/6033899572/ast-cli-java-wrapper

README.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)