-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
46 lines (43 loc) · 1.15 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
stages:
- build
- mirror
build_sql_boot:
stage: build
tags:
- deploy-all-runner
script:
- mvn frontend:install-node-and-npm@install-node-and-npm
- mvn frontend:npm@npm-install
- mvn frontend:npm@npm-run-build
- mvn antrun:run@copy
- mvn verify
- mvn rpm:rpm
- curl --fail -u $ARTIFACTORY_USERNAME:$ARTIFACTORY_PASSWORD -X PUT https://repo.croc.ru/artifactory/pstgrscroc.rpm-snapshots-local/sql-boot-0.5.1-1.noarch.rpm -T ./target/rpm/sql-boot/RPMS/noarch/sql-boot-0.5.1-1.noarch.rpm
only:
- master
artifacts:
paths:
- target/sql-boot.zip
expire_in: 1 day
push-to-github:
stage: mirror
tags:
- deploy-all-runner
variables:
UPSTREAM_REPOSITORY: "[email protected]:CrocInc/sql-boot.git"
UPSTREAM_BRANCH: "croc_repo"
GIT_SUBMODULE_STRATEGY: none
GIT_STRATEGY: clone
cache: {}
only:
- github
script:
- mkdir -p ~/.ssh
- chmod -R go-rwx ~/.ssh
- eval $(ssh-agent -s)
- ssh-add <(echo "$GITHUB_MIRROR_PRIVATE")
- git remote add mirror $UPSTREAM_REPOSITORY
- git remote show mirror
- git fetch mirror
- git push --progress mirror HEAD:$UPSTREAM_BRANCH