Merge branch 'dev' into 8388-fineTunningInvoiceIn
This commit is contained in:
commit
b44a397c81
|
@ -108,7 +108,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('E2E') {
|
stage('E2E') {
|
||||||
environment {
|
environment {
|
||||||
CREDS = credentials('docker-registry')
|
|
||||||
COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}"
|
COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}"
|
||||||
COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ."
|
COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ."
|
||||||
}
|
}
|
||||||
|
@ -118,23 +117,24 @@ pipeline {
|
||||||
sh 'rm -rf test/cypress/screenshots'
|
sh 'rm -rf test/cypress/screenshots'
|
||||||
env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev'
|
env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev'
|
||||||
|
|
||||||
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
def modules = sh(
|
||||||
|
script: "node test/cypress/docker/find/find.js ${env.COMPOSE_TAG}",
|
||||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
returnStdout: true
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} pull back"
|
).trim()
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} pull db"
|
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
|
||||||
|
|
||||||
def modules = sh(script: "node test/cypress/docker/find/find.js ${env.COMPOSE_TAG}", returnStdout: true).trim()
|
|
||||||
echo "E2E MODULES: ${modules}"
|
echo "E2E MODULES: ${modules}"
|
||||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
|
||||||
sh "sh test/cypress/docker/cypressParallel.sh 1 '${modules}'"
|
script {
|
||||||
|
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
||||||
|
sh "docker compose ${env.COMPOSE_PARAMS} up -d"
|
||||||
|
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
||||||
|
sh "sh test/cypress/docker/cypressParallel.sh 1 '${modules}'"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
sh "docker-compose ${env.COMPOSE_PARAMS} down -v"
|
sh "docker compose ${env.COMPOSE_PARAMS} down -v"
|
||||||
archiveArtifacts artifacts: 'test/cypress/screenshots/**/*', allowEmptyArchive: true
|
archiveArtifacts artifacts: 'test/cypress/screenshots/**/*', allowEmptyArchive: true
|
||||||
junit(
|
junit(
|
||||||
testResults: 'junit/e2e-*.xml',
|
testResults: 'junit/e2e-*.xml',
|
||||||
|
@ -153,17 +153,8 @@ pipeline {
|
||||||
VERSION = readFile 'VERSION.txt'
|
VERSION = readFile 'VERSION.txt'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
sh 'quasar build'
|
||||||
sh 'quasar build'
|
dockerBuild 'salix-frontend', '.'
|
||||||
|
|
||||||
def baseImage = "salix-frontend:${env.VERSION}"
|
|
||||||
def image = docker.build(baseImage, ".")
|
|
||||||
docker.withRegistry("https://${env.REGISTRY}", 'docker-registry') {
|
|
||||||
image.push()
|
|
||||||
image.push(env.BRANCH_NAME)
|
|
||||||
if (IS_LATEST) image.push('latest')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
|
@ -186,3 +177,53 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def dockerBuild(imageName, context, dockerfile = null) {
|
||||||
|
if (dockerfile == null)
|
||||||
|
dockerfile = "${context}/Dockerfile"
|
||||||
|
|
||||||
|
def certDir = '/home/jenkins/.buildkit/certs'
|
||||||
|
def buildxArgs = [
|
||||||
|
"--name=buildkitd",
|
||||||
|
"--driver=remote",
|
||||||
|
"--driver-opt="
|
||||||
|
+ "cacert=${certDir}/ca.pem,"
|
||||||
|
+ "cert=${certDir}/cert.pem,"
|
||||||
|
+ "key=${certDir}/key.pem,"
|
||||||
|
+ "servername=buildkitd",
|
||||||
|
"tcp://buildkitd:1234"
|
||||||
|
]
|
||||||
|
|
||||||
|
def cacheImage = "${env.REGISTRY_CACHE}/${imageName}"
|
||||||
|
def pushImage = "${env.REGISTRY}/${imageName}"
|
||||||
|
def baseImage = "${pushImage}:${env.VERSION}"
|
||||||
|
|
||||||
|
def buildArgs = [
|
||||||
|
context,
|
||||||
|
"--push",
|
||||||
|
"--builder=buildkitd",
|
||||||
|
"--file=${dockerfile}",
|
||||||
|
"--cache-from=type=registry,ref=${cacheImage}:cache-${env.BRANCH_NAME}",
|
||||||
|
"--cache-from=type=registry,ref=${cacheImage}:cache-dev",
|
||||||
|
"--cache-to=type=registry,ref=${cacheImage}:cache-${env.BRANCH_NAME},mode=max",
|
||||||
|
"--tag=${pushImage}:${env.BRANCH_NAME}"
|
||||||
|
]
|
||||||
|
|
||||||
|
def isLatest = ['master', 'main'].contains(env.BRANCH_NAME)
|
||||||
|
if (isLatest)
|
||||||
|
buildArgs.push("--tag=${pushImage}:latest")
|
||||||
|
|
||||||
|
// FIXME: Nested docker.withRegistry() does not work
|
||||||
|
// https://issues.jenkins.io/browse/JENKINS-59777
|
||||||
|
withCredentials([usernamePassword(
|
||||||
|
credentialsId: 'registry-cache',
|
||||||
|
usernameVariable: 'CACHE_USR',
|
||||||
|
passwordVariable: 'CACHE_PSW')
|
||||||
|
]) {
|
||||||
|
docker.withRegistry("https://${env.REGISTRY}", 'docker-registry') {
|
||||||
|
sh 'echo "$CACHE_PSW" | docker login --username "$CACHE_USR" --password-stdin "http://$REGISTRY_CACHE"'
|
||||||
|
sh "docker buildx create ${buildxArgs.join(' ')}"
|
||||||
|
docker.build(baseImage, buildArgs.join(' '))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "25.18.0",
|
"version": "25.22.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -42,7 +42,7 @@ const card = toRef(props, 'item');
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ card.name }}
|
{{ card.longName }}
|
||||||
<ItemDescriptorProxy :id="card.id" />
|
<ItemDescriptorProxy :id="card.id" />
|
||||||
</span>
|
</span>
|
||||||
<p class="subName">{{ card.subName }}</p>
|
<p class="subName">{{ card.subName }}</p>
|
||||||
|
@ -57,11 +57,12 @@ const card = toRef(props, 'item');
|
||||||
<QIcon name="production_quantity_limits" size="xs" />
|
<QIcon name="production_quantity_limits" size="xs" />
|
||||||
{{ card.minQuantity }}
|
{{ card.minQuantity }}
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer q-mt-auto">
|
||||||
<div class="price">
|
<div class="price">
|
||||||
<p v-if="isCatalog">
|
<p v-if="isCatalog">
|
||||||
{{ card.available }} {{ t('to') }}
|
<span class="text-primary">{{ card.available }}</span>
|
||||||
{{ toCurrency(card.price) }}
|
{{ t('to') }}
|
||||||
|
<span class="text-bold" >{{ toCurrency(card.price) }}</span>
|
||||||
</p>
|
</p>
|
||||||
<slot name="price" />
|
<slot name="price" />
|
||||||
<QIcon v-if="isCatalog" name="add_circle" class="icon">
|
<QIcon v-if="isCatalog" name="add_circle" class="icon">
|
||||||
|
@ -144,28 +145,29 @@ const card = toRef(props, 'item');
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
.price {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
p {
|
.price {
|
||||||
font-size: 12px;
|
overflow: hidden;
|
||||||
}
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
.icon {
|
p {
|
||||||
color: $primary;
|
font-size: 12px;
|
||||||
font-size: 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.price-kg {
|
.icon {
|
||||||
font-size: 12px;
|
color: $primary;
|
||||||
|
font-size: 24px;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.price-kg {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-color-container {
|
.item-color-container {
|
||||||
|
|
|
@ -19,7 +19,7 @@ const { t } = useI18n();
|
||||||
const dataKey = 'OrderCatalogList';
|
const dataKey = 'OrderCatalogList';
|
||||||
const catalogParams = {
|
const catalogParams = {
|
||||||
orderFk: route.params.id,
|
orderFk: route.params.id,
|
||||||
orderBy: JSON.stringify({ field: 'relevancy DESC, name', way: 'ASC', isTag: false }),
|
orderBy: JSON.stringify({ field: 'relevancy DESC, longName', way: 'ASC', isTag: false }),
|
||||||
};
|
};
|
||||||
const arrayData = useArrayData(dataKey, {
|
const arrayData = useArrayData(dataKey, {
|
||||||
url: 'Orders/CatalogFilter',
|
url: 'Orders/CatalogFilter',
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
version: '3.7'
|
|
||||||
services:
|
services:
|
||||||
back:
|
back:
|
||||||
image: 'registry.verdnatura.es/salix-back:${COMPOSE_TAG:-dev}'
|
image: 'registry.verdnatura.es/salix-back:${COMPOSE_TAG:-dev}'
|
||||||
|
|
Loading…
Reference in New Issue