Skip to content

Legger til ny BehandlingÅrsak 'NY_UTVIDET_KLASSEKODE' (#150) #135

Legger til ny BehandlingÅrsak 'NY_UTVIDET_KLASSEKODE' (#150)

Legger til ny BehandlingÅrsak 'NY_UTVIDET_KLASSEKODE' (#150) #135

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-and-deploy-artifact:
name: Build and deploy to github package
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: Cache Maven dependencies
uses: actions/cache@preview
id: cache
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Resolve/Update Dependencies
run: mvn package dependency:resolve-plugins dependency:go-offline
- name: Build (and run tests)
run: mvn clean install
- name: Ta vare på siste sha for saksstatistikk og stonadsstatistikk
run: |
echo "saksstatistikk_rev=$(git rev-list -1 HEAD -- "saksstatistikk")" >> $GITHUB_ENV
echo "saksstatistikk-klage_rev=$(git rev-list -1 HEAD -- "saksstatistikk-klage")" >> $GITHUB_ENV
echo "stonadsstatistikk_rev=$(git rev-list -1 HEAD -- "stonadsstatistikk")" >> $GITHUB_ENV
echo "stonadsstatistikk-ks_rev=$(git rev-list -1 HEAD -- "stonadsstatistikk-ks")" >> $GITHUB_ENV
echo "skatteetaten_rev=$(git rev-list -1 HEAD -- "skatteetaten")" >> $GITHUB_ENV
echo "saksstatistikk $(git rev-list -1 HEAD -- "saksstatistikk")"
echo "stonadsstatistikk $(git rev-list -1 HEAD -- "stonadsstatistikk")"
echo "stonadsstatistikk-ks $(git rev-list -1 HEAD -- "stonadsstatistikk-ks")"
echo "saksstatistikk-klage $(git rev-list -1 HEAD -- "saksstatistikk-klage")"
echo "skatteetaten $(git rev-list -1 HEAD -- "skatteetaten")"
echo "bisys $(git rev-list -1 HEAD -- "bisys")"
echo "bisys_rev=$(git rev-list -1 HEAD -- "bisys")" >> $GITHUB_ENV
echo "arbeidsoppfolging $(git rev-list -1 HEAD -- "arbeidsoppfolging")"
echo "arbeidsoppfolging_rev=$(git rev-list -1 HEAD -- "arbeidsoppfolging")" >> $GITHUB_ENV
echo "gha.sha ${{ github.sha }}"
- name: EF - Ta vare på siste sha for saksstatistikk og stonadsstatistikk
run: |
echo "saksstatistikk_ef_rev=$(git rev-list -1 HEAD -- "saksstatistikk-ef")" >> $GITHUB_ENV
echo "stonadsstatistikk_ef_rev=$(git rev-list -1 HEAD -- "stonadsstatistikk-ef")" >> $GITHUB_ENV
echo "saksstatistikk_ef $(git rev-list -1 HEAD -- "saksstatistikk-ef")"
echo "stonadsstatistikk_ef $(git rev-list -1 HEAD -- "stonadsstatistikk-ef")"
echo "gha.sha ${{ github.sha }}"
- name: Setting version
run: |
export GIT_COMMIT_HASH=$(git log -n 1 --pretty=format:'%h')
export GIT_COMMIT_DATE=$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')
export VERSION=2.0_${GIT_COMMIT_DATE}_${GIT_COMMIT_HASH}
echo "Setting version $VERSION"
mvn versions:set -DnewVersion="$VERSION"
mvn versions:commit
- name: Deploy saksstatistikk ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.saksstatistikk_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl saksstatistikk source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy saksstatistikk-klage ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.saksstatistikk-klage_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl saksstatistikk-klage source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy stonadsstatistikk ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.stonadsstatistikk_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl stonadsstatistikk source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy stonadsstatistikk-ks ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.stonadsstatistikk-ks_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl stonadsstatistikk-ks source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy saksstatistikk-ef ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.saksstatistikk_ef_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl saksstatistikk-ef source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy stonadsstatistikk-ef ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.stonadsstatistikk_ef_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl stonadsstatistikk-ef source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy skatteetaten ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.skatteetaten_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl skatteetaten source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy bisys ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.bisys_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl bisys source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false
- name: Deploy arbeidsoppfolging ved endring
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: env.arbeidsoppfolging_rev == github.sha
run: mvn --settings .github/maven-settings.xml -pl arbeidsoppfolging source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false