stages: - build - deploy build: stage: build tags: - docker image: git.ia2.inaf.it:5050/vospace/vospace-rest/vospace-test-env variables: FILE_CATALOG_REPO_URL: "https://gitlab-ci-token:${CI_JOB_TOKEN}@www.ict.inaf.it/gitlab/vospace/vospace-file-catalog.git" script: - git clone ${FILE_CATALOG_REPO_URL} - mvn -f parent-pom.xml clean install - mvn clean package -Dinit_database_scripts_path=../../vospace-file-catalog artifacts: paths: - target/vospace-parent*.jar - parent-pom.xml - pom.xml expire_in: 7 days only: - master deploy: stage: deploy tags: - docker script: - mvn -f parent-pom.xml deploy:deploy-file -Dfile=parent-pom.xml -DrepositoryId=ia2.snapshots -DpomFile=parent-pom.xml -Durl=${IA2_MVN_REPO_SNAPSHOTS} - file=$(ls target/vospace-parent*.jar) - mvn deploy:deploy-file -Dfile=$file -DrepositoryId=ia2.snapshots -DpomFile=pom.xml -Durl=${IA2_MVN_REPO_SNAPSHOTS} only: - master