fix(slowness): refs #8886 update dockerfile and jenkinsfile
gitea/hedera-web/pipeline/head There was a failure building this commit
Details
gitea/hedera-web/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
bdc36055c6
commit
cc050dc9eb
19
Dockerfile
19
Dockerfile
|
@ -1,17 +1,11 @@
|
||||||
# Not using buster because of bug: https://bugs.php.net/bug.php?id=78870
|
FROM registry.verdnatura.es/verdnatura/node:20.18.3-vn1
|
||||||
FROM debian:bookworm-slim
|
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
curl \
|
|
||||||
ca-certificates \
|
|
||||||
gnupg2
|
|
||||||
|
|
||||||
# Apache
|
# Apache
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends \
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
apache2 \
|
apache2 \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
&& . /etc/apache2/envvars \
|
&& . /etc/apache2/envvars \
|
||||||
|
@ -21,14 +15,9 @@ RUN apt-get install -y --no-install-recommends \
|
||||||
|
|
||||||
RUN a2dissite 000-default
|
RUN a2dissite 000-default
|
||||||
|
|
||||||
# NodeJs
|
|
||||||
|
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
||||||
&& apt-get install -y --no-install-recommends nodejs
|
|
||||||
|
|
||||||
# Hedera
|
# Hedera
|
||||||
|
|
||||||
RUN curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | tee /etc/apt/trusted.gpg.d/verdnatura.gpg \
|
RUN curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
||||||
&& echo "deb http://apt.verdnatura.es/ bookworm main" \
|
&& echo "deb http://apt.verdnatura.es/ bookworm main" \
|
||||||
> /etc/apt/sources.list.d/vn.list \
|
> /etc/apt/sources.list.d/vn.list \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
|
def PROTECTED_BRANCH
|
||||||
|
def RUN_BUILD
|
||||||
|
|
||||||
def BRANCH_ENV = [
|
def BRANCH_ENV = [
|
||||||
test: 'test',
|
test: 'test',
|
||||||
master: 'production'
|
master: 'production',
|
||||||
|
beta: 'test'
|
||||||
]
|
]
|
||||||
def remote = [:]
|
def remote = [:]
|
||||||
|
|
||||||
|
@ -10,6 +14,15 @@ node {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
|
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
|
||||||
|
|
||||||
|
PROTECTED_BRANCH = [
|
||||||
|
'dev',
|
||||||
|
'test',
|
||||||
|
'master',
|
||||||
|
'beta'
|
||||||
|
].contains(env.BRANCH_NAME)
|
||||||
|
|
||||||
|
RUN_BUILD = PROTECTED_BRANCH
|
||||||
|
|
||||||
echo "NODE_NAME: ${env.NODE_NAME}"
|
echo "NODE_NAME: ${env.NODE_NAME}"
|
||||||
echo "WORKSPACE: ${env.WORKSPACE}"
|
echo "WORKSPACE: ${env.WORKSPACE}"
|
||||||
}
|
}
|
||||||
|
@ -22,14 +35,11 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Debuild') {
|
stage('Debuild') {
|
||||||
when {
|
when {
|
||||||
anyOf {
|
expression { PROTECTED_BRANCH }
|
||||||
branch 'master'
|
|
||||||
branch 'test'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
agent {
|
agent {
|
||||||
docker {
|
docker {
|
||||||
image 'registry.verdnatura.es/verdnatura/debuild:2.23.4-vn7'
|
image 'registry.verdnatura.es/verdnatura/debuild:2.23.4-vn9'
|
||||||
registryUrl 'https://registry.verdnatura.es/'
|
registryUrl 'https://registry.verdnatura.es/'
|
||||||
registryCredentialsId 'docker-registry'
|
registryCredentialsId 'docker-registry'
|
||||||
}
|
}
|
||||||
|
@ -55,10 +65,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
when {
|
when {
|
||||||
anyOf {
|
expression { PROTECTED_BRANCH }
|
||||||
branch 'master'
|
|
||||||
branch 'test'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
CREDS = credentials('docker-registry')
|
CREDS = credentials('docker-registry')
|
||||||
|
|
Loading…
Reference in New Issue