Unverified Commit 5783f478 authored by Guillermo Sanz López's avatar Guillermo Sanz López Committed by GitHub
Browse files

Merge pull request #2 from Telefonica/continuos-integration

Frontend V2
parents a2cf2de2 e1f2fbd6
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
NEXT_PUBLIC_API_BASE_URL="http://10.95.235.20:9000"
NEXT_PUBLIC_GRAFANA_BASE_URL="http://10.95.235.20:3001"
NEXT_PUBLIC_API_BASE_URL="https://10.95.82.71:8085"
#NEXT_PUBLIC_API_BASE_URL="http://10.95.235.20:9000"
NEXT_PUBLIC_GRAFANA_BASE_URL="http://10.95.82.71:3000"
#NEXT_PUBLIC_GRAFANA_BASE_URL="http://10.95.235.20:3001"
NEXT_PUBLIC_JWT_EXPIRATION= 5m
NEXT_PUBLIC_JWT_SECRET= dd5f3089-40c3-403d-af14-d0c228b05cb4
NEXT_PUBLIC_JWT_REFRESH_TOKEN_SECRET= 7c4c1c50-3230-45bf-9eae-c9b2e401c767

Jenkinsfile

0 → 100644
+70 −0
Original line number Diff line number Diff line
pipeline {
    agent {
        node {
            // agentes ????
            label 'fm-node-lts'
        }
    }
    options {
        timeout(time: 30, unit: 'MINUTES')
    }
    /*environment {
		branch = 'continuous-integration'
		scmUrl = 'https://github.com/Telefonica/pesp_capif_backoffice_frontend_v2.git'
	}*/	
	
    stages {
        stage ('Dependencies') {
            steps {
                echo 'Installing Dependencies'
                sh 'cat /etc/os-release'
                sh 'sudo apk add --no-cache --upgrade bash'
                sh 'sudo apk update'
                //sh 'curl https://unofficial-builds.nodejs.org/download/release/v14.17.6/node-v14.17.6-linux-x64-usdt.tar.xz --output node-v14.17.6-linux'
                /*sh 'curl https://unofficial-builds.nodejs.org/download/release/v14.17.6/node-v14.17.6-linux-x64-usdt.tar.xz --output node-v14.17.6-linux-x64-usdt'
                sh 'ls -la'
                sh 'tar -xf node-v14.17.6-linux-x64-usdt -C /tmp'
                sh 'ls -la /tmp'
                sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt'
                sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt/bin'
                sh 'bash /tmp/node-v14.17.6-linux-x64-usdt/bin/node --version'
                sj 'sudo ulimit -m 1000'
                sh 'sudo cp -pr /tmp/node-v14.17.6-linux-x64-usdt/bin/node /usr/local/bin/' 
                sh 'node --version'
                sh 'ls -la'
                //sh 'tar -xf node-v14.17.6-linux -C /tmp'
                /* sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt'
                sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt/bin'
                sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt/include'
                sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt/lib'
                sh 'ls -la /tmp/node-v14.17.6-linux-x64-usdt/share'*/
                sh 'sudo apk add binutils' 
                //sh 'sudo strip -s /tmp/node-v14.17.6-linux-x64-usdt'

                //sh './tmp/node-v14.17.6-linux-x64-usdt/bin'
                //sh 'sudo apk add yarn'

                sh 'sudo apk add --update nodejs=18.18.0-r0'
                sh 'node --version'
                sh 'yarn install'
            }
        }
        stage ('Build') {
            steps {
                echo 'build'
                sh 'yarn build'
            }
        }
        stage('Artifact') {
            steps {
                archiveArtifacts artifacts: '**/build/*'
            }
        }

    }
    post {
        always {
            echo "Done"
        }
    }
}

README.md

0 → 100644
+49 −0
Original line number Diff line number Diff line
# CAPIF Backoffice Frontend

# Repository structure

```
CAPIF_BACKOFFICE_Frontend
└───./vscode
└───public
│    └───images
│    └───locales
└───src
│    └───@core
│    └───@fake-db
│    └───configs
│    └───context
│    └───hooks
│    └───iconify-bundle
│    └───layouts
│    └───navigation
│    └───pages
│    └───store
│    └───views
└───styles
```
* **vscode**: ...
* **public**: ...
* **src**: ...
* **styles**: ...


## How to run Backoffice Frontend in this Repository

### Run CAPIF Frontend
To run using yarn you must ensure you have that tools installed at your machine.

Compile 
```
yarn build
```

You can run it in two differents ways. The first one is a way for a deployment environment.
```
yarn dev
```

The second one is a way to run in production environment.
```
yarn start
```

jenkinsfile.groovy

0 → 100644
+0 −0

Empty file added.

+2 −1
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@
    "react-perfect-scrollbar": "1.5.8",
    "react-popper": "2.3.0",
    "react-redux": "8.0.5",
    "react-router-dom": "^6.19.0",
    "recharts": "2.5.0",
    "stylis": "4.1.4",
    "stylis-plugin-rtl": "2.1.1",
Loading