-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
43 lines (42 loc) · 1.09 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
build:
image: openjdk:17
stage: build
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
script:
- ./gradlew publish --stacktrace
- ./gradlew publish -Pav=1.18 --stacktrace
artifacts:
paths:
- maven
name: "emc-$CI_COMMIT_SHORT_SHA-snapshot"
deploy:
image: node:latest
stage: deploy
resource_group: production
dependencies:
- build
variables:
GIT_EMAIL: "ci@gitlab.com"
GIT_NAME: "GitLab CI"
before_script:
- apt update
- apt install -y git openssh-client rsync
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- git config --global user.email "$GIT_EMAIL"
- git config --global user.name "$GIT_NAME"
script:
- git clone git@gitlab.com:EMC-Framework/maven.git maven-remote
- rsync -r -I maven/* maven-remote
- cd maven-remote
# - node update-latest.js
- git add .
- git commit -m "EMC snapshot $CI_COMMIT_SHORT_SHA"
- git push
only:
- "1.18.2"