Commit f807c5e0 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Added CI configuration for publishing installer

parent 93bb5141
Loading
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
stages:
  - build
  - test
  - deploy

build:
  stage: build
@@ -11,6 +12,19 @@ build:
    - cp config.properties.example config.properties
    - ./build.sh embedded

build_installer:
  stage: build
  tags:
    - docker 
  image: maven:3-openjdk-8
  script:
    - cp config.properties.example config.properties
    - cp TASMAN-webapp/local-settings.xml ~/.m2/settings.xml
    - ./build.sh installer
  artifacts:
    paths:
      - install.sh

test_backend:
  stage: test
  tags:
@@ -21,3 +35,14 @@ test_backend:
    - mvn clean install
    - cd ../TASMAN-core
    - mvn clean install

upload_installer:
  stage: deploy
  tags:
    - shell
  tags:
    - shell
  only:
    - master
  script:
    - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file install.sh "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/TASMAN/latest/install.sh"'
+22 −0
Original line number Diff line number Diff line
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
    <mirrors>
	<!-- Configuration for allowing HTTP repositories -->    
	<mirror>
            <id>ia2-internal-repository-http-unblocker</id>
            <mirrorOf>ia2.internal</mirrorOf>
            <name>IA2 Maven Internal Repository</name>
            <url>http://repo.ia2.inaf.it/maven/repository/internal</url>
            <blocked>false</blocked>
        </mirror>
        <mirror>
            <id>ia2-snapshots-repository-http-unblocker</id>
            <mirrorOf>ia2.snapshots</mirrorOf>
            <name>IA2 Maven Snapshots Repository</name>
            <url>http://repo.ia2.inaf.it/maven/repository/snapshots</url>
            <blocked>false</blocked>
        </mirror>
    </mirrors>
</settings>