forked from manticoresoftware/openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
executable file
·139 lines (122 loc) · 4.48 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
stages:
- push
- publish
variables:
GIT_STRATEGY: clone
services:
- manticoresearch/manticore
.init_sqls: &init_sqls
- curl -X POST http://manticoresearch-manticore:9308/sql -d "mode=raw&query=CREATE TABLE test(content text, name text attribute, cat integer)"
- curl -X POST http://manticoresearch-manticore:9308/sql -d "mode=raw&query=CREATE TABLE test_pq(content text, name text attribute, cat integer) type=\'pq\'"
csharp_push:
image: ubuntu:latest
stage: push
before_script:
- apt-get update && apt-get install -y git
only:
changes:
- out/manticoresearch-csharp/**/*
script:
- git remote add manticoresearch-net https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-net.git
- git fetch manticoresearch-net
- git subtree push --prefix=out/manticoresearch-csharp https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-net.git $CI_COMMIT_BRANCH
python_push:
image: ubuntu:latest
stage: push
before_script:
- apt-get update && apt-get install -y git
only:
changes:
- out/manticoresearch-python/**/*
script:
- git remote add manticoresearch-python https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-python.git
- git fetch manticoresearch-python
- git subtree push --prefix=out/manticoresearch-python https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-python.git $CI_COMMIT_BRANCH
javascript_push:
image: ubuntu:latest
stage: push
before_script:
- apt-get update && apt-get install -y git
only:
changes:
- out/manticoresearch-javascript/**/*
script:
- git remote add manticoresearch-javascript https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-javascript.git
- git fetch manticoresearch-javascript
- git subtree push --prefix=out/manticoresearch-javascript https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-javascript.git $CI_COMMIT_BRANCH
java_push:
image: ubuntu:latest
stage: push
before_script:
- apt-get update && apt-get install -y git
only:
changes:
- out/manticoresearch-java/**/*
script:
- git remote add manticoresearch-java https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-java.git
- git fetch manticoresearch-java
- git subtree push --prefix=out/manticoresearch-java https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-java.git $CI_COMMIT_BRANCH
elixir_push:
image: ubuntu:latest
stage: push
before_script:
- apt-get update && apt-get install -y git
only:
changes:
- out/manticoresearch-elixir/**/*
script:
- git remote add manticoresearch-elixir https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-elixir.git
- git fetch manticoresearch-elixir
- git subtree push --prefix=out/manticoresearch-elixir https://$GITHUB_USERNAME:[email protected]/manticoresoftware/manticoresearch-elixir.git $CI_COMMIT_BRANCH
csharp_publish:
stage: publish
when: manual
image: csharp
allow_failure: true
script:
- cd out/manticoresearch-csharp
javascript_npmjs:
stage: publish
when: manual
image: node
allow_failure: true
script:
- cp $NPMRC ~/.npmrc
- cd out/manticoresearch-javascript
- npm publish
python_pypi:
stage: publish
image: python
when: manual
allow_failure: true
script:
- cd out/manticoresearch-python
- cp $PYPIRC ~/.pypirc
- python -m pip install --user --upgrade twine
- python setup.py sdist bdist_wheel
- python -m twine upload dist/*
elixir_hex:
stage: publish
image: elixir
when: manual
allow_failure: true
script:
- cd out/manticoresearch-elixir
- mix local.hex --force
- mix do deps.get
- HEX_API_KEY=$HEXAPIKEY mix hex.publish --yes
java_maven:
stage: publish
image: maven
when: manual
allow_failure: true
script:
- cd out/manticoresearch-java
- mkdir -p ~/.m2
- export GPG_TTY=$(tty)
- export MAVEN_OPTS="--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
- cp $MVNSETTINGS ~/.m2/settings.xml
- apt update && apt install gnupg2 -y && rm -rf /var/lib/apt/lists/*
- gpg2 --import --batch $PRIVATEKEY
- mvn verify -Dgpg.passphrase=$GPGKEY
- mvn clean deploy