Skip to content

Commit

Permalink
Story #11444 : migration scaleway - build & deploy vitam-ui (#1381)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgheribi authored and bbenaissa committed Jun 22, 2023
1 parent 5a408a6 commit 05fcff1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 222 deletions.
34 changes: 10 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ pipeline {

SERVICE_GIT_URL = credentials("service-gitlab-url")
SERVICE_NEXUS_URL = credentials("service-nexus-url")
SERVICE_PROXY_HOST = credentials("http-proxy-host")
SERVICE_PROXY_PORT = credentials("http-proxy-port")
NOPROXY_HOST = credentials("http_nonProxyHosts")
SERVICE_REPO_SSHURL = credentials("repository-connection-string")
SERVICE_REPOSITORY_URL=credentials("service-repository-url")
JAVA_TOOL_OPTIONS = "-Dhttp.proxyHost=${env.SERVICE_PROXY_HOST} -Dhttp.proxyPort=${env.SERVICE_PROXY_PORT} -Dhttps.proxyHost=${env.SERVICE_PROXY_HOST} -Dhttps.proxyPort=${env.SERVICE_PROXY_PORT} -Dhttp.nonProxyHosts=${env.NOPROXY_HOST}"
}

options {
Expand Down Expand Up @@ -80,18 +76,13 @@ pipeline {
when {
environment(name: 'DO_MAJ_CONTEXT', value: 'true')
}
environment {
NODE_JS_DOWNLOAD_URL="https://rpm.nodesource.com/setup_16.x"
http_proxy="http://${env.SERVICE_PROXY_HOST}:${env.SERVICE_PROXY_PORT}"
https_proxy="http://${env.SERVICE_PROXY_HOST}:${env.SERVICE_PROXY_PORT}"
}
steps {
sh 'sudo yum remove -y nodejs'
sh "curl -fsSL ${env.NODE_JS_DOWNLOAD_URL} | sudo -E bash -"
sh 'sudo yum --enablerepo=nodesource clean all'
sh 'sudo yum install -y nodejs gcc-c++ make'
sh 'sudo apt remove -y nodejs'
sh 'sudo apt install -y nodejs npm node-npmrc build-essential make ruby ruby-dev rubygems'
sh 'sudo rm -f /usr/local/bin/node /usr/local/bin/npm'
sh 'node -v;npm -v'
sh 'sudo timedatectl set-timezone Europe/Paris'
sh 'sudo gem install fpm '
}
}

Expand All @@ -100,15 +91,15 @@ pipeline {
environment(name: 'DO_TEST', value: 'true')
}
environment {
PUPPETEER_DOWNLOAD_HOST="${env.SERVICE_NEXUS_URL}/repository/puppeteer-chrome/"
PUPPETEER_DOWNLOAD_HOST="${env.SERVICE_NEXUS_URL}repository/puppeteer-chrome"
NODE_OPTIONS="--max_old_space_size=12288"
}
steps {
sh 'node -v'
sh 'npmrc default'

sh '''
$MVN_COMMAND clean verify -U -Pvitam -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express' $JAVA_TOOL_OPTIONS
$MVN_COMMAND clean verify -U -Pvitam -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express'
'''
}
post {
Expand All @@ -120,32 +111,27 @@ pipeline {

stage('Build sources') {
environment {
PUPPETEER_DOWNLOAD_HOST="${env.SERVICE_NEXUS_URL}/repository/puppeteer-chrome/"
PUPPETEER_DOWNLOAD_HOST="${env.SERVICE_NEXUS_URL}repository/puppeteer-chrome"
}
when {
environment(name: 'DO_BUILD', value: 'true')
}
steps {
sh 'npmrc default'
sh '''
$MVN_COMMAND deploy -Pvitam,deb,rpm -DskipTests -DskipAllFrontend=true -DskipAllFrontendTests=true -Dlicense.skip=true -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express' $JAVA_TOOL_OPTIONS
$MVN_COMMAND deploy -Pvitam,deb,rpm -DskipTests -DskipAllFrontend=true -DskipAllFrontendTests=true -Dlicense.skip=true -pl '!cots/vitamui-nginx,!cots/vitamui-mongod,!cots/vitamui-logstash,!cots/vitamui-mongo-express'
'''
}
}

stage('Build COTS') {
environment {
http_proxy="http://${env.SERVICE_PROXY_HOST}:${env.SERVICE_PROXY_PORT}"
https_proxy="http://${env.SERVICE_PROXY_HOST}:${env.SERVICE_PROXY_PORT}"
}
when {
environment(name: 'DO_BUILD', value: 'true')
}
steps {
sh 'npmrc internet'
dir('cots/') {
sh '''
$MVN_COMMAND deploy -Pvitam,deb,rpm -DskipTests -Dlicense.skip=true $JAVA_TOOL_OPTIONS
$MVN_COMMAND deploy -Pvitam,deb,rpm -DskipTests -Dlicense.skip=true
'''
}
}
Expand All @@ -158,7 +144,7 @@ pipeline {
}
steps {
checkout([$class: 'GitSCM',
branches: [[name: 'oshimae']],
branches: [[name: 'scaleway_j11']],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'vitam-build.git']],
submoduleCfg: [],
Expand Down
196 changes: 0 additions & 196 deletions Jenkinsfile.origin

This file was deleted.

1 change: 1 addition & 0 deletions deployment/ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gathering = smart
fact_caching_connection = environments/.facts_cache
fact_caching = jsonfile
forks = 20
timeout = 60

# Mitogen
host_key_checking = False
Expand Down
2 changes: 1 addition & 1 deletion deployment/environments/group_vars/all/ansible_options.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---

packages_install_retries_number: 2
packages_install_retries_number: 10
packages_install_retries_delay: 10
hide_passwords_during_deploy: true # false for testing purpose
1 change: 0 additions & 1 deletion deployment/roles/bootstrap_repo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

when: ansible_os_family == "RedHat"


- block:

- name: create VITAM repositories for Debian
Expand Down

0 comments on commit 05fcff1

Please sign in to comment.