Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added support for linux and windows web app #13

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version = 1

[[analyzers]]
name = "terraform"
14 changes: 14 additions & 0 deletions .github/workflows/auto_assignee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Assign PRs

on:
pull_request:
types: [opened, reopened]

workflow_dispatch:
jobs:
assignee:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
assignees: 'clouddrove-ci'
12 changes: 12 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Auto merge
on:
pull_request:
jobs:
auto-merge:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
with:
tfcheck: 'basic-example / Check code format'
...
5 changes: 3 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
- "*"
workflow_dispatch:
jobs:
call-workflow-changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master
changelog:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
secrets: inherit
with:
branch: 'master'
59 changes: 10 additions & 49 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,15 @@
name: 'Create README.md file'
name: Readme Workflow
on:
push:
branches:
- master

paths-ignore:
- 'README.md'
- 'docs/**'
workflow_dispatch:
jobs:
readme-create:
name: 'readme-create'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master

- name: 'Set up Python 3.7'
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB }}'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: 'pre-commit check errors'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'pre-commit fix erros'
uses: pre-commit/[email protected]
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/[email protected]'
continue-on-error: true
with:
actions_subcommand: 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'CloudDrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
if: always()
README:
uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master
secrets:
TOKEN : ${{ secrets.GITHUB }}
SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }}
30 changes: 0 additions & 30 deletions .github/workflows/semantic-releaser.yml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/static-checks.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/tf-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: tf-checks
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
complete-linux-example:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
with:
working_directory: './_example/complete/linux_web_app/'

complete-windows-example:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
with:
working_directory: './_example/complete/windows_web_app/'
11 changes: 11 additions & 0 deletions .github/workflows/tflint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: tf-lint
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
jobs:
tf-lint:
uses: clouddrove/github-shared-workflows/.github/workflows/[email protected]
secrets:
GITHUB: ${{ secrets.GITHUB }}
2 changes: 1 addition & 1 deletion .github/workflows/tfsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
jobs:
tfsec:
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master
uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@1.2.8
secrets: inherit
with:
working_directory: '.'
127 changes: 127 additions & 0 deletions _example/complete/linux_web_app/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
provider "azurerm" {
features {}
subscription_id = "068245d4-3c94-42fe-9c4d-9e5e1cabc60c"
}

##-----------------------------------------------------------------------------
## Resource group
##-----------------------------------------------------------------------------
module "resource_group" {
source = "clouddrove/resource-group/azure"
version = "1.0.2"

label_order = ["name", "environment"]
name = "rg-example"
environment = "test"
location = "Canada Central"
}

##-----------------------------------------------------------------------------
## Log Analytics
##-----------------------------------------------------------------------------
module "log-analytics" {
source = "clouddrove/log-analytics/azure"
version = "1.1.0"
name = "app"
environment = "test"
label_order = ["name", "environment"]
create_log_analytics_workspace = true
log_analytics_workspace_sku = "PerGB2018"
resource_group_name = module.resource_group.resource_group_name
log_analytics_workspace_location = module.resource_group.resource_group_location
log_analytics_workspace_id = module.log-analytics.workspace_id
}

##-----------------------------------------------------------------------------
## Linux web app
##-----------------------------------------------------------------------------
module "linux-web-app" {
source = "../../.."
enable = true
name = "app"
environment = "testing"
label_order = ["name", "environment", ]
resource_group_name = module.resource_group.resource_group_name
location = module.resource_group.resource_group_location

os_type = var.os_type
sku_name = var.linux_sku_name



##-----------------------------------------------------------------------------
## To Deploy Container
##-----------------------------------------------------------------------------
use_docker = false
docker_image_name = var.docker_image_name
docker_registry_url = "<registryname>.azurecr.io"
docker_registry_username = "<registryname>"
docker_registry_password = "<docker_registry_password>"
acr_id = "<acr_id>"

##-----------------------------------------------------------------------------
## Node application
##-----------------------------------------------------------------------------
use_node = true
node_version = var.node_version

##-----------------------------------------------------------------------------
## Dot net application
##-----------------------------------------------------------------------------
use_dotnet = false
dotnet_version = var.dotnet_version

##-----------------------------------------------------------------------------
## Java application
##-----------------------------------------------------------------------------
use_java = false
java_version = var.java_version
java_server = var.java_server
java_server_version = var.java_server_version


##-----------------------------------------------------------------------------
## python application
##-----------------------------------------------------------------------------

use_python = false
python_version = var.python_version

##-----------------------------------------------------------------------------
## php application
##-----------------------------------------------------------------------------

use_php = false
php_version = var.php_version

##-----------------------------------------------------------------------------
## Ruby application
##-----------------------------------------------------------------------------

use_ruby = false
ruby_version = var.ruby_version

##-----------------------------------------------------------------------------
## Go application
##-----------------------------------------------------------------------------

use_go = false
go_version = var.go_version

site_config = var.site_config
app_settings = var.app_settings

##-----------------------------------------------------------------------------
## App service logs
##-----------------------------------------------------------------------------

app_service_logs = var.app_service_logs


##-----------------------------------------------------------------------------
## log analytics
##-----------------------------------------------------------------------------
log_analytics_workspace_id = module.log-analytics.workspace_id
app_insights_workspace_id = module.log-analytics.workspace_id # log analytics workspace id in app insights
}

Loading