OY-4608 Rajaa temp-taulut pois raportoinnista #1294
Workflow file for this run
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: ehoks | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v3 | |
- name: Setup JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Install Dependencies | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: | | |
git clone https://github.com/Opetushallitus/ci-tools.git | |
lein deps | |
- name: Run Databases | |
shell: bash | |
env: | |
CONFIG: oph-configuration/test-ci.edn | |
run: | | |
./scripts/ci-scripts/run_postgres.sh | |
lein dbmigrate | |
make stamps/local-ddb-schema # DynamoDB | |
- name: Pre-Build | |
shell: bash | |
run: | | |
mkdir -p resources/uberjar | |
ARTIFACT_NAME=ehoks-oppija BUILD_ID="ci-$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT" ./scripts/buildversion.sh > resources/uberjar/buildversion.txt | |
- name: Run Tests | |
shell: bash | |
env: | |
CONFIG: oph-configuration/test-ci.edn | |
run: | | |
lein test | |
- name: Run Linter | |
shell: bash | |
run: | | |
make check-pom-xml | |
lein checkall | |
- name: Build | |
shell: bash | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
source ci-tools/common/setup-tools.sh | |
lein uberjar | |
mv target/ehoks-standalone.jar $DOCKER_BUILD_DIR/artifact/ehoks-oppija.jar | |
cp -vr oph-configuration $DOCKER_BUILD_DIR/config/ | |
export BASE_IMAGE="baseimage-fatjar-openjdk21:master" | |
export TRAVIS_BUILD_NUMBER="$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT" | |
./ci-tools/common/pull-image.sh | |
./ci-tools/build/build-fatjar.sh ehoks-oppija | |
mv $DOCKER_BUILD_DIR/artifact/ehoks-oppija.jar $DOCKER_BUILD_DIR/artifact/ehoks-virkailija.jar | |
./ci-tools/build/build-fatjar.sh ehoks-virkailija | |
mv $DOCKER_BUILD_DIR/artifact/ehoks-virkailija.jar $DOCKER_BUILD_DIR/artifact/ehoks-palaute.jar | |
./ci-tools/build/build-fatjar.sh ehoks-palaute | |
- name: Upload Package | |
shell: bash | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
source ci-tools/common/setup-tools.sh | |
export TRAVIS_BUILD_NUMBER="$GITHUB_RUN_NUMBER.$GITHUB_RUN_ATTEMPT" | |
export TRAVIS_BRANCH=${{ github.ref_name }} | |
export TRAVIS_COMMIT=${{ github.sha }} | |
./ci-tools/build/upload-image.sh ehoks-oppija | |
./ci-tools/build/upload-image.sh ehoks-virkailija | |
./ci-tools/build/upload-image.sh ehoks-palaute |