Merge branch 'fashion-logica' of https://git.hlcompany.ru/git/usersite into fashion-logica
This commit is contained in:
commit
2ca121cbac
44
Jenkinsfile
vendored
44
Jenkinsfile
vendored
@ -1,27 +1,31 @@
|
|||||||
env.HL_BUILD_MODE = "jenkins"
|
env.HL_BUILD_MODE = "jenkins"
|
||||||
|
|
||||||
node('Rubidium'){
|
node('Lithium'){
|
||||||
|
|
||||||
stage('get new version to repo') {
|
stage('get new version to repo') {
|
||||||
dir('/opt/usersite-build'){
|
checkout scm
|
||||||
checkout([$class: 'GitSCM', branches: [[name: '*/fashion-logica']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins_all', url: 'https://git.hlcompany.ru/git/usersite.git']]])
|
if (lastCommitIsBumpCommit()) {
|
||||||
|
currentBuild.result = 'ABORTED'
|
||||||
|
error('Последний коммит - результат сборки jenkins')
|
||||||
}
|
}
|
||||||
}
|
sh "git checkout ${env.BRANCH_NAME}"
|
||||||
|
sh "git checkout -- ."
|
||||||
stage('build project') {
|
|
||||||
// sh label: '', script: 'systemctl stop lkcrm4retail'
|
|
||||||
// dir('/opt/SynthVisionBox/node'){
|
|
||||||
// sh label: '', script: 'npm install --only=prod'
|
|
||||||
// sh label: '', script: 'node db_updater.js'
|
|
||||||
// }
|
|
||||||
|
|
||||||
dir('/opt/usersite-build'){
|
sh "git pull"
|
||||||
// sh label: '', script: 'npm i'
|
//sh "git submodule update --init --recursive"
|
||||||
// sh label: '', script: 'npm run build'
|
//sh "git submodule update --remote --merge"
|
||||||
sh label: '', script: 'ng build'
|
}
|
||||||
}
|
stage("build and publish"){
|
||||||
|
sh label: '', script: 'npm i'
|
||||||
// sh label: '', script: 'systemctl start lkcrm4retail'
|
sh label: '', script: 'npm run build'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
private boolean lastCommitIsBumpCommit() {
|
||||||
|
lastCommit = sh([script: 'git log -1', returnStdout: true])
|
||||||
|
if (lastCommit.contains("Author: jenkins")) {
|
||||||
|
return true
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"newProjectRoot": "projects",
|
"newProjectRoot": "projects",
|
||||||
@ -10,6 +11,7 @@
|
|||||||
"style": "scss"
|
"style": "scss"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"root": "",
|
"root": "",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"prefix": "app",
|
"prefix": "app",
|
||||||
@ -17,7 +19,7 @@
|
|||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "/var/www/fashion-logica",
|
"outputPath": "/var/www/html/lk.crm4retail.ru/fashion-logica",
|
||||||
"baseHref": "/",
|
"baseHref": "/",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
|
|||||||
@ -32,6 +32,7 @@ import { QRCodeModule } from 'angularx-qrcode';
|
|||||||
import { ShareButtonsModule } from 'ngx-sharebuttons/buttons';
|
import { ShareButtonsModule } from 'ngx-sharebuttons/buttons';
|
||||||
import { ShareIconsModule } from 'ngx-sharebuttons/icons';
|
import { ShareIconsModule } from 'ngx-sharebuttons/icons';
|
||||||
import { MessagingService } from './services/messaging.service';
|
import { MessagingService } from './services/messaging.service';
|
||||||
|
import { NotFoundComponent } from './pages/not-found/not-found.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@ -47,7 +48,8 @@ import { MessagingService } from './services/messaging.service';
|
|||||||
OrderInfoComponent,
|
OrderInfoComponent,
|
||||||
FooterButtonsComponent,
|
FooterButtonsComponent,
|
||||||
UserDataComponent,
|
UserDataComponent,
|
||||||
RefSystemComponent
|
RefSystemComponent,
|
||||||
|
NotFoundComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
@ -56,7 +58,8 @@ import { MessagingService } from './services/messaging.service';
|
|||||||
{
|
{
|
||||||
path: '**',
|
path: '**',
|
||||||
component: MainComponent
|
component: MainComponent
|
||||||
}
|
},
|
||||||
|
// { path: '**', component: NotFoundComponent }
|
||||||
]),
|
]),
|
||||||
InputMaskModule,
|
InputMaskModule,
|
||||||
ProgressSpinnerModule,
|
ProgressSpinnerModule,
|
||||||
|
|||||||
8
src/app/pages/not-found/not-found.component.html
Normal file
8
src/app/pages/not-found/not-found.component.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<div class="not-found-page">
|
||||||
|
<app-navbar></app-navbar>
|
||||||
|
<div class="not-found-page__container">
|
||||||
|
<h1>404</h1>
|
||||||
|
<p>Упс, что-то пошло не так!</p>
|
||||||
|
<button (click)="routeHome()">Вернуться на главную</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
28
src/app/pages/not-found/not-found.component.scss
Normal file
28
src/app/pages/not-found/not-found.component.scss
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
:host {
|
||||||
|
.not-found-page {
|
||||||
|
&__container {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 32px;
|
||||||
|
h1 {
|
||||||
|
font-size: 108px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #09467f;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 16px 0;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background-color: #09467f;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 12px;
|
||||||
|
margin: 0 auto;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
src/app/pages/not-found/not-found.component.spec.ts
Normal file
23
src/app/pages/not-found/not-found.component.spec.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { NotFoundComponent } from './not-found.component';
|
||||||
|
|
||||||
|
describe('NotFoundComponent', () => {
|
||||||
|
let component: NotFoundComponent;
|
||||||
|
let fixture: ComponentFixture<NotFoundComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
declarations: [ NotFoundComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(NotFoundComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
20
src/app/pages/not-found/not-found.component.ts
Normal file
20
src/app/pages/not-found/not-found.component.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-not-found',
|
||||||
|
templateUrl: './not-found.component.html',
|
||||||
|
styleUrls: ['./not-found.component.scss']
|
||||||
|
})
|
||||||
|
export class NotFoundComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor(private router: Router) { }
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
}
|
||||||
|
|
||||||
|
routeHome() {
|
||||||
|
this.router.navigate(['/']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -9,12 +9,13 @@ export const environment = {
|
|||||||
systemId: 'g6zyv8tj53w28ov7cl',
|
systemId: 'g6zyv8tj53w28ov7cl',
|
||||||
defaultUrl: 'https://fashionlogica.lk.crm4retail.ru',
|
defaultUrl: 'https://fashionlogica.lk.crm4retail.ru',
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCujHg9GtN8Uxi-JcCN8zggvXlfNQRKc04",
|
apiKey: "AIzaSyCnKvln5itnrBj62POCPHxshAN_Vmd0zds",
|
||||||
authDomain: "push-notification-test2-56dac.firebaseapp.com",
|
authDomain: "fashionlogicanotification.firebaseapp.com",
|
||||||
projectId: "push-notification-test2-56dac",
|
projectId: "fashionlogicanotification",
|
||||||
storageBucket: "push-notification-test2-56dac.appspot.com",
|
storageBucket: "fashionlogicanotification.appspot.com",
|
||||||
messagingSenderId: "1004369687552",
|
messagingSenderId: "99855572145",
|
||||||
appId: "1:1004369687552:web:a6cc20625e05520a37d4e5"
|
appId: "1:99855572145:web:7548c189d61b3bcc92d690",
|
||||||
|
measurementId: "G-RQF97ZK7R1"
|
||||||
},
|
},
|
||||||
version: packageJson.version,
|
version: packageJson.version,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,12 +9,13 @@ export const environment = {
|
|||||||
systemId: 'g6zyv8tj53w28ov7cl',
|
systemId: 'g6zyv8tj53w28ov7cl',
|
||||||
defaultUrl: 'http://192.168.0.179:4200',
|
defaultUrl: 'http://192.168.0.179:4200',
|
||||||
firebase: {
|
firebase: {
|
||||||
apiKey: "AIzaSyCujHg9GtN8Uxi-JcCN8zggvXlfNQRKc04",
|
apiKey: 'AIzaSyCnKvln5itnrBj62POCPHxshAN_Vmd0zds',
|
||||||
authDomain: "push-notification-test2-56dac.firebaseapp.com",
|
authDomain: 'fashionlogicanotification.firebaseapp.com',
|
||||||
projectId: "push-notification-test2-56dac",
|
projectId: 'fashionlogicanotification',
|
||||||
storageBucket: "push-notification-test2-56dac.appspot.com",
|
storageBucket: 'fashionlogicanotification.appspot.com',
|
||||||
messagingSenderId: "1004369687552",
|
messagingSenderId: '99855572145',
|
||||||
appId: "1:1004369687552:web:a6cc20625e05520a37d4e5"
|
appId: '1:99855572145:web:7548c189d61b3bcc92d690',
|
||||||
|
measurementId: 'G-RQF97ZK7R1',
|
||||||
},
|
},
|
||||||
version: packageJson.version,
|
version: packageJson.version,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,12 +2,13 @@ importScripts('https://www.gstatic.com/firebasejs/7.4.1/firebase-app.js');
|
|||||||
importScripts('https://www.gstatic.com/firebasejs/7.4.1/firebase-messaging.js');
|
importScripts('https://www.gstatic.com/firebasejs/7.4.1/firebase-messaging.js');
|
||||||
|
|
||||||
firebase.initializeApp({
|
firebase.initializeApp({
|
||||||
apiKey: "AIzaSyCujHg9GtN8Uxi-JcCN8zggvXlfNQRKc04",
|
apiKey: "AIzaSyCnKvln5itnrBj62POCPHxshAN_Vmd0zds",
|
||||||
authDomain: "push-notification-test2-56dac.firebaseapp.com",
|
authDomain: "fashionlogicanotification.firebaseapp.com",
|
||||||
projectId: "push-notification-test2-56dac",
|
projectId: "fashionlogicanotification",
|
||||||
storageBucket: "push-notification-test2-56dac.appspot.com",
|
storageBucket: "fashionlogicanotification.appspot.com",
|
||||||
messagingSenderId: "1004369687552",
|
messagingSenderId: "99855572145",
|
||||||
appId: "1:1004369687552:web:a6cc20625e05520a37d4e5"
|
appId: "1:99855572145:web:7548c189d61b3bcc92d690",
|
||||||
|
measurementId: "G-RQF97ZK7R1"
|
||||||
});
|
});
|
||||||
|
|
||||||
const messaging = firebase.messaging();
|
const messaging = firebase.messaging();
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<html lang="ru">
|
<html lang="ru">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Fashion logica</title>
|
<title>Fashionlogica</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="apple-touch-icon" href="./assets/icons/apple-icon-180x180.png">
|
<link rel="apple-touch-icon" href="./assets/icons/apple-icon-180x180.png">
|
||||||
|
|||||||
@ -56,5 +56,5 @@
|
|||||||
"purpose": "maskable any"
|
"purpose": "maskable any"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"gcm_sender_id": "1004369687552"
|
"gcm_sender_id": "99855572145"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user