Skip to content

OK-589 Build ovara-valintapiste #27

OK-589 Build ovara-valintapiste

OK-589 Build ovara-valintapiste #27

Workflow file for this run

name: Valintapiste-service
on:
workflow_dispatch:
push:
paths-ignore:
- '**.md'
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dcodeIO/setup-node-nvm@master
with:
node-version: lts/*
- name: Prepare clojure env
uses: ./.github/actions/prepare-clojure-env
- name: Run tests and build uberjar
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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
#psql -c "create database valintapiste_test;" -U postgres
#psql -d valintapiste_test -f init_travis_potsgres.sql
#cp -v test.valintapisteservice.travis.edn test.valintapisteservice.edn
lein test
lein do clean, with-profile service:siirtotiedostot uberjar
- uses: actions/cache@v2
id: restore-build
with:
path: target
key: ${{ github.sha }}
deploy-container:
needs: [ test-and-build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: restore-build
with:
path: target
key: ${{ github.sha }}
- name: Deploy Docker containers
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
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
export BASE_IMAGE="baseimage-fatjar-openjdk8:master"
./ci-tools/common/pull-image.sh
mv target/valintapiste-service-*-standalone.jar $DOCKER_BUILD_DIR/artifact/valintapiste-service.jar
cp -vr oph-configuration $DOCKER_BUILD_DIR/config/
./ci-tools/github-build/build-fatjar.sh valintapiste-service
./ci-tools/github-build/upload-image.sh valintapiste-service
./ci-tools/common/clean-docker-build-dir.sh
export BASE_IMAGE="baseimage-fatjar-openjdk11:master"
./ci-tools/common/pull-image.sh
mv target/ovara-valintapiste-service-*-standalone.jar $DOCKER_BUILD_DIR/artifact/ovara-valintapiste.jar
cp -vr oph-configuration $DOCKER_BUILD_DIR/config/
./ci-tools/github-build/build-fatjar.sh ovara-valintapiste
./ci-tools/github-build/upload-image.sh ovara-valintapiste
./ci-tools/common/clean-docker-build-dir.sh