Skip to content

Commit

Permalink
Opprettt konfig for bidrag-vedtak syntetisk
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur93 committed Aug 16, 2023
1 parent 66c6a0f commit 61f9e53
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 37 deletions.
29 changes: 2 additions & 27 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to dev
on:
push:
branches:
- '**'
- 'test'

env:
GITHUB_USERNAME: x-access-token
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
distribution: 'temurin'
- uses: actions/cache@v3
with:
path: ~/.m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
Expand Down Expand Up @@ -103,9 +103,6 @@ jobs:
RESOURCE: deploy/.nais/nais.yaml
VARS: deploy/.nais/syntetisk.yaml
IMAGE: ${{ needs.build.outputs.image }}
outputs:
image: ${{ needs.build.outputs.image }}
version: ${{ needs.build.outputs.tag }}

deploy-feature:
runs-on: ubuntu-latest
Expand All @@ -126,28 +123,6 @@ jobs:
VARS: deploy/.nais/feature.yaml
IMAGE: ${{ needs.build.outputs.image }}

tag:
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
steps:
- uses: actions/checkout@v3
- run: |
echo ${{ needs.build.outputs.tag }}
- name: Push latest image as tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ needs.build.outputs.tag }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

run_cucumber_tests-main:
runs-on: ubuntu-latest
name: Run cucumber tests main
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy to prod
on:
push:
branches:
- main
- '**'
env:
GITHUB_USERNAME: x-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -22,7 +22,7 @@ jobs:
distribution: 'temurin'
- uses: actions/cache@v3
with:
path: ~/.m2
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
Expand All @@ -35,7 +35,7 @@ jobs:
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
outputs:
image: ${{ steps.docker-push.outputs.image }}
version: ${{ steps.docker-push.outputs.new_version }}
tag: ${{ steps.docker-push.outputs.tag }}

deploy:
runs-on: ubuntu-latest
Expand All @@ -49,27 +49,30 @@ jobs:
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
CLUSTER: dev-gcp
RESOURCE: deploy/.nais/nais.yaml
VARS: deploy/.nais/prod.yaml
VARS: deploy/.nais/main.yaml
IMAGE: ${{ needs.build.outputs.image }}
outputs:
image: ${{ needs.build.outputs.image }}
version: ${{ needs.build.outputs.version }}
tag: ${{ needs.build.outputs.tag }}

tag:
runs-on: ubuntu-latest
needs: deploy
permissions:
contents: write
needs: build
steps:
- uses: actions/checkout@v3
- name: Push latest image as tag
- name: Push latest image tag as github tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ needs.build.outputs.tag }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ needs.deploy.outputs.version }}
name: Release ${{ needs.deploy.outputs.version }}
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

0 comments on commit 61f9e53

Please sign in to comment.