Skip to content
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
69 changes: 69 additions & 0 deletions .github/docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Contributor Code of Conduct

**Table of Contents:**

* [Summary](#summary)
* [Our Standards](#our-standards)
* [Our Responsibilities](#our-responsibilities)
* [Scope](#scope)
* [Enforcement](#enforcement)
* [Attribution](#attribution)

**Version**: 1.0.2

## Summary

As contributors and maintainers of Embedded Artistry projects, we will respect everyone who contributes by posting issues, updating documentation, submitting pull requests, providing feedback in comments, and any other activities.

Communication regarding Embedded Artistry projects through any channel must be constructive and never resort to personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Courtesy and respect shall be extended to everyone involved in this project. Our experiences as individuals differs widely, and as such contributors are expected to be respectful of differing viewpoints and ideas.

We expect all contributors to uphold our standards of conduct. If any member of the community violates this code of conduct, the Embedded Artistry team and project maintainers will take action. We reserve the right to remove issues, comments, and PRs that do not comply with our conduct standards. Repeated or significant offenses will result in blocked accounts and disassociation with our projects and the Embedded Artistry community.

If you are subject to or witness unacceptable behavior, or have any other concerns, please email us at contact@embeddedartistry.com.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling
* Insults or other derogatory comments
* Personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, discussions in the Embedded Artistry forum, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting Embedded Artistry at contact@embeddedartistry.com.

All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. We are obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], [version 1.4][version]

[homepage]: https://www.contributor-covenant.org
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
321 changes: 321 additions & 0 deletions .github/docs/CONTRIBUTING.md

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions .github/docs/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Pull Request Template

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Configuration**:
* Firmware version:
* Hardware:
* Toolchain:
* SDK:

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] I have checked my code and corrected any misspellings
114 changes: 0 additions & 114 deletions .github/workflows/build.yml

This file was deleted.

140 changes: 140 additions & 0 deletions .github/workflows/config-server-profile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@

###
### Pipeline que insere o arquivo .env no ambiente do github
### E arquivo configmap.yml ao ambiente k8s
###

name: Config Server Profile Pipeline

on:
pull_request:
paths:
- 'app/profile/**'
- '.github/workflows/config-server-profile.yml'
branches:
- 'main'
- 'develop'
- 'hotfix/**'
- 'release/**'
workflow_dispatch:
env:
GITHUB_REPOSITORY: brazona/conf
APP: CONFIG_
jobs:
#identifica as variaveis
info-environment:
name: Identifying the Environment
permissions: write-all
uses: ./.github/workflows/identifier.yml
with:
github_base_ref: ${{github.base_ref}}
github_event_name: ${{github.event_name }}
github_ref_name: ${{github.ref_name}}
app_name: conf

# Realiza leitura do arquivo .env
read-file:
name: Read File Env
runs-on: ubuntu-latest
permissions: write-all
needs: [info-environment]
env:
PATH_FILE_ENV: ${{needs.info-environment.outputs.github_env_file_field}}
FILE_VALUE: ""
environment:
name: ${{needs.info-environment.outputs.environment_name}}
outputs:
file: ${{ steps.file.outputs.file-env }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Definition path file
run: |
echo $(cat ${{ env.PATH_FILE_ENV }}) >> "env-temp.txt"
#sed -i 's/\s\+/\n/g' env-temp.txt
#cat env-temp.txt
echo "FILE_VALUE=$(cat env-temp.txt)" >> $GITHUB_ENV
- name: Defined value file
id: file
run: |
echo "file-env=${{ env.FILE_VALUE }}" >> $GITHUB_OUTPUT

# Aplica deploy no ambiente k8s
deploy-env:
name: Deploy File
runs-on: ubuntu-latest
permissions: write-all
needs: [info-environment, read-file]
environment:
name: ${{needs.info-environment.outputs.environment_name}}
env:
FILE_ENV: ${{needs.read-file.outputs.file}}
steps:
- name: Insert File Env
uses: mmoyaferrer/set-github-variable@v1.0.0
with:
name: ${{ env.APP }}${{needs.info-environment.outputs.github_env_file_field}}
value: ${{ env.FILE_ENV }}
repository: ${{ env.GITHUB_REPOSITORY }}
token: ${{ secrets.PIPELINE_TOKEN }}
# Localiza o arquivo configmap para deploy
configmap:
name: Configmap Search
runs-on: ubuntu-latest
permissions: write-all
needs: [info-environment]
env:
FILE_PATH: 'app/profile/config-server-service/dsv/configmap.yml'
outputs:
configmap: ${{ steps.configmap_search.outputs.configmap }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: File Env Homologation
if: contains(needs.info-environment.outputs.github_env_file_field, 'HOMOLOGATION_ENV')
run: |
echo "FILE_PATH=app/profile/config-server-service/hmg/configmap.yml" >> $GITHUB_ENV
- name: File Env Staging
if: contains(needs.info-environment.outputs.github_env_file_field, 'STAGING_ENV')
run: |
echo "FILE_PATH=app/profile/config-server-service/stg/configmap.yml" >> $GITHUB_ENV
- name: File Env Production
if: contains(needs.info-environment.outputs.github_env_file_field, 'PRODUCTION_ENV')
run: |
echo "FILE_PATH=app/profile/config-server-service/prd/configmap.yml" >> $GITHUB_ENV
- name: Out Configmap path
id: configmap_search
run: echo "configmap=${{ env.FILE_PATH }}" >> $GITHUB_OUTPUT

### Remover quando tiver ambiente CLoud #######

# Aplica o deploy no ambiente k8s
deploy-config:
name: Deploy Configmap
runs-on: ubuntu-latest
permissions: write-all
needs: [info-environment ,configmap]
environment:
name: ${{needs.info-environment.outputs.environment_name}}
outputs:
successful: ${{ steps.status.outputs.status }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set Kubernetes Context
uses: azure/k8s-set-context@v1
with:
method: kubeconfig
kubeconfig: ${{ secrets.KUBECONFIG }}
- name: Readme file ConfigMap
run: |
cat ${{needs.configmap.outputs.configmap}}
- name: Deploy to Cluster
run: |
kubectl apply -f ${{needs.configmap.outputs.configmap}}
- name: Successful
id: status
run: echo "status=true" >> $GITHUB_OUTPUT
Loading