Skip to content

Commit

Permalink
Merge pull request #19 from eea/develop
Browse files Browse the repository at this point in the history
Update package.json
  • Loading branch information
razvanMiu committed Sep 27, 2021
2 parents 518e559 + c2aa647 commit 32d342e
Show file tree
Hide file tree
Showing 23 changed files with 6,929 additions and 3,608 deletions.
472 changes: 225 additions & 247 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM node:12-stretch-slim

COPY . /opt/frontend/

WORKDIR /opt/frontend/

# Update apt packages
RUN runDeps="openssl ca-certificates patch git" \
Expand All @@ -11,19 +11,17 @@ RUN runDeps="openssl ca-certificates patch git" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& chown -R node /opt/frontend/ \
&& cp jsconfig.json.tpl jsconfig.json \
&& mkdir -p /opt/frontend/src/addons \
&& rm -rf /opt/frontend/src/addons/* \
&& cd /opt/frontend \
&& npm install -g mrs-developer

WORKDIR /opt/frontend/

USER node

ARG MAX_OLD_SPACE_SIZE=8192
ENV NODE_OPTIONS=--max_old_space_size=$MAX_OLD_SPACE_SIZE

RUN cd /opt/frontend \
&& yarn develop \
&& RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn \
&& RAZZLE_API_PATH=VOLTO_API_PATH RAZZLE_INTERNAL_API_PATH=VOLTO_INTERNAL_API_PATH yarn build \
&& rm -rf /home/node/.cache
Expand Down
129 changes: 103 additions & 26 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ pipeline {
SONARQUBE_TAG = ""
}



stages {

stage('Integration tests') {
steps {

stage('Integration tests') {
parallel {
stage('Cypress') {
when {
environment name: 'CHANGE_ID', value: ''
}
steps {
node(label: 'docker') {
script {
try {
Expand All @@ -41,15 +48,85 @@ pipeline {
}
}
}
}
}

stage("Docker test build") {
when {
not {
environment name: 'CHANGE_ID', value: ''
}
not {
buildingTag()
}
environment name: 'CHANGE_TARGET', value: 'master'
}
environment {
IMAGE_NAME = BUILD_TAG.toLowerCase()
}
steps {
node(label: 'docker-host') {
script {
checkout scm
try {
dockerImage = docker.build("${IMAGE_NAME}", "--no-cache .")
} finally {
sh script: "docker rmi ${IMAGE_NAME}", returnStatus: true
}
}
}
}
}


}
}


stage('Build & Push') {
stage('Pull Request') {
when {
not {
environment name: 'CHANGE_ID', value: ''
}
environment name: 'CHANGE_TARGET', value: 'master'
}
steps {
node(label: 'docker') {
script {
if ( env.CHANGE_BRANCH != "develop" && !( env.CHANGE_BRANCH.startsWith("hotfix")) ) {
error "Pipeline aborted due to PR not made from develop or hotfix branch"
}
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-pr" -e GIT_CHANGE_TARGET="$CHANGE_TARGET" -e GIT_CHANGE_BRANCH="$CHANGE_BRANCH" -e GIT_CHANGE_AUTHOR="$CHANGE_AUTHOR" -e GIT_CHANGE_TITLE="$CHANGE_TITLE" -e GIT_TOKEN="$GITHUB_TOKEN" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_CHANGE_ID="$CHANGE_ID" -e GIT_ORG="$GIT_ORG" -e GIT_NAME="$GIT_NAME" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}
}


stage('Release') {
when {
allOf {
environment name: 'CHANGE_ID', value: ''
branch 'master'
}
}
steps {
node(label: 'docker') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="$BUILD_TAG-gitflow-master" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e GIT_TOKEN="$GITHUB_TOKEN" -e LANGUAGE=javascript eeacms/gitflow'''
}
}
}
}

stage('Build & Push ( on tag )') {
when {
buildingTag()
}
steps{
node(label: 'docker-host') {
script {
Expand All @@ -71,15 +148,30 @@ pipeline {
}
}
}

stage('Release') {
stage('Release catalog ( on tag )') {
when {
buildingTag()
}
steps{
node(label: 'docker') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN')]) {
sh '''docker pull eeacms/gitflow; docker run -i --rm --name="${BUILD_TAG}-release" -e GIT_TOKEN="${GITHUB_TOKEN}" -e RANCHER_CATALOG_PATH="${template}" -e DOCKER_IMAGEVERSION="${BRANCH_NAME}" -e DOCKER_IMAGENAME="${registry}" --entrypoint /add_rancher_catalog_entry.sh eeacms/gitflow'''
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GITHUB_TOKEN'), usernamePassword(credentialsId: 'jekinsdockerhub', usernameVariable: 'DOCKERHUB_USER', passwordVariable: 'DOCKERHUB_PASS')]) {
sh '''docker pull eeacms/gitflow; docker run -i --rm --name="$BUILD_TAG-release" -e GIT_BRANCH="$BRANCH_NAME" -e GIT_NAME="$GIT_NAME" -e DOCKERHUB_REPO="$registry" -e GIT_TOKEN="$GITHUB_TOKEN" -e DOCKERHUB_USER="$DOCKERHUB_USER" -e DOCKERHUB_PASS="$DOCKERHUB_PASS" -e RANCHER_CATALOG_PATHS="$template" -e GITFLOW_BEHAVIOR="RUN_ON_TAG" eeacms/gitflow'''
}
}
}
}

stage('Upgrade demo ( on tag )') {
when {
buildingTag()
}
steps {
node(label: 'docker') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'Rancher_dev_token', usernameVariable: 'RANCHER_ACCESS', passwordVariable: 'RANCHER_SECRET'],string(credentialsId: 'Rancher_dev_url', variable: 'RANCHER_URL')]) {
sh '''wget -O rancher_upgrade.sh https://github.com/raw/eea/eea.docker.gitflow/master/src/rancher_upgrade.sh'''
sh '''chmod 755 rancher_upgrade.sh'''
sh '''./rancher_upgrade.sh'''
}
}
}
Expand All @@ -93,34 +185,19 @@ pipeline {
buildingTag()
}
steps{
node(label: 'docker') {
node(label: 'docker') {
withSonarQubeEnv('Sonarqube') {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GIT_TOKEN')]) {
withCredentials([string(credentialsId: 'eea-jenkins-token', variable: 'GIT_TOKEN')]) {
sh '''docker pull eeacms/gitflow'''
sh '''docker run -i --rm --name="${BUILD_TAG}-sonar" -e GIT_NAME=${GIT_NAME} -e GIT_TOKEN="${GIT_TOKEN}" -e SONARQUBE_TAG=${SONARQUBE_TAG} -e SONARQUBE_TOKEN=${SONAR_AUTH_TOKEN} -e SONAR_HOST_URL=${SONAR_HOST_URL} eeacms/gitflow /update_sonarqube_tags.sh'''
}
}
}
}
}

stage('Upgrade demo') {
when {
buildingTag()
}
steps {
node(label: 'docker') {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'Rancher_dev_token', usernameVariable: 'RANCHER_ACCESS', passwordVariable: 'RANCHER_SECRET'],string(credentialsId: 'Rancher_dev_url', variable: 'RANCHER_URL')]) {
sh '''wget -O rancher_upgrade.sh https://github.com/raw/eea/eea.docker.gitflow/master/src/rancher_upgrade.sh'''
sh '''chmod 755 rancher_upgrade.sh'''
sh '''./rancher_upgrade.sh'''
}
}
}
}

}


post {
always {
cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
Expand Down
27 changes: 0 additions & 27 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
{
"compilerOptions": {
"paths": {
"volto-addons": [
"addons/volto-addons/src"
],
"volto-datablocks": [
"addons/volto-datablocks/src"
],
"volto-embed": [
"addons/volto-embed/src"
],
"@eeacms/volto-block-style": [
"addons/volto-block-style/src"
],
"@eeacms/volto-columns-block": [
"addons/volto-columns-block/src"
],
"@eeacms/volto-datablocks": [
"addons/volto-datablocks/src"
],
"@eeacms/volto-embed": [
"addons/volto-embed/src"
],
"@eeacms/volto-grid-block": [
"addons/volto-grid-block/src"
],
"@eeacms/volto-tableau": [
"addons/volto-tableau/src"
],
"@eeacms/volto-tabs-block": [
"addons/volto-tabs-block/src"
],
"@eeacms/volto-openlayers-map": [
"addons/volto-openlayers-map/src"
]
},
"baseUrl": "src"
Expand Down
7 changes: 7 additions & 0 deletions jsconfig.json.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"paths": {
},
"baseUrl": "src"
}
}
2 changes: 1 addition & 1 deletion locales/de.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/en.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/es.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/eu.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/fr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/it.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/ja.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/nl.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/pt.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/pt_BR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion locales/ro.json

Large diffs are not rendered by default.

62 changes: 0 additions & 62 deletions mrs.developer.json
Original file line number Diff line number Diff line change
@@ -1,71 +1,9 @@
{
"volto-addons": {
"url": "https://github.com/eea/volto-addons.git",
"branch": "master",
"path": "src",
"develop": true
},
"volto-block-style": {
"url": "https://github.com/eea/volto-block-style.git",
"path": "src",
"package": "@eeacms/volto-block-style",
"branch": "develop",
"develop": true
},
"volto-columns-block": {
"url": "https://github.com/eea/volto-columns-block.git",
"branch": "develop",
"path": "src",
"package": "@eeacms/volto-columns-block",
"develop": true
},
"volto-datablocks": {
"url": "https://github.com/eea/volto-datablocks.git",
"branch": "develop",
"path": "src",
"package": "@eeacms/volto-datablocks",
"develop": true
},
"volto-embed": {
"url": "https://github.com/eea/volto-embed.git",
"branch": "develop",
"path": "src",
"package": "@eeacms/volto-embed",
"develop": true
},
"volto-grid-block": {
"url": "https://github.com/eea/volto-grid-block.git",
"branch": "centurion",
"path": "src",
"package": "@eeacms/volto-grid-block",
"develop": true
},
"volto-tableau": {
"url": "https://github.com/eea/volto-tableau.git",
"path": "src",
"package": "@eeacms/volto-tableau",
"branch": "develop",
"develop": true
},
"volto-tabs-block": {
"url": "https://github.com/eea/volto-tabs-block.git",
"path": "src",
"package": "@eeacms/volto-tabs-block",
"branch": "develop",
"develop": true
},
"volto-openlayers-map": {
"url": "https://github.com/eea/volto-openlayers-map.git",
"path": "src",
"package": "@eeacms/volto-openlayers-map",
"branch": "develop",
"develop": true
},
"volto-staging-banner": {
"url": "https://github.com/eea/volto-staging-banner.git",
"path": "src",
"package": "@eeacms/volto-staging-banner",
"branch": "develop",
"develop": false
}
}
Loading

0 comments on commit 32d342e

Please sign in to comment.