Skip to content

Commit bedee50

Browse files
committed
chore: Add Multiple contribs
1 parent 8e86c6f commit bedee50

13 files changed

Lines changed: 515 additions & 3 deletions

contribs/ansible-playbook.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
structure:
2+
- main.yml:
3+
content: |
4+
- name: Example Playbook
5+
hosts: all
6+
become: yes
7+
roles:
8+
- example-role
9+
- vars.yml:
10+
content: |
11+
example_variable: "value"
12+
- tasks/main.yml:
13+
content: |
14+
- name: Install packages
15+
apt:
16+
name: "{{ item }}"
17+
state: present
18+
with_items:
19+
- git
20+
- curl
21+
- handlers/main.yml:
22+
content: |
23+
- name: Restart service
24+
service:
25+
name: example-service
26+
state: restarted
27+
- templates/README.md:
28+
content: |
29+
# Example Template
30+
This template contains example configuration files.
31+
- README.md:
32+
content: |
33+
# Playbook Name
34+
This playbook installs necessary packages and configures services.
35+
## Usage
36+
```bash
37+
ansible-playbook -i inventory main.yml
38+
```

contribs/chef-cookbook.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
structure:
2+
- recipes/default.rb:
3+
content: |
4+
package 'nginx' do
5+
action :install
6+
end
7+
service 'nginx' do
8+
action [ :enable, :start ]
9+
end
10+
- attributes/default.rb:
11+
content: |
12+
default['nginx']['version'] = 'latest'
13+
- templates/default/nginx.conf.erb:
14+
content: |
15+
user nginx;
16+
worker_processes auto;
17+
error_log /var/log/nginx/error.log warn;
18+
pid /var/run/nginx.pid;
19+
events {
20+
worker_connections 1024;
21+
}
22+
http {
23+
include /etc/nginx/mime.types;
24+
default_type application/octet-stream;
25+
sendfile on;
26+
keepalive_timeout 65;
27+
server {
28+
listen 80;
29+
server_name localhost;
30+
location / {
31+
root html;
32+
index index.html index.htm;
33+
}
34+
}
35+
}
36+
- files/default/index.html:
37+
content: |
38+
<html>
39+
<head>
40+
<title>Welcome to nginx!</title>
41+
</head>
42+
<body>
43+
<h1>Success! The nginx server is working!</h1>
44+
</body>
45+
</html>
46+
- README.md:
47+
content: |
48+
# Cookbook Name
49+
Chef cookbook for configuring NGINX.
50+
## Usage
51+
Add the cookbook to your Chef server and include it in your run list.

contribs/ci-cd-pipelines.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
structure:
2+
- .gitlab-ci.yml:
3+
content: |
4+
stages:
5+
- build
6+
- test
7+
- deploy
8+
build_job:
9+
stage: build
10+
script:
11+
- echo "Building the project"
12+
test_job:
13+
stage: test
14+
script:
15+
- echo "Running tests"
16+
deploy_job:
17+
stage: deploy
18+
script:
19+
- echo "Deploying the project"
20+
- Jenkinsfile:
21+
content: |
22+
pipeline {
23+
agent any
24+
stages {
25+
stage('Build') {
26+
steps {
27+
echo 'Building the project'
28+
}
29+
}
30+
stage('Test') {
31+
steps {
32+
echo 'Running tests'
33+
}
34+
}
35+
stage('Deploy') {
36+
steps {
37+
echo 'Deploying the project'
38+
}
39+
}
40+
}
41+
}
42+
- .github/workflows/ci.yml:
43+
content: |
44+
name: CI
45+
on: [push, pull_request]
46+
jobs:
47+
build:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v2
52+
- name: Build
53+
run: echo "Building the project"
54+
- name: Test
55+
run: echo "Running tests"
56+
- .github/workflows/cd.yml:
57+
content: |
58+
name: CD
59+
on: [push]
60+
jobs:
61+
deploy:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout code
65+
uses: actions/checkout@v2
66+
- name: Deploy
67+
run: echo "Deploying the project"
68+
- README.md:
69+
content: |
70+
# Pipeline Name
71+
CI/CD pipeline configurations for different platforms.
72+
## GitLab CI/CD
73+
Add the `.gitlab-ci.yml` file to your repository.
74+
## Jenkins
75+
Add the `Jenkinsfile` to your repository.
76+
## GitHub Actions
77+
Add the YAML files inside the `.github/workflows` directory to your repository.

contribs/cloudformation-files.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
structure:
2+
- template.yaml:
3+
content: |
4+
Resources:
5+
ExampleBucket:
6+
Type: AWS::S3::Bucket
7+
Properties:
8+
BucketName: example-bucket
9+
- parameters.json:
10+
content: |
11+
[
12+
{
13+
"ParameterKey": "BucketName",
14+
"ParameterValue": "example-bucket"
15+
}
16+
]
17+
- deploy.sh:
18+
permissions: 755
19+
content: |
20+
#!/bin/bash
21+
aws cloudformation deploy --stack-name example-stack --template-file template.yaml --parameter-overrides $(cat parameters.json | jq -r '.[] | "--parameters \(.ParameterKey)=\(.ParameterValue)"') --capabilities CAPABILITY_IAM

contribs/docker-files.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
structure:
2+
- Dockerfile:
3+
content: |
4+
FROM nginx:latest
5+
COPY index.html /usr/share/nginx/html/index.html
6+
- .dockerignore:
7+
content: |
8+
.git
9+
.idea
10+
.vscode
11+
- docker-compose.yml:
12+
content: |
13+
version: '3'
14+
services:
15+
web:
16+
build: .
17+
env_file:
18+
- .env
19+
ports:
20+
- "80:80"
21+
db:
22+
image: mysql:latest
23+
environment:
24+
MYSQL_ROOT_PASSWORD: example
25+
- .env:
26+
content: |
27+
MYSQL_ROOT_PASSWORD=example
28+
- README.md:
29+
content: |
30+
# Project Name
31+
This project uses Docker Compose to run a multi-container application.
32+
## Usage
33+
```bash
34+
docker-compose up -d
35+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
structure:
2+
- README.md:
3+
content: |
4+
# Project Name
5+
6+
Brief description of the project.
7+
8+
## Installation
9+
10+
Steps to install the project.
11+
12+
## Usage
13+
14+
Instructions to use the project.
15+
16+
## Contributing
17+
18+
Guidelines for contributing to the project.
19+
- CONTRIBUTING.md:
20+
content: |
21+
# Contributing to Project Name
22+
## How to Contribute
23+
Guidelines for how to contribute to the project.
24+
## Code of Conduct
25+
Code of conduct for contributors.
26+
- CODE_OF_CONDUCT.md:
27+
content: |
28+
# Code of Conduct
29+
Our standards for how to behave within our community.
30+
- LICENSE.md:
31+
content: |
32+
MIT License
33+
Permission is hereby granted, free of charge, to any person obtaining a copy
34+
of this software and associated documentation files (the "Software"), to deal
35+
in the Software without restriction, including without limitation the rights
36+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
37+
copies of the Software, and to permit persons to whom the Software is
38+
furnished to do so, subject to the following conditions:
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
structure:
2+
- .eslintrc.json:
3+
content: |
4+
{
5+
"env": {
6+
"browser": true,
7+
"es2021": true
8+
},
9+
"extends": [
10+
"eslint:recommended",
11+
"plugin:react/recommended"
12+
],
13+
"parserOptions": {
14+
"ecmaFeatures": {
15+
"jsx": true
16+
},
17+
"ecmaVersion": 12,
18+
"sourceType": "module"
19+
},
20+
"plugins": [
21+
"react"
22+
],
23+
"rules": {
24+
"react/prop-types": "off"
25+
}
26+
}
27+
- .eslintignore:
28+
content: |
29+
node_modules/
30+
dist/
31+
- README.md:
32+
content: |
33+
# ESLint Configuration
34+
Standard ESLint configuration for the project.
35+
## Usage
36+
Add the `.eslintrc.json` and `.eslintignore` files to your project.

contribs/generic-app.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,53 @@ structure:
108108
file: https://raw.githubusercontent.com/bitnami/charts/main/.github/PULL_REQUEST_TEMPLATE.md
109109
- .github/dependabot.yml:
110110
file: https://raw.githubusercontent.com/bitnami/charts/main/.github/dependabot.yml
111+
- Dockerfile:
112+
content:
113+
# Use an official Node.js runtime as the base image
114+
FROM node:14
115+
116+
# Set the working directory in the container
117+
WORKDIR /app
118+
119+
# Copy package.json and package-lock.json
120+
COPY package*.json ./
121+
122+
# Install Node.js dependencies
123+
RUN npm install
124+
125+
# Copy the application code
126+
COPY . .
127+
128+
# Expose the port the app runs on
129+
EXPOSE 3000
130+
131+
# Run the application
132+
CMD ["npm", "start"]
133+
- .dockerignore:
134+
content: |
135+
node_modules
136+
npm-debug.log
137+
- docker-compose.yml:
138+
content: |
139+
version: '3'
140+
services:
141+
app:
142+
build: .
143+
ports:
144+
- "3000:3000"
145+
env_file:
146+
- .env
147+
volumes:
148+
- .:/app
149+
environment:
150+
- NODE_ENV=development
151+
- .env.example:
152+
content: |
153+
# Environment variables
154+
NODE_ENV=development
155+
PORT=3000
156+
- .env:
157+
content: |
158+
# Environment variables
159+
NODE_ENV=development
160+
PORT=3000

contribs/git-hooks.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
structure:
2+
- .git/hooks/pre-commit:
3+
permissions: 755
4+
content: |
5+
#!/bin/sh
6+
echo "Running pre-commit hook"
7+
# Add pre-commit tasks here
8+
- .git/hooks/pre-push:
9+
permissions: 755
10+
content: |
11+
#!/bin/sh
12+
echo "Running pre-push hook"
13+
# Add pre-push tasks here
14+
- .git/hooks/commit-msg:
15+
permissions: 755
16+
content: |
17+
#!/bin/sh
18+
echo "Running commit-msg hook"
19+
# Add commit-msg tasks here

0 commit comments

Comments
 (0)