Skip to content

Commit

Permalink
test with deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 committed Jan 23, 2024
1 parent 824902b commit 66ee6e5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 66 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/call_release_function.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:

steps:

- name: Setup Maven Action
uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # v1.11.0
with:
checkout-fetch-depth: 0
java-version: 17
java-distribution: 'temurin'
maven-version: '3.9.5'
cache-enabled: true
# - name: Setup Maven Action
# uses: s4u/setup-maven-action@fa2c7e4517ed008b1f73e7e0195a9eecf5582cd4 # v1.11.0
# with:
# checkout-fetch-depth: 0
# java-version: 17
# java-distribution: 'temurin'
# maven-version: '3.9.5'
# cache-enabled: true

- name: Build Functions App
shell: bash
run: |
mvn --projects :onboarding-functions --also-make package install -DskipTests \
-Dquarkus.azure-functions.app-name=${{ vars.AZURE_ONBOARDING_FN_APP_NAME }}
# - name: Build Functions App
# shell: bash
# run: |
# mvn --projects :onboarding-functions --also-make package install -DskipTests \
# -Dquarkus.azure-functions.app-name=${{ vars.AZURE_ONBOARDING_FN_APP_NAME }}

- name: Log in to Azure
uses: azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
Expand All @@ -44,14 +44,14 @@ jobs:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Deploy Function App
shell: bash
working-directory: apps/onboarding-functions
run: |
mvn -f pom.xml quarkus:deploy \
-Dquarkus.azure-functions.app-name=${{ vars.AZURE_ONBOARDING_FN_APP_NAME }} \
-Dquarkus.azure-functions.subscription-id=${{ secrets.AZURE_SUBSCRIPTION_ID }} \
-Dquarkus.azure-functions.resource-group=${{ vars.AZURE_ONBOARDING_FN_RESOURCE_GROUP }} \
-Dquarkus.azure-functions.region=westeurope \
-Dquarkus.azure-functions.app-service-plan-name=${{ vars.AZURE_ONBOARDING_FN_SERVICE_PLAN }} \
-Dquarkus.azure-functions.runtime.java-version=17
# - name: Deploy Function App
# shell: bash
# working-directory: apps/onboarding-functions
# run: |
# mvn -f pom.xml quarkus:deploy \
# -Dquarkus.azure-functions.app-name=${{ vars.AZURE_ONBOARDING_FN_APP_NAME }} \
# -Dquarkus.azure-functions.subscription-id=${{ secrets.AZURE_SUBSCRIPTION_ID }} \
# -Dquarkus.azure-functions.resource-group=${{ vars.AZURE_ONBOARDING_FN_RESOURCE_GROUP }} \
# -Dquarkus.azure-functions.region=westeurope \
# -Dquarkus.azure-functions.app-service-plan-name=${{ vars.AZURE_ONBOARDING_FN_SERVICE_PLAN }} \
# -Dquarkus.azure-functions.runtime.java-version=17
59 changes: 17 additions & 42 deletions .github/workflows/release_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
branches:
- main
- releases/**
- EC-96-pipeline-deployment-con-supporto-ambienti # TODO: remove
paths:
- 'apps/onboarding-functions/**'
- "apps/pom.xml"
- "pom.xml"
- EC-97-pipeline-function-app-deployment-aggiunta-supporto-ambienti-e-branch # TODO: remove
# paths:
# - 'apps/onboarding-functions/**'
# - "apps/pom.xml"
# - "pom.xml"

# New branch created from main, deploy it in UAT
workflow_run:
Expand All @@ -18,36 +18,10 @@ on:
types:
- completed

# TODO: remove
pull_request:
branches:
- main
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review
paths:
- 'apps/onboarding-functions/**'
- "apps/pom.xml"

# deploy UAT when create a new branch release*, condition below contains() permit to execute worflow only for 'release' branch
# create:

workflow_dispatch: # choose the branch
# inputs:
# environment:
# required: true
# type: choice
# description: Select the Environment
# options:
# - dev
# - uat
# - prod

# env:
# ENV_NAME: "${{ inputs.environment != null && inputs.environment || (github.base_ref == 'main' && 'dev' || (contains(github.ref_name, 'release') && 'uat' || 'dev')) }}"
workflow_dispatch:

jobs:

Expand All @@ -67,7 +41,7 @@ jobs:

release_dev:
uses: ./.github/workflows/call_release_function.yml
name: Dev Release OnBoarding function
name: '[Dev] OnBoarding function Release'
# needs: [environment] TODO: change
# if: github.ref_name == 'main'
if: startsWith(github.ref_name, 'ec-97')
Expand All @@ -77,18 +51,19 @@ jobs:

release_uat:
uses: ./.github/workflows/call_release_function.yml
name: UAT OnBoarding function Release
name: '[UAT] OnBoarding function Release'
needs: [release_dev] # TODO: change
if: startsWith(github.ref_name, 'ec-97')
secrets: inherit
with:
environment: uat

# release_prod:
# uses: ./.github/workflows/call_release_function.yml
# name: Prod OnBoarding function Release
# needs: [release_uat]
# if: startsWith(github.ref_name, 'releases/')
# secrets: inherit
# with:
# environment: prod
release_prod:
uses: ./.github/workflows/call_release_function.yml
name: '[Prod] OnBoarding function Release'
needs: [release_uat]
if: (needs.release_uat.result == 'skipped' || needs.release_uat.result == 'success') && startsWith(github.ref_name, 'ec-97')
# if: startsWith(github.ref_name, 'releases/')
secrets: inherit
with:
environment: prod

0 comments on commit 66ee6e5

Please sign in to comment.