mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ACS-550 Test downstream repo update [skip tests] [no-release]
This commit is contained in:
18
.travis.yml
18
.travis.yml
@@ -32,8 +32,10 @@ stages:
|
|||||||
if: commit_message !~ /\[skip tests\]/
|
if: commit_message !~ /\[skip tests\]/
|
||||||
- name: release
|
- name: release
|
||||||
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
|
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
|
||||||
|
- name: update_downstream
|
||||||
|
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-downstream\]/
|
||||||
- name: trigger_downstream
|
- name: trigger_downstream
|
||||||
if: fork = false AND type != pull_request AND commit_message !~ /\[no-downstream\]/
|
if: fork = false AND (branch != master OR branch !~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-downstream\]/
|
||||||
|
|
||||||
before_install: travis_retry bash scripts/travis/init.sh
|
before_install: travis_retry bash scripts/travis/init.sh
|
||||||
install: travis_retry bash scripts/travis/build.sh
|
install: travis_retry bash scripts/travis/build.sh
|
||||||
@@ -237,17 +239,15 @@ jobs:
|
|||||||
before_script: bash scripts/travis/verify_release_tag.sh
|
before_script: bash scripts/travis/verify_release_tag.sh
|
||||||
script: travis_wait 40 bash scripts/travis/maven_release.sh
|
script: travis_wait 40 bash scripts/travis/maven_release.sh
|
||||||
|
|
||||||
|
- name: "Update alfresco-enterprise-repo"
|
||||||
|
stage: update_downstream
|
||||||
|
before_install: skip
|
||||||
|
install: skip
|
||||||
|
script: bash scripts/travis/update_downstream.sh
|
||||||
|
|
||||||
- name: "Trigger alfresco-enterprise-repo build"
|
- name: "Trigger alfresco-enterprise-repo build"
|
||||||
stage: trigger_downstream
|
stage: trigger_downstream
|
||||||
before_install: skip
|
before_install: skip
|
||||||
install: skip
|
install: skip
|
||||||
script: bash scripts/travis/trigger_travis.sh "Alfresco" "alfresco-enterprise-repo" "${TRAVIS_BRANCH}"
|
script: bash scripts/travis/trigger_travis.sh "Alfresco" "alfresco-enterprise-repo" "${TRAVIS_BRANCH}"
|
||||||
|
|
||||||
# TODO enable or delete job
|
|
||||||
- name: "Trigger acs-community-packaging build"
|
|
||||||
stage: trigger_downstream
|
|
||||||
if: false
|
|
||||||
before_install: skip
|
|
||||||
install: skip
|
|
||||||
script: bash scripts/travis/trigger_travis.sh "Alfresco" "acs-community-packaging" "${TRAVIS_BRANCH}"
|
|
||||||
|
|
||||||
|
42
scripts/travis/update_downstream.sh
Normal file
42
scripts/travis/update_downstream.sh
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "=========================== Starting Update Downstream Script ==========================="
|
||||||
|
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||||
|
set -vex
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||||
|
|
||||||
|
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
|
||||||
|
|
||||||
|
cloneRepo "${DOWNSTREAM_REPO}" "${TRAVIS_BRANCH}"
|
||||||
|
|
||||||
|
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
||||||
|
|
||||||
|
# Update parent
|
||||||
|
mvn versions:update-parent versions:commit
|
||||||
|
|
||||||
|
VERSION="$(sed -n '/<parent>/,/<\/parent>/p' pom.xml \
|
||||||
|
| sed -n '/<version>/,/<\/version>/p' \
|
||||||
|
| tr -d '\n' \
|
||||||
|
| grep -oP '(?<=<version>).*(?=</version>)' \
|
||||||
|
| xargs)"
|
||||||
|
|
||||||
|
# Update dependency version
|
||||||
|
mvn versions:set-property versions:commit \
|
||||||
|
-Dproperty=dependency.alfresco-community-repo.version \
|
||||||
|
"-DnewVersion=${VERSION}"
|
||||||
|
|
||||||
|
# Commit changes
|
||||||
|
git status
|
||||||
|
git --no-pager diff pom.xml
|
||||||
|
git add pom.xml
|
||||||
|
git commit -m "Update upstream version to ${VERSION}"
|
||||||
|
#todo enable this
|
||||||
|
#git push
|
||||||
|
git status
|
||||||
|
|
||||||
|
|
||||||
|
popd
|
||||||
|
set +vex
|
||||||
|
echo "=========================== Finishing Update Downstream Script =========================="
|
||||||
|
|
Reference in New Issue
Block a user