Commit 54a3f0cb authored by naji's avatar naji Committed by naji
Browse files

Automatisatiser la création des merges request de vitamui

parents
Pipeline #7600 failed with stage
in 1 second
######################
# STS
######################
**/.apt_generated
**/.classpath
**/.factorypath
**/.project
**/.settings
**/.springBeans
######################
# IntelliJ IDEA
######################
.idea/
**/.idea
**/*.iws
**/*.iml
**/*.ipr
######################
# NetBeans
######################
**/nbproject/private/
**/build/
**/nbbuild/
**/dist/
**/nbdist/
**/.nb-gradle/
nb-configuration.xml
######################
# Node
######################
**/node/
**/node_tmp/
**/node_modules/
**/npm-debug.log.*
**/.awcache/*
######################
# SASS
######################
**/.sass-cache/
######################
# Eclipse
######################
**/*.pydevproject
**/.project
**/.metadata
**/tmp/
**/tmp/**/*
**/*.tmp
**/*.bak
**/*.swp
**/*~.nib
**/local.properties
**/.classpath
**/.settings/
**/.loadpath
**/.factorypath
**/src/main/resources/rebel.xml
**/*.pmd
**/*.pmd*
**/*.checkstyle
# External tool builders
**/.externalToolBuilders/**
# Locally stored "Eclipse launch configurations"
**/*.launch
# CDT-specific
**/.cproject
# PDT-specific
**/.buildpath
######################
# Visual Studio Code
######################
**/.vscode/
######################
# Maven
######################
**/target/
!**/.mvn/wrapper/maven-wrapper.jar
**/log/
**/target/
pom.xml.releaseBackup
pom.xml.versionsBackup
maven-eclipse.xml
######################
# Gradle
######################
**/.gradle/
**/build/
######################
# Package Files
######################
**/*.jar
**/*.war
**/*.ear
**/*.db
**/*.rpm
**/*.deb
######################
# Windows
######################
# Windows image file caches
**/Thumbs.db
# Folder config file
**/Desktop.ini
######################
# Mac OSX
######################
**/.DS_Store
**/.svn
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
######################
# Directories
######################
**/bin/
/deploy/
######################
# Logs
######################
*.log*
######################
# Others
######################
*.class
*.*~
*~
.merge_file*
.java-version
######################
# Gradle Wrapper
######################
!gradle/wrapper/gradle-wrapper.jar
######################
# ESLint
######################
.eslintcache
/common/nb-configuration.xml
######################
# Ansible
######################
*.retry
######################
# Editor files:
######################
.ideas/*
######################
# python compiled code :
######################
*.pyc
######################
# Dolphin explorateur file
######################
.directory
####################
# Vagrant
###################
deployment/.vagrant
.vagrant/
*.box
######
# CAS
######
**/overlays/
######
# Camel
**/tmp/
/deployment/playbooks/pki/tempcerts/
##################
# Angular Common #
##################
ui/angular-commons/*.tgz
##################
# Deloyment tmp #
##################
/deployment/tmp/
##########################################
# Deployment Local deployement keystores #
##########################################
# Created vitam client stores
deployment/playbooks/pki/vitam/client-external/*.p12
deployment/playbooks/pki/vitam/client-external/*.jks
# Created vitamui pki truststore
deployment/playbooks/pki/certs/*/*.jks
# Created vitamui pki vitam truststore
deployment/playbooks/pki/certs/*/*.p12
# Imported vitamui app truststore
deployment/playbooks/templates/vitamui/conf/*/*.jks
# Imported vitamui app vitam truststore
deployment/playbooks/templates/vitamui/conf/*/*.p12
# Vitam development configuration
###################################
# Vitam development configuration #
###################################
api/api-archive-search/archive-search-internal/src/main/config/dev-vitam/*
api/api-ingest/ingest-internal/src/main/config/dev-vitam/*
api/api-referential/referential-internal/src/main/config/dev-vitam/*
api/api-ingest/ingest-internal/src/main/config/dev-vitam/*
api/api-iam/iam-internal/src/main/config/dev-vitam/*
##########################################
# Mongo workspace entry-point #
##########################################
tools/docker/mongo/mongo-entrypoint
stages:
- get-vitamui-changes
.machine: &runner-shell
tags:
- vitamui, sh
webhook:
stage: get-vitamui-changes
only:
- vitam-ui
<<: *runner-shell
script:
- cat $TRIGGER_PAYLOAD
- echo $TRIGGER_PAYLOAD
- sh vitamui.sh
#!/bin/sh
if grep -q -e 'refs/heads/develop' $TRIGGER_PAYLOAD
then git clone "https://${LIEN_CIBLE}" --branch=${TARGET_BRANCH}
#Push the news of Vitam into source branch
cd vitam-ui;
git remote rm origin;
git remote add origin https://oauth2:$PRIVATE_TOKEN@$LIEN_CINES_VITAMUI;
git checkout -b $SOURCE_BRANCH;
git push --set-upstream origin $SOURCE_BRANCH --force;
BODY="{
\"id\": ${CI_PROJECT_ID},
\"project_id\": ${CI_PROJECT_ID},
\"title\": \"${CI_COMMIT_REF_NAME}\",
\"description\": \"${CI_COMMIT_REF_NAME}\",
\"source_branch\": \"${SOURCE_BRANCH}\",
\"target_branch\": \"${TARGET_BRANCH}\",
\"assignee_id\":\"${GITLAB_USER_ID}\",
\"reviewer_ids\":\"${GITLAB_REVIEWER_ID}\",
\"remove_source_branch\": true,
\"squash\": false
}";
echo ${BODY};
#create merge request
curl -X POST "${HOST}${CI_PROJECT_ID}/merge_requests" \
--header "PRIVATE-TOKEN:${PRIVATE_TOKEN}" \
--header "Content-Type: application/json" \
--data "${BODY}";
echo "Opened a new merge request: ${CI_COMMIT_REF_NAME} and assigned to you";
else echo "no match"
fi
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment