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 debian:bookworm-slim
|
||||
FROM registry.verdnatura.es/verdnatura/node:20.18.3-vn1
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
ca-certificates \
|
||||
gnupg2
|
||||
|
||||
# Apache
|
||||
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apache2 \
|
||||
libapache2-mod-php \
|
||||
&& . /etc/apache2/envvars \
|
||||
|
@ -21,14 +15,9 @@ RUN apt-get install -y --no-install-recommends \
|
|||
|
||||
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
|
||||
|
||||
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" \
|
||||
> /etc/apt/sources.list.d/vn.list \
|
||||
&& apt-get update \
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
def PROTECTED_BRANCH
|
||||
def RUN_BUILD
|
||||
|
||||
def BRANCH_ENV = [
|
||||
test: 'test',
|
||||
master: 'production'
|
||||
master: 'production',
|
||||
beta: 'test'
|
||||
]
|
||||
def remote = [:]
|
||||
|
||||
|
@ -10,6 +14,15 @@ node {
|
|||
stage('Setup') {
|
||||
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 "WORKSPACE: ${env.WORKSPACE}"
|
||||
}
|
||||
|
@ -22,14 +35,11 @@ pipeline {
|
|||
stages {
|
||||
stage('Debuild') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'test'
|
||||
}
|
||||
expression { PROTECTED_BRANCH }
|
||||
}
|
||||
agent {
|
||||
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/'
|
||||
registryCredentialsId 'docker-registry'
|
||||
}
|
||||
|
@ -55,10 +65,7 @@ pipeline {
|
|||
}
|
||||
stage('Deploy') {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
branch 'test'
|
||||
}
|
||||
expression { PROTECTED_BRANCH }
|
||||
}
|
||||
environment {
|
||||
CREDS = credentials('docker-registry')
|
||||
|
|
Loading…
Reference in New Issue