Fjern tilgang til gammel kafka-consumer #1035
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: Build & deploy | |
on: [ push ] | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Run tests | |
run: ./gradlew --no-daemon check --info | |
deploy-to-dev: | |
name: Deploy to dev | |
needs: test | |
######################### | |
### DEVELOPERS: Insert your feature branch name below (in addition to master) if you want to deploy it to dev | |
######################### | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/fjerne-begrepet-prioritertmaalgruppe' | |
runs-on: ubuntu-latest | |
outputs: | |
image: ${{ steps.docker-build-push.outputs.image }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Build jar with Gradle | |
run: ./gradlew --no-daemon shadowJar | |
- name: Push docker image to GAR | |
uses: nais/docker-build-push@v0 | |
id: docker-build-push | |
with: | |
team: toi | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: dev-fss | |
VAR: version=${{ steps.docker-build-push.outputs.image }} | |
RESOURCE: nais/nais-dev.yaml | |
deploy-to-prod: | |
name: Deploy to prod | |
needs: deploy-to-dev | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-fss | |
VAR: version=${{ needs.deploy-to-dev.outputs.image }} | |
RESOURCE: nais/nais-prod.yaml,nais/alerts.yml |