Skip to content

ci: add pipeline to build and deploy test to aks-inn-cdn-nonprod-eno … #1

ci: add pipeline to build and deploy test to aks-inn-cdn-nonprod-eno …

ci: add pipeline to build and deploy test to aks-inn-cdn-nonprod-eno … #1

name: "Build Push and Deploy test"
on:
push:
paths-ignore:
- '**README.md'
branches:
- main
workflow_dispatch:
branches:
- main
env:
IMAGE_TAG: plattform.azurecr.io/helsesjekk-bot/test
permissions:
id-token: write
actions: read
contents: read
jobs:
docker_build_and_push:
runs-on: nrk-azure-intern
outputs:
image-digest: ${{ steps.docker_build.outputs.digest }}
steps:
- uses: docker/login-action@v2
with:
registry: ${{ secrets.PLATTFORM_CONTAINER_REGISTRY }}
username: ${{ secrets.PLATTFORM_ACR_PUSH_CLIENT_ID }}
password: ${{ secrets.PLATTFORM_ACR_PUSH_CLIENT_SECRET }}
- uses: docker/login-action@v2
with:
username: ${{ secrets.PLATTFORM_DOCKERHUB_PULL_SECRET_USERNAME }}
password: ${{ secrets.PLATTFORM_DOCKERHUB_PULL_SECRET_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build and push
id: docker_build
uses: docker/[email protected]
with:
push: true
tags: ${{ env.IMAGE_TAG }}:${{ github.run_number }}
deploy_to_kubernetes:
runs-on: nrk-azure-intern
needs: docker_build_and_push
steps:
- uses: actions/[email protected]
- uses: nrkno/[email protected]
id: vault-to-k8s-config
with:
vault-address: ${{ secrets.PLATTFORM_VAULT_URL }}
vault-role: helsesjekk-bot-github-test
cluster: aks-inn-cdn-nonprod-eno
namespace: helsesjekk-bot
- uses: azure/[email protected]
timeout-minutes: 10
with:
manifests: manifests/test/
images: |
${{ env.IMAGE_TAG }}:${{ github.run_number }}
annotate-namespace: false
action: deploy