mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge pull request #1167 from Alfresco/feature-2.7/APPS-235_SetupEnv_no
Apps 235 Setup environment
(cherry picked from commit 23cddd2753
)
This commit is contained in:
committed by
rodicasutu
parent
7b448be646
commit
c62f64c704
25
.travis.yml
25
.travis.yml
@@ -1,3 +1,5 @@
|
|||||||
|
import:
|
||||||
|
- source: travis-env-vars.yml
|
||||||
os: linux
|
os: linux
|
||||||
dist: xenial
|
dist: xenial
|
||||||
language: java
|
language: java
|
||||||
@@ -23,6 +25,9 @@ before_install:
|
|||||||
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
|
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
|
||||||
install: skip
|
install: skip
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: Build AGS
|
- name: Build AGS
|
||||||
- name: Tests
|
- name: Tests
|
||||||
@@ -65,21 +70,39 @@ jobs:
|
|||||||
- echo "Enterprise Integrations Tests on MySQL"
|
- echo "Enterprise Integrations Tests on MySQL"
|
||||||
- name: "Community Rest API Tests"
|
- name: "Community Rest API Tests"
|
||||||
stage: Tests
|
stage: Tests
|
||||||
|
before_install:
|
||||||
|
- travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q
|
||||||
|
- travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_COMMUNITY_PATH/target
|
||||||
|
install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-community -q -f $AUTOMATION_COMMUNITY_PATH/pom.xml
|
||||||
script:
|
script:
|
||||||
- echo "Community Rest API Tests"
|
- echo "Community Rest API Tests"
|
||||||
|
# Uncomment following line to start alfresco env using run-alfresco profile and run the tests.
|
||||||
|
# Currently commented because running tests is part of APPS-236 task
|
||||||
|
# travis_wait 90 mvn -B install -Prun-alfresco -Dskip.automationtests=false -f $AUTOMATION_COMMUNITY_PATH/pom.xml
|
||||||
- name: "Enterprise Rest API Tests"
|
- name: "Enterprise Rest API Tests"
|
||||||
stage: Tests
|
stage: Tests
|
||||||
|
before_install:
|
||||||
|
- travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q
|
||||||
|
- travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_ENTERPRISE_PATH/target
|
||||||
|
install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-enterprise -q -f $AUTOMATION_ENTERPRISE_PATH/pom.xml
|
||||||
script:
|
script:
|
||||||
- echo "Enterprise Rest API Tests"
|
- echo "Enterprise Rest API Tests"
|
||||||
- name: "Community UI Tests ..."
|
- name: "Community UI Tests ..."
|
||||||
stage: Tests
|
stage: Tests
|
||||||
|
before_install:
|
||||||
|
- travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q
|
||||||
|
- travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_UI_PATH/target
|
||||||
|
install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-community -q -f $AUTOMATION_UI_PATH/pom.xml
|
||||||
script:
|
script:
|
||||||
- echo "Community UI Tests ..."
|
- echo "Community UI Tests ..."
|
||||||
- name: "Enterprise UI Tests ..."
|
- name: "Enterprise UI Tests ..."
|
||||||
stage: Tests
|
stage: Tests
|
||||||
|
before_install:
|
||||||
|
- travis_retry travis_wait 90 mvn -B install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests -q
|
||||||
|
- travis_wait 5 bash scripts/downloadInstaller.sh $AUTOMATION_UI_PATH/target
|
||||||
|
install: travis_wait 20 mvn -B install -PinstallAlfresco,apply-rm-enterprise -q -f $AUTOMATION_UI_PATH/pom.xml
|
||||||
script:
|
script:
|
||||||
- echo "Enterprise UI Tests ..."
|
- echo "Enterprise UI Tests ..."
|
||||||
|
|
||||||
- name: "Source Clear Scan (SCA)"
|
- name: "Source Clear Scan (SCA)"
|
||||||
stage: Security Scans
|
stage: Security Scans
|
||||||
script:
|
script:
|
||||||
|
@@ -90,6 +90,7 @@
|
|||||||
</build>
|
</build>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
<!-- Profile used to install alfresco on bamboo. It can be removed after travis migration is finished -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>install-alfresco</id>
|
<id>install-alfresco</id>
|
||||||
<build>
|
<build>
|
||||||
@@ -130,6 +131,83 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
<!-- Profile used to install alfresco on travis -->
|
||||||
|
<profile>
|
||||||
|
<id>installAlfresco</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.fabric8</groupId>
|
||||||
|
<artifactId>docker-maven-plugin</artifactId>
|
||||||
|
<version>0.31.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>start-postgresql</id>
|
||||||
|
<phase>generate-test-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>start</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<images>
|
||||||
|
<image>
|
||||||
|
<alias>test-database</alias>
|
||||||
|
<name>postgres:9.1</name>
|
||||||
|
<run>
|
||||||
|
<ports>
|
||||||
|
<port>5432:5432</port>
|
||||||
|
</ports>
|
||||||
|
<env>
|
||||||
|
<POSTGRES_PASSWORD>alfresco</POSTGRES_PASSWORD>
|
||||||
|
<POSTGRES_USER>alfresco</POSTGRES_USER>
|
||||||
|
<POSTGRES_DB>alfresco</POSTGRES_DB>
|
||||||
|
</env>
|
||||||
|
<cmd>
|
||||||
|
<shell>-c max_connections=300</shell>
|
||||||
|
</cmd>
|
||||||
|
<wait>
|
||||||
|
<log>database system is ready to accept connections</log>
|
||||||
|
<time>20000</time>
|
||||||
|
</wait>
|
||||||
|
</run>
|
||||||
|
</image>
|
||||||
|
</images>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>fetch-installer</id>
|
||||||
|
<phase>generate-test-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<target>
|
||||||
|
<chmod file="target/alf-installer.bin" perm="a+x" verbose="true" />
|
||||||
|
<echo>Installing Alfresco...</echo>
|
||||||
|
<exec executable="${basedir}/target/alf-installer.bin" dir="target" failonerror="true">
|
||||||
|
<arg line="--mode unattended --alfresco_admin_password admin --disable-components postgres,alfrescowcmqs --jdbc_username alfresco --jdbc_password alfresco --prefix ${basedir}/target/alf-installation" />
|
||||||
|
</exec>
|
||||||
|
<delete file="target/alf-installer.bin" verbose="true" />
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
<version>9.1-901-1.jdbc4</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>apply-rm-community</id>
|
<id>apply-rm-community</id>
|
||||||
<build>
|
<build>
|
||||||
|
15
scripts/downloadInstaller.sh
Normal file
15
scripts/downloadInstaller.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# fail script immediately on any errors in external commands and print the lines
|
||||||
|
set -ev
|
||||||
|
|
||||||
|
outputFile="$TRAVIS_BUILD_DIR/$1/alf-installer.bin"
|
||||||
|
host="s3-eu-west-1.amazonaws.com"
|
||||||
|
contentType="binary/octet-stream"
|
||||||
|
dateValue=`TZ=GMT date -R`
|
||||||
|
stringToSign="GET\n\n${contentType}\n${dateValue}\n${S3_INSTALLER_PATH}"
|
||||||
|
signature=`echo -en ${stringToSign} | openssl sha1 -hmac $RELEASE_AWS_SECRET_KEY -binary | base64`
|
||||||
|
curl -H "Host: ${host}" \
|
||||||
|
-H "Date: ${dateValue}" \
|
||||||
|
-H "Content-Type: ${contentType}" \
|
||||||
|
-H "Authorization: AWS $RELEASE_AWS_ACCESS_KEY:${signature}" \
|
||||||
|
https://${host}${S3_INSTALLER_PATH} -o ${outputFile}
|
5
travis-env-vars.yml
Normal file
5
travis-env-vars.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
env:
|
||||||
|
global:
|
||||||
|
- AUTOMATION_COMMUNITY_PATH=rm-automation/rm-automation-community-rest-api
|
||||||
|
- AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api
|
||||||
|
- AUTOMATION_UI_PATH=rm-automation/rm-automation-ui
|
Reference in New Issue
Block a user