[Git][ultreia.io/ird-observe][develop] report builds from 5.x
Tony CHEMIT pushed to branch develop at ultreia.io / ird-observe Commits: 877354fc by Tony CHEMIT at 2017-03-08T17:07:55+01:00 report builds from 5.x - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,154 @@ -pages: - script: - - mkdir .public - - cp -r * .public - - mv .public public - artifacts: - paths: - - public +image: java:8u102-jdk + +variables: + DEVELOP: "develop" + MASTER: "master" + STAGE: "frirdobserve" + +stages: + - Build + - Test + - Staging + - Production + +.before_script_default: &before_script_default + tags: + - gitlab-org + - shared + before_script: + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - ssh-add <(echo "$SSH_PRIVATE_KEY") + - mkdir -p ~/.ssh + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + - (cd ~ ; git clone ssh://git@gitlab.com/maven.ultreia.io/env.git) + - . ~/env/bin/prepare-env.sh "$MAVEN_PRIVATE_KEY" "$CI_PROJECT_PATH" "$CI_PROJECT_NAME" + +.before_script_clone: &before_script_clone + tags: + - gitlab-org + - shared + before_script: + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - ssh-add <(echo "$SSH_PRIVATE_KEY") + - mkdir -p ~/.ssh + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' + - (cd ~ ; git clone ssh://git@gitlab.com/maven.ultreia.io/env.git) + - . ~/env/bin/prepare-env-with-clone.sh "$MAVEN_PRIVATE_KEY" "$CI_PROJECT_PATH" "$CI_PROJECT_NAME" + +.env_test: &env_test + environment: + name: test + +.env_staging: &env_staging + environment: + name: staging + +.env_production: &env_production + environment: + name: production + +.deploy_site: &deploy_site + script: + - mvn install -DskipTests + - mvn site-deploy -DperformRelease + +.deploy_demo_latest: &deploy_demo_latest + stage: Test + script: + - mvn -Padd-git-commit-id-to-project-version -N + - mvn install -am -pl application-web -DskipTests -Pdeploy-demo -Dclassifier=latest + +build: + stage: Build + <<: *before_script_default + script: + - mvn clean verify + only: + - develop + - feature/* + except: + - triggers + +.test_manual: &test_manual + stage: Test + <<: *before_script_default + only: + - develop + except: + - triggers + when: manual + +stage: + <<: *env_staging + <<: *test_manual + <<: *before_script_clone + script: + - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y + - . bin/create_stage.sh + +latest-site: + <<: *env_test + <<: *test_manual + <<: *deploy_site + +latest-demo: + <<: *env_test + <<: *test_manual + <<: *deploy_demo_latest + +.nightly: &nightly + <<: *before_script_default + only: + - triggers + +nightly-build: + stage: Build + <<: *nightly + script: + - apt-get update -y && apt-get install libc6-i386 libx32stdc++6 -y + - mvn clean verify -DperformRelease + +nightly-site: + stage: Test + <<: *env_test + <<: *nightly + <<: *deploy_site + +nightly-demo: + stage: Test + <<: *env_test + <<: *nightly + <<: *deploy_demo_latest + +.staging: &staging + stage: Staging + only: + - tags + <<: *env_staging + <<: *before_script_default + +staging-demo: + <<: *staging + script: + - mvn install -am -pl application-web -DskipTests -Pdeploy-demo -DperformRelease + +staging-site: + <<: *staging + <<: *deploy_site + +release: + <<: *staging + when: manual + script: + - . bin/stage_release.sh + +production: + stage: Production + only: + - tags + <<: *env_production + when: manual + script: + - echo "Envoyer les notifications" View it on GitLab: https://gitlab.com/ultreia.io/ird-observe/commit/877354fc5e1800d04bb24a91734...
participants (1)
-
Tony CHEMIT