OY-5029 Käynnistetään virusskannauksen tulosten prosessointi vain lii… #167
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Liiteri | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '**.md' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Prepare clojure env | |
uses: ./.github/actions/prepare-clojure-env | |
- name: Run tests | |
env: | |
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
GA_BUILD_NUMBER: ${{ github.run_number }} | |
run: | | |
git clone https://github.com/Opetushallitus/ci-tools.git | |
source ci-tools/common/setup-tools.sh | |
docker run --name liiteri-test-db -e POSTGRES_PASSWORD=oph -e POSTGRES_USER=oph -e POSTGRES_DB=liiteri -p 16433:5432 -d postgres:15 | |
docker run --name liiteri-localstack -p 4566:4566 -d localstack/localstack:3.0.1 | |
npm install | |
CONFIG=dev-resources/local-test-config.edn ./bin/cibuild.sh run-tests | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare clojure env | |
uses: ./.github/actions/prepare-clojure-env | |
- name: Build | |
run: CONFIG=dev-resources/local-test-config.edn ./bin/cibuild.sh create-uberjar | |
- uses: actions/cache@v4 | |
id: restore-build | |
with: | |
path: target | |
key: ${{ github.sha }} | |
deploy: | |
needs: [ test, build ] | |
uses: Opetushallitus/.github/.github/workflows/push-scan-java-ecr.yml@main | |
with: | |
application: liiteri | |
base-image: baseimage-fatjar-openjdk21:master | |
configfolder: oph-configuration | |
jarfile: liiteri | |
jarfolder: target | |
secrets: | |
AWS_UTILITY_ROLE_ARN: ${{ secrets.AWS_OPH_UTILITY_ROLE_ARN }} | |
deploy-background: | |
needs: [ test, build ] | |
uses: Opetushallitus/.github/.github/workflows/push-scan-java-ecr.yml@main | |
with: | |
application: liiteri-background | |
base-image: baseimage-fatjar-openjdk21:OY-5029_liiteri_background | |
configfolder: oph-configuration | |
jarfile: liiteri | |
jarfolder: target | |
secrets: | |
AWS_UTILITY_ROLE_ARN: ${{ secrets.AWS_OPH_UTILITY_ROLE_ARN }} | |