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 #8

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
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
169 changes: 169 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# 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: Acuity Build

on:
pull_request: # build on pull request changes
branches: [ "**" ]

jobs:

security-build:

runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:

- uses: actions/checkout@v3

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Build
run: mvn -B package deploy -P grunt,checks,docker

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: clns-acuity-va-security

config-build:

runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:

- uses: actions/checkout@v3

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Build
run: mvn -B package deploy -P docker

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: clns-acuity-config-server

vahub-build:

runs-on: ubuntu-latest
needs: [security-build]

permissions:
contents: read
packages: write

steps:

- uses: actions/checkout@v3

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Build
run: mvn -B package deploy -P docker,webapp,github

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: clns-acuity-vahub

adminui-build:

runs-on: ubuntu-latest
needs: [security-build]

permissions:
contents: read
packages: write

steps:

- uses: actions/checkout@v3

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Build
run: mvn -B package deploy -P docker,github

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: clns-acuity-admin

flyway-and-postgres-build:

runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:

- uses: actions/checkout@v3

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'

- name: Build Flyway
run: mvn -B package deploy -P docker-flyway

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: clns-acuity-flyway

- name: Build Postgres
run: mvn -B package deploy -P docker-postgres

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: clns-acuity-flyway
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.iml
/.idea
2 changes: 1 addition & 1 deletion clns-acuity-admin/acuity-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
<registry>ghcr.io</registry>
<images>
<image>
<name>ghcr.io/digital-ecmt/${project.artifactId}</name>
<name>ghcr.io/epam/acuity/${project.artifactId}</name>
<build>
<dockerFile>${project.basedir}/Dockerfile</dockerFile >
<tags>
Expand Down
8 changes: 4 additions & 4 deletions clns-acuity-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@

<distributionManagement>
<repository>
<id>github-packages</id>
<name>digitalECMT.releases</name>
<url>https://maven.pkg.github.com/digital-ECMT/acuity-admin</url>
<id>github</id>
<name>github</name>
<url>https://maven.pkg.github.com/epam/acuity</url>
</repository>
</distributionManagement>

Expand Down Expand Up @@ -472,7 +472,7 @@
<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/digital-ECMT/va-security</url>
<url>https://maven.pkg.github.com/epam/acuity</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
Expand Down
8 changes: 4 additions & 4 deletions clns-acuity-config-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@

<distributionManagement>
<repository>
<id>github-packages</id>
<name>digitalECMT.releases</name>
<url>https://maven.pkg.github.com/digital-ECMT/acuity-config-server</url>
<id>github</id>
<name>github</name>
<url>https://maven.pkg.github.com/epam/acuity</url>
</repository>
</distributionManagement>

Expand Down Expand Up @@ -113,7 +113,7 @@
<registry>ghcr.io</registry>
<images>
<image>
<name>ghcr.io/digital-ecmt/${project.artifactId}</name>
<name>ghcr.io/epam/acuity/${project.artifactId}</name>
<build>
<dockerFile>${project.basedir}/Dockerfile</dockerFile >
<tags>
Expand Down
2 changes: 1 addition & 1 deletion clns-acuity-docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ STORAGE_PROFILE=azure-storage
# ACUITY version (in fact, it's the version of all Docker images); also, "latest" will work
ACUITY_VERSION=9.0-beryllium-SNAPSHOT
# Docker registry from which images are to be downloaded; If you use locally built images or plan to download them from Docker Hub, leave it empty (that's why the value should contain trailing slash)
REPOSITORY_AND_SLASH=ghcr.io/digital-ecmt/
REPOSITORY_AND_SLASH=ghcr.io/epam/acuity/
2 changes: 1 addition & 1 deletion clns-acuity-docker/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ STORAGE_PROFILE=local-storage
# ACUITY version (in fact, it's the version of all Docker images); also, "latest" will work
ACUITY_VERSION=9.0-beryllium-SNAPSHOT
# Docker registry from which images are to be downloaded; If you use locally built images or plan to download them from Docker Hub, leave it empty (that's why the value should contain trailing slash)
REPOSITORY_AND_SLASH=ghcr.io/digital-ecmt/
REPOSITORY_AND_SLASH=ghcr.io/epam/acuity/
4 changes: 2 additions & 2 deletions clns-acuity-flyway/Dockerfile_PG
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/postgres:11.10
FROM docker.io/postgres:11.20-bullseye

WORKDIR /usr/root

Expand All @@ -7,4 +7,4 @@ COPY ./docker_resources/postgres/create_db.sql /docker-entrypoint-initdb.d
RUN apt update \
&& apt-get install postgresql-11-orafce -y

EXPOSE 5432
EXPOSE 5432
10 changes: 5 additions & 5 deletions clns-acuity-flyway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<registry>ghcr.io</registry>
<images>
<image>
<name>ghcr.io/digital-ecmt/acuity-flyway</name>
<name>ghcr.io/epam/acuity/acuity-flyway</name>
<build>
<dockerFile>${project.basedir}/Dockerfile_Flyway</dockerFile >
<tags>
Expand Down Expand Up @@ -93,7 +93,7 @@
<registry>ghcr.io</registry>
<images>
<image>
<name>ghcr.io/digital-ecmt/acuity-postgresql</name>
<name>ghcr.io/epam/acuity/acuity-postgresql</name>
<build>
<dockerFile>${project.basedir}/Dockerfile_PG</dockerFile >
<tags>
Expand All @@ -112,9 +112,9 @@

<distributionManagement>
<repository>
<id>github-packages</id>
<name>digitalECMT.releases</name>
<url>https://maven.pkg.github.com/digital-ECMT/acuity-flyway</url>
<id>github</id>
<name>github</name>
<url>https://maven.pkg.github.com/epam/acuity</url>
</repository>
</distributionManagement>

Expand Down

This file was deleted.

33 changes: 0 additions & 33 deletions clns-acuity-va-security/.github/workflows/test-pull-request.yml

This file was deleted.

4 changes: 2 additions & 2 deletions clns-acuity-va-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
<distributionManagement>
<repository>
<id>github</id>
<name>digitalECMT.releases</name>
<url>https://maven.pkg.github.com/digital-ECMT/acuity-va-security</url>
<name>github</name>
<url>https://maven.pkg.github.com/epam/acuity</url>
</repository>
</distributionManagement>

Expand Down
2 changes: 1 addition & 1 deletion clns-acuity-va-security/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
<registry>ghcr.io</registry>
<images>
<image>
<name>ghcr.io/digital-ecmt/${project.artifactId}</name>
<name>ghcr.io/epam/acuity/${project.artifactId}</name>
<build>
<dockerFile>${project.basedir}/Dockerfile</dockerFile >
<tags>
Expand Down
Loading