forked from weafon/vmfs6-tool
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
26 lines (24 loc) · 907 Bytes
/
.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
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- deploy
.ssh_preload: &ssh_preload_define
stage: deploy
tags:
- docker
except:
- rc5
before_script:
- mkdir -p ~/.ssh/
- printf "%s\n" "$KEY200_HTTPD" > ~/.ssh/id_rsa
- chmod 400 ~/.ssh/id_rsa
- ssh-keyscan -H 10.144.1.200 > ~/.ssh/known_hosts
rpmbuild_centos:
<<: *ssh_preload_define
image: 10.144.1.200:5000/kautism/docker-lib:rpmbuild
script:
- rpmbuild/build.sh
- ssh docker-httpd@10.144.1.200 "mkdir -p ~/rpms/$CI_PROJECT_NAME/$CI_BUILD_REF_NAME/"
- ssh docker-httpd@10.144.1.200 "mkdir -p ~/srpms/$CI_PROJECT_NAME/$CI_BUILD_REF_NAME/"
- scp dist/*.x86_64.rpm docker-httpd@10.144.1.200:~/rpms/$CI_PROJECT_NAME/$CI_BUILD_REF_NAME/
- scp dist/*.src.rpm docker-httpd@10.144.1.200:~/srpms/$CI_PROJECT_NAME/$CI_BUILD_REF_NAME/