-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from natura-jenkins/TL-1-teste-workflow
TL-1-teste-workflow
- Loading branch information
Showing
11 changed files
with
374 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.github @lucianobeja | ||
CODEOWNERS @lucianobeja |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Sonnar: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: echo "Teste" | ||
|
||
Dependecy-Check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: echo "Teste" | ||
|
||
Test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: echo "Teste" | ||
|
||
needs: [Sonnar, Dependecy-Check] | ||
|
||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: echo "Teste" | ||
|
||
needs: [Test] | ||
|
||
Publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: echo "Teste" | ||
|
||
needs: [Build] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: nodejs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
workflow-nodejs: | ||
uses: lucianobeja79/workflows-config/.github/workflows/nodejs.yml@main | ||
with: | ||
name: 'workflow-app' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: workflow-main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
workflow-app: | ||
uses: lucianobeja79/workflows-config/.github/workflows/workflow-app.yml@main | ||
with: | ||
name: 'workflow-app' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: workflow-app | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- dev | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
workflow-deploy: | ||
uses: lucianobeja79/workflow-deploy/.github/workflows/kubernetes.yml@main | ||
with: | ||
name: 'workflow-app' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
NODE_VERSION: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js | ||
run: echo "Using Node.js | ||
|
||
- name: npm install, build, and test | ||
run: echo "npm install, build, and test" | ||
|
||
- name: Zip artifact for deployment | ||
run: echo "Zip artifact for deployment" | ||
|
||
- name: Upload artifact for deployment job | ||
run: echo "Upload artifact for deployment job" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
Sonnar: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Sonnar | ||
run: echo "Teste" | ||
|
||
Dependecy-Check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Dependecy-Check | ||
run: echo "Teste" | ||
|
||
Test-Unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test Unit | ||
run: echo "Teste" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build Artifact and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
type: choice | ||
options: | ||
- info | ||
- warning | ||
- debug | ||
tags: | ||
description: 'Test scenario tags' | ||
required: false | ||
type: boolean | ||
environment: | ||
description: 'Environment to run tests against' | ||
type: environment | ||
required: true | ||
|
||
env: | ||
AZURE_WEBAPP_NAME: my-app-name # set this to your application's name | ||
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
NODE_VERSION: '16.x' # set this to the node version to use | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
uses: ./.github/workflows/ci.yaml | ||
|
||
build: | ||
needs: ci | ||
name: Build | ||
uses: ./.github/workflows/build.yaml | ||
|
||
deploy-dev: | ||
needs: build | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [Development, Perfornance, Quality] | ||
uses: ./.github/workflows/deployment.yaml | ||
with: | ||
target-env: ${{ matrix.target }} | ||
secrets: inherit | ||
|
||
functional-test: | ||
needs: deploy-dev | ||
name: Functional Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test Functional | ||
run: echo "Test Functional" | ||
|
||
deploy-prd: | ||
needs: functional-test | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [Production] | ||
uses: ./.github/workflows/deployment.yaml | ||
with: | ||
target-env: ${{ matrix.target }} | ||
secrets: inherit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Deployment Multiples Environment | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
target-env: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to ${{ inputs.target-env }} | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ inputs.target-env }} | ||
|
||
steps: | ||
- run: echo "🎉 target evn ${{ inputs.target-env}}" | ||
- run: echo "🎉 target evn inputs.target-env" | ||
- run: echo "🍏 is Dev ${{ inputs.target-env }} == 'Development'" | ||
- run: echo "🐧 is Prod ${{ inputs.target-env }} == 'Production'" | ||
|
||
- name: Download artifact from build job | ||
run: echo "Download artifact from build job" | ||
|
||
- name: unzip artifact for deployment | ||
run: echo "unzip artifact for deployment" | ||
|
||
- name: "Deploy to ${{ inputs.target-env }}" | ||
if: inputs.target-env == 'Development' | ||
id: deploy-to-dev | ||
run: echo "Deploy to Dev" | ||
|
||
- name: "Deploy to ${{ inputs.target-env }}" | ||
run: echo "Deploy to ${{ inputs.target-env }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Build Artifact and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
type: choice | ||
options: | ||
- info | ||
- warning | ||
- debug | ||
tags: | ||
description: 'Test scenario tags' | ||
required: false | ||
type: boolean | ||
environment: | ||
description: 'Environment to run tests against' | ||
type: environment | ||
required: true | ||
|
||
env: | ||
AZURE_WEBAPP_NAME: my-app-name # set this to your application's name | ||
AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
NODE_VERSION: '16.x' # set this to the node version to use | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
run: echo "Using Node.js ${{ env.NODE_VERSION }}" | ||
|
||
- name: npm install, build, and test | ||
run: echo "npm install, build, and test" | ||
|
||
- name: Zip artifact for deployment | ||
run: echo "Zip artifact for deployment" | ||
|
||
- name: Upload artifact for deployment job | ||
run: echo "Upload artifact for deployment job" | ||
|
||
deployDev: | ||
name: Deploy to Dev | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: "Development" | ||
url: ${{ steps.deploy-to-webapp-dev.outputs.run }} | ||
|
||
steps: | ||
- name: Download artifact from build job | ||
run: echo "Download artifact from build job" | ||
|
||
- name: unzip artifact for deployment | ||
run: echo "unzip artifact for deployment" | ||
|
||
- name: "Deploy to Azure Dev WebApp" | ||
id: deploy-to-webapp-dev | ||
run: echo "Deploy to Azure Dev WebApp" | ||
|
||
|
||
deployProd: | ||
name: Deploy to Production | ||
permissions: | ||
contents: none | ||
runs-on: ubuntu-latest | ||
needs: deployDev | ||
environment: | ||
name: "Production" | ||
url: ${{ steps.deploy-to-webapp-prd.outputs.run }} | ||
|
||
steps: | ||
- name: Download artifact from build job | ||
run: echo "Download artifact from build job" | ||
|
||
- name: unzip artifact for deployment | ||
run: echo "unzip artifact for deployment" | ||
|
||
- name: "Deploy to Azure Dev WebApp" | ||
id: deploy-to-webapp-prd | ||
run: echo "Deploy to Azure Dev WebApp" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# teste | ||
teste13 | ||
sfsdf |