From aa3815becef90376df8c338cdd60c4c2498871c5 Mon Sep 17 00:00:00 2001 From: Alexander Petrov Date: Thu, 21 Sep 2023 15:43:27 +0200 Subject: [PATCH] enable kafka topic deploy, slett gammel deploy action --- .github/workflows/kafka-dev.yaml | 48 +++++++++++++------------- .github/workflows/main.yaml | 58 -------------------------------- 2 files changed, 24 insertions(+), 82 deletions(-) delete mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/kafka-dev.yaml b/.github/workflows/kafka-dev.yaml index fcc80314..05f207ca 100644 --- a/.github/workflows/kafka-dev.yaml +++ b/.github/workflows/kafka-dev.yaml @@ -1,25 +1,25 @@ -#name: Deploy kafka topics to dev -#on: -# push: -# branches: -# - 'main' -# paths: -# - '.nais/kafka/kafka-dev.yaml' -# - '.github/workflows/kafka-dev.yaml' -#env: -# TOPIC_FILE: .nais/kafka/kafka-dev.yaml +name: Deploy kafka topics to dev +on: + push: + branches: + - 'main' + paths: + - '.nais/kafka/kafka-dev.yaml' + - '.github/workflows/kafka-dev.yaml' +env: + TOPIC_FILE: .nais/kafka/kafka-dev.yaml -#jobs: -# deploy-to-dev: -# name: Deploy to dev-gcp -# runs-on: ubuntu-latest -# steps: -# - name: Checkout -# uses: actions/checkout@v2 -# - name: Deploy topics to dev -# uses: nais/deploy/actions/deploy@v1 -# env: -# APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} -# CLUSTER: dev-gcp -# VAR: kafka-pool=nav-dev -# RESOURCE: ${{ env.TOPIC_FILE }} +jobs: + deploy-to-dev: + name: Deploy to dev-gcp + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Deploy topics to dev + uses: nais/deploy/actions/deploy@v1 + env: + APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} + CLUSTER: dev-gcp + VAR: kafka-pool=nav-dev + RESOURCE: ${{ env.TOPIC_FILE }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml deleted file mode 100644 index e37102bb..00000000 --- a/.github/workflows/main.yaml +++ /dev/null @@ -1,58 +0,0 @@ -#name: "Build and deploy ebxml-processor" -#on: -# push: -# branches: -# - "main" -#env: -# "IMAGE": "ghcr.io/${{ github.repository }}:${{ github.sha }}" -#jobs: -# "build": -# name: "build" -# runs-on: "ubuntu-20.04" -# steps: -# - uses: "actions/checkout@v3" -# - uses: "actions/cache@v3" -# with: -# "path": "~/.m2/repository" -# "key": "${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}" -# "restore-keys": "${{ runner.os }}-maven-" -# - uses: "actions/setup-java@v3" -# with: -# "java-version": "17" -# "distribution": "temurin" -# - name: "compile and run tests" -# run: "mvn install" -# - name: "Login to GitHub Docker Registry" -# uses: "docker/login-action@v2" -# with: -# "registry": "ghcr.io" -# "username": "${{ github.actor }}" -# "password": "${{ secrets.GITHUB_TOKEN }}" -# - name: "Build and push the Docker image" -# run: "docker build --pull --tag ${IMAGE} . && docker push ${IMAGE}" -# "deployAppToDev": -# name: "Deploy app to dev" -# needs: "build" -# runs-on: "ubuntu-20.04" -# steps: -# - uses: "actions/checkout@v3" -# - name: "Deploy to DEV" -# uses: "nais/deploy/actions/deploy@v1" -# env: -# "APIKEY": "${{ secrets.NAIS_DEPLOY_APIKEY }}" -# "CLUSTER": "dev-gcp" -# "RESOURCE": ".nais/nais.yaml" -# "VARS": ".nais/dev.yaml" -# "deployAppToProd": -# name: "Deploy app to prod" -# needs: "deployAppToDev" -# runs-on: "ubuntu-20.04" -# steps: -# - uses: "actions/checkout@v3" -# - name: "Deploy to PROD" -# uses: "nais/deploy/actions/deploy@v1" -# env: -# "APIKEY": "${{ secrets.NAIS_DEPLOY_APIKEY }}" -# "CLUSTER": "prod-gcp" -# "RESOURCE": ".nais/nais.yaml" -# "VARS": ".nais/prod.yaml"