Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7a2373b
ci(pipeline): integration piepeline to test
codeparce Oct 12, 2026
20f2827
ci(pipeline): pipeline refactor changes the steps for environments
codeparce Oct 12, 2026
f6018ae
fix(pipeline): pipeline skip maven test
codeparce Oct 12, 2026
bdeba66
fix(Dockerfile/pipeline): Correct create file db
codeparce Oct 12, 2026
1bc36c6
fix(Dockerfile/pipeline): Correct create file db
codeparce Oct 12, 2026
84fcf87
fix(Dockerfile/pipeline): Correct create file db
codeparce Oct 12, 2026
90ea656
fix(code): refractory code
codeparce Oct 12, 2026
b269b67
feat(IaC/pipeline): implement IaC in the project and create a cloud d…
codeparce Oct 14, 2026
5261efc
feat(IaC/pipeline): implement IaC in the project and create a cloud d…
codeparce Oct 14, 2026
89d7859
Merge branch 'main' into test
codeparce Oct 14, 2026
56349dd
feat(IaC/pipeline): implement IaC in the project and create a cloud d…
codeparce Oct 14, 2026
fcdf883
Merge remote-tracking branch 'origin/main' into test
codeparce Oct 14, 2026
714b019
fix(pipeline): hot fix
codeparce Oct 14, 2026
5ef0dac
fix(pipeline): hot fix
codeparce Oct 14, 2026
23e02d2
fix(pipeline): hot fix
codeparce Oct 14, 2026
3a86861
ci(pipeline): quit sensitive logs
codeparce Oct 14, 2026
e109bb7
ci(pipeline): quit sensitive logs
codeparce Oct 14, 2026
27ab26b
ci(pipeline): quit sensitive logs
codeparce Oct 15, 2026
deb2456
ci(pipeline): quit sensitive logs
codeparce Oct 15, 2026
f5e49db
ci(github): remove build and scan jobs from cd-deploy-kb and add main…
codeparce Oct 16, 2026
b3d6a9d
docs(readme): update documentation and add infrastructure diagrams
codeparce Oct 16, 2026
2661d31
ci(workflows): renombrar pipelines de CD y eliminar dependencia de do…
codeparce Oct 16, 2026
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
79 changes: 79 additions & 0 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CD Build Pipeline

on:
push:
branches: [dev,test,main]

jobs:
build:
name: Build Applications
runs-on:
- kubernetes #Runner cloud (default)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build in maven
with:
skip-tests: true
uses: codeparce/ci-workflows/.github/actions/build/maven@v1

docker-publish:
name: Dokcer Publish
needs: [ build]
permissions:
contents: read
packages: write
runs-on:
- kubernetes #Runner on-premise
#- ubuntu-latest #Runner cloud (default)
steps:
- uses: actions/checkout@v4

- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: service-build
path: target

- name: Publish to Docker Hub
uses: codeparce/ci-workflows/.github/actions/docker@v1
with:
target-branch: ${{ github.sha }}
account-name: ${{ secrets.DOCKER_ACCOUNT_NAME}}
access-token: ${{ secrets.DOCKER_ACCESS_TOKEN }}


scan-image:
name: Scan Docker Image
needs: docker-publish
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Login to Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_ACCOUNT_NAME}}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Trivy image scan
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: image
image-ref: ${{ secrets.DOCKER_ACCOUNT_NAME}}/${{ github.event.repository.name }}:${{ github.sha }}
scanners: vuln,secret
vuln-type: os,library
severity: HIGH,CRITICAL
ignore-unfixed: true
format: table
output: trivy-results.txt
exit-code: '0' # bypass

- name: Summary of Trivy Scan Results
if: always()
uses: codeparce/ci-workflows/.github/actions/github/summary@v1
with:
scaner-name: Image Scaner
report-file: trivy-results.txt
19 changes: 14 additions & 5 deletions .github/workflows/cd-deploy-cloud.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: CD Actions Pipeline (deploy aws)
name: CD Deploy in AWS

on:
workflow_dispatch:

branches:
- dev
- test
- main

permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -43,10 +47,15 @@ jobs:
working-directory: IaC
run: |
envsubst < provider.tf.template> provider.tf
terraform init
terraform init > terraform.log 2> error.log

- name: Deploy en aws
working-directory: IaC
run: |
terraform apply -auto-approve
echo "✅ Deploy completado"
terraform apply -input=false > terraform.log 2> error.log
echo "✅ Deploy completado" >> error.log

- name: Check Execution
if: always()
working-directory: IaC
run: cat error.log
82 changes: 6 additions & 76 deletions .github/workflows/cd-deploy-kb.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,16 @@
name: CD Actions Pipeline (kuberenets on-premise)
name: CD Deploy Kuberenets on-premise

on:
workflow_dispatch:

branches:
- dev
- test
- main

jobs:
build:
name: Build Applications
runs-on:
- kubernetes #Runner cloud (default)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build in maven
with:
skip-tests: true
uses: codeparce/ci-workflows/.github/actions/build/maven@v1

docker-publish:
name: Dokcer Publish
needs: [ build]
permissions:
contents: read
packages: write
runs-on:
- kubernetes #Runner on-premise
#- ubuntu-latest #Runner cloud (default)
steps:
- uses: actions/checkout@v4

- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: service-build
path: target

- name: Publish to Docker Hub
uses: codeparce/ci-workflows/.github/actions/docker@v1
with:
target-branch: ${{ github.sha }}
account-name: ${{ secrets.DOCKER_ACCOUNT_NAME}}
access-token: ${{ secrets.DOCKER_ACCESS_TOKEN }}


scan-image:
name: Scan Docker Image
needs: docker-publish
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Login to Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_ACCOUNT_NAME}}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}

- name: Trivy image scan
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: image
image-ref: ${{ secrets.DOCKER_ACCOUNT_NAME}}/${{ github.event.repository.name }}:${{ github.sha }}
scanners: vuln,secret
vuln-type: os,library
severity: HIGH,CRITICAL
ignore-unfixed: true
format: table
output: trivy-results.txt
exit-code: '0' # bypass

- name: Summary of Trivy Scan Results
if: always()
uses: codeparce/ci-workflows/.github/actions/github/summary@v1
with:
scaner-name: Image Scaner
report-file: trivy-results.txt

deploy:
runs-on: kubernetes #Runner on-premise
name: Deploy in Kubernetes
needs: docker-publish
env:
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
GITHUB_REF_NAME: ${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI Actions Pipeline

on:
pull_request:
branches: [dev,test]
branches: [dev,test,main]
workflow_dispatch:

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
HELP.md
INTI.MD
CHECKLIST_ES.md
values.yaml
target/
!.mvn/wrapper/maven-wrapper.jar
Expand Down
142 changes: 142 additions & 0 deletions DEMO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Demo Devops Java

This is a simple application to be used in the technical test of DevOps.

## Getting Started

### Prerequisites

- Java Version 17
- Spring Boot 3.0.5
- Maven

### Installation

Clone this repo.

```bash
git clone https://bitbucket.org/devsu/demo-devops-java.git
```

### Database

The database is generated as a file in the main path when the project is first run, and its name is `test.mv.db`.

Consider giving access permissions to the file for proper functioning.

## Usage

To run tests you can use this command.

```bash
mvn clean test
```

To run locally the project you can use this command.

```bash
mvn spring-boot:run
```

Open http://127.0.0.1:8000/api/swagger-ui.html with your browser to see the result.

### Features

These services can perform,

#### Create User

To create a user, the endpoint **/api/users** must be consumed with the following parameters:

```bash
Method: POST
```

```json
{
"dni": "dni",
"name": "name"
}
```

If the response is successful, the service will return an HTTP Status 200 and a message with the following structure:

```json
{
"id": 1,
"dni": "dni",
"name": "name"
}
```

If the response is unsuccessful, we will receive status 400 and the following message:

```json
{
"errors": [
"error"
]
}
```

#### Get Users

To get all users, the endpoint **/api/users** must be consumed with the following parameters:

```bash
Method: GET
```

If the response is successful, the service will return an HTTP Status 200 and a message with the following structure:

```json
[
{
"id": 1,
"dni": "dni",
"name": "name"
}
]
```

#### Get User

To get an user, the endpoint **/api/users/<id>** must be consumed with the following parameters:

```bash
Method: GET
```

If the response is successful, the service will return an HTTP Status 200 and a message with the following structure:

```json
{
"id": 1,
"dni": "dni",
"name": "name"
}
```

If the user id does not exist, we will receive status 404 and the following message:

```json
{
"errors": [
"User not found: <id>"
]
}
```

If the response is unsuccessful, we will receive status 400 and the following message:

```json
{
"errors": [
"error"
]
}
```

## License

Copyright © 2023 Devsu. All rights reserved.
20 changes: 20 additions & 0 deletions INTI.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# devsu-demo-devops-java

Repositorio devsu-demo-devops-java: https://github.com/codeparceorg/devsu-demo-devops-java

pipeline Despliegue kuberentes (CD): https://github.com/codeparceorg/devsu-demo-devops-java/actions/workflows/cd-deploy-kb.yml

pipeline Despliegue aws (CD): https://github.com/codeparceorg/devsu-demo-devops-java/actions/workflows/cd-deploy-cloud.yml

pipeline Build y publish (CI): https://github.com/codeparceorg/devsu-demo-devops-java/actions/workflows/cd-build.yml

pipeline Validate y Scan (CI): https://github.com/codeparceorg/devsu-demo-devops-java/actions/workflows/ci-pipeline.yml


# infra-microservice-aws

Repositorio infra-microservice-aws: https://github.com/codeparceorg/infra-microservice-aws

pipeline Despliegue aws (CD): https://github.com/codeparceorg/infra-microservice-aws/actions/workflows/cd-deploy.yml

pipeline terraform Inti: https://github.com/codeparceorg/infra-microservice-aws/actions/workflows/ci-init.yml
11 changes: 0 additions & 11 deletions IaC/.env

This file was deleted.

Loading
Loading