Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
133 changes: 20 additions & 113 deletions .github/workflows/codeql-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
name: "CodeQL Advanced (Go)"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths: [ "modules/buildutils/**", "modules/cli/**" ]
workflow_call:

schedule:
- cron: '41 13 * * 0'
Expand Down Expand Up @@ -54,6 +50,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download All 'dev.galasa' Artifacts
if: ${{ github.event_name == 'workflow_call' }}
uses: actions/download-artifact@v4
with:
name: all-artifacts
path: /home/runner/.m2/repository/dev/galasa

# Download from the last Main Build Orchestrator
# - name: Download All 'dev.galasa' Artifacts
# if: github.event_name == 'schedule'
# uses: actions/download-artifact@v4
# with:
# name: all-artifacts
# path: /home/runner/.m2/repository/dev/galasa

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand All @@ -74,116 +85,12 @@ jobs:
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

- name: Building Platform (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/platform
run: |
set -o pipefail
gradle -b dev.galasa.platform/build.gradle build check publish --info \
--no-daemon --console plain \
-PsourceMaven=https://repo.maven.apache.org/maven2/ \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=/home/runner/.m2/repository 2>&1 | tee build.log


- name: Building Wrapping (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/wrapping
run: |
set -o pipefail
mvn deploy \
-Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:///home/runner/.m2/repository \
-Dgalasa.jacocoEnabled=false \
-Dgalasa.isRelease=false \
-Dgpg.skip=true \
--batch-mode --errors --fail-at-end \
--settings settings.xml 2>&1 | tee build.log

- name: Building Gradle (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/gradle
run: |
set -o pipefail
gradle check publish --info \
--no-daemon --console plain \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/obr \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=/home/runner/.m2/repository \
-PjacocoEnabled=false \
-PisMainOrRelease=false 2>&1 | tee build.log

- name: Building Maven (manually)
- name: Building Buildutils (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/maven
working-directory: ${{ github.workspace }}/modules/buildutils
run: |
set -o pipefail
mvn -f galasa-maven-plugin/pom.xml deploy -X \
-Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:///home/runner/.m2/repository \
-Dgalasa.jacocoEnabled=false \
-Dgalasa.isRelease=false \
-Dgpg.skip=true \
--batch-mode --errors --fail-at-end \
--settings settings.xml 2>&1 | tee build.log

- name: Building Framework (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/framework
env:
YAML_LOCATION: "modules/framework/galasa-parent/dev.galasa.framework.api.openapi/src/main/resources/openapi.yaml"
OUTPUT_LOCATION: "modules/framework/galasa-parent/dev.galasa.framework.api.beans/src/main/java"
PACKAGE: "dev.galasa.framework.api.beans.generated"
run: |
docker run --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/openapi2beans:main generate --yaml var/workspace/${{ env.YAML_LOCATION }} --output var/workspace/${{ env.OUTPUT_LOCATION }} --package ${{ env.PACKAGE }}
set -o pipefail
gradle -b galasa-parent/build.gradle check publish --info \
--no-daemon --console plain \
-Dorg.gradle.jvmargs=-Xmx5120M \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/obr \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=/home/runner/.m2/repository \
-PjacocoEnabled=false \
-PisMainOrRelease=false 2>&1 | tee build.log

- name: Building Managers (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/managers
run: |
set -o pipefail
gradle -b galasa-managers-parent/build.gradle check publish --info \
--no-daemon --console plain \
-Dorg.gradle.jvmargs=-Xmx4096M \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/obr \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
-PtargetMaven=/home/runner/.m2/repository \
-PjacocoEnabled=false \
-PisMainOrRelease=false 2>&1 | tee build.log

- name: Building OBR (manually)
shell: bash
working-directory: ${{ github.workspace }}/modules/obr
run: |
docker run --rm -v ${{ github.workspace }}/modules:/var/root/ ghcr.io/galasa-dev/galasabld-amd64:main template --releaseMetadata var/root/framework/release.yaml --releaseMetadata /var/root/extensions/release.yaml --releaseMetadata /var/root/managers/release.yaml --releaseMetadata /var/root/obr/release.yaml --template /var/root/obr/galasa-bom/pom.template --output /var/root/obr/galasa-bom/pom.xml --bom
set -o pipefail
mvn -f galasa-bom/pom.xml deploy -X \
-Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:///home/runner/.m2/repository \
-Dgpg.skip=true \
--batch-mode --errors --fail-at-end \
--settings settings.xml 2>&1 | tee galasa-bom-build.log
docker run --rm -v ${{ github.workspace }}/modules:/var/root/ ghcr.io/galasa-dev/galasabld-amd64:main template --releaseMetadata var/root/framework/release.yaml --releaseMetadata /var/root/extensions/release.yaml --releaseMetadata /var/root/managers/release.yaml --releaseMetadata /var/root/obr/release.yaml --template /var/root/obr/dev.galasa.uber.obr/pom.template --output /var/root/obr/dev.galasa.uber.obr/pom.xml --obr
set -o pipefail
mvn -f dev.galasa.uber.obr/pom.xml deploy -X \
-Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file:///home/runner/.m2/repository \
-Dgpg.skip=true \
--batch-mode --errors --fail-at-end \
--settings settings.xml 2>&1 | tee galasa-obr-build.log
make all
make all -C openapi2beans

- name: Building CLI (manually)
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,82 +1,93 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced (Java)"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths: [ "modules/platform/**", "modules/wrapping/**", "modules/gradle/**", "modules/maven/**", "modules/framework/**", "modules/extensions/**", "modules/managers/**", "modules/obr/**", "modules/ivts/**" ]

schedule:
- cron: '41 13 * * 0'

jobs:
analyze-java:
name: Analyze (Java)
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java-kotlin
build-mode: none
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

- name: Perform CodeQL Analysis Java
uses: github/codeql-action/analyze@v3
with:
category: "/language:java-kotlin"
checkout_path: ${{ github.workspace }}
output: results-java.sarif
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced (Java)"

on:
workflow_call:

schedule:
- cron: '41 13 * * 0'

jobs:
analyze-java:
name: Analyze (Java)
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download All 'dev.galasa' Artifacts
if: ${{ github.event_name == 'workflow_call' }}
uses: actions/download-artifact@v4
with:
name: all-artifacts
path: /home/runner/.m2/repository/dev/galasa

# Download from the last Main Build Orchestrator
# - name: Download All 'dev.galasa' Artifacts
# if: github.event_name == 'schedule'
# uses: actions/download-artifact@v4
# with:
# name: all-artifacts
# path: /home/runner/.m2/repository/dev/galasa

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java-kotlin
build-mode: none
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

- name: Perform CodeQL Analysis Java
uses: github/codeql-action/analyze@v3
with:
category: "/language:java-kotlin"
checkout_path: ${{ github.workspace }}
output: results-java.sarif
Loading
Loading