-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
100 lines (95 loc) · 4.36 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
stages:
- docker
- release
default:
tags:
- k8s-small
arkime:
stage: docker
image: docker:24.0.5
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: '/certs'
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: '$DOCKER_TLS_CERTDIR/client'
services:
- docker:24.0.5-dind
before_script:
- until docker info; do sleep 1; done
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build
"${CI_PROJECT_DIR}/arkime"
-f "${CI_PROJECT_DIR}/arkime/Dockerfile"
--build-arg ARKIME_VERSION=$(cat ${CI_PROJECT_DIR}/arkime/version)
-t "${CI_REGISTRY_IMAGE}/arkime:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}"
-t "${CI_REGISTRY_IMAGE}/arkime:${CI_COMMIT_BRANCH}"
-t "${CI_REGISTRY_IMAGE}/arkime:${CI_COMMIT_SHORT_SHA}"
-t "${CI_REGISTRY_IMAGE}/arkime:$(cat ${CI_PROJECT_DIR}/arkime/version)"
- docker push ${CI_REGISTRY_IMAGE}/arkime:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}/arkime:${CI_COMMIT_BRANCH}
- docker push ${CI_REGISTRY_IMAGE}/arkime:${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}/arkime:$(cat ${CI_PROJECT_DIR}/arkime/version)
fluentd:
stage: docker
image: docker:24.0.5
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: '/certs'
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: '$DOCKER_TLS_CERTDIR/client'
services:
- docker:24.0.5-dind
before_script:
- until docker info; do sleep 1; done
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build
"${CI_PROJECT_DIR}/fluentd"
-f "${CI_PROJECT_DIR}/fluentd/Dockerfile"
--build-arg FLUENTD_VERSION=$(cat ${CI_PROJECT_DIR}/fluentd/version)
-t "${CI_REGISTRY_IMAGE}/fluentd:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}"
-t "${CI_REGISTRY_IMAGE}/fluentd:${CI_COMMIT_BRANCH}"
-t "${CI_REGISTRY_IMAGE}/fluentd:${CI_COMMIT_SHORT_SHA}"
-t "${CI_REGISTRY_IMAGE}/fluentd:$(cat ${CI_PROJECT_DIR}/fluentd/version)"
- docker push ${CI_REGISTRY_IMAGE}/fluentd:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}/fluentd:${CI_COMMIT_BRANCH}
- docker push ${CI_REGISTRY_IMAGE}/fluentd:${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}/fluentd:$(cat ${CI_PROJECT_DIR}/fluentd/version)
opensearch-dashboards:
stage: docker
image: docker:24.0.5
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: '/certs'
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: '$DOCKER_TLS_CERTDIR/client'
services:
- docker:24.0.5-dind
before_script:
- until docker info; do sleep 1; done
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build
"${CI_PROJECT_DIR}/opensearch-dashboards"
-f "${CI_PROJECT_DIR}/opensearch-dashboards/Dockerfile"
--build-arg opensearch-dashboards_VERSION=$(cat ${CI_PROJECT_DIR}/opensearch-dashboards/version)
-t "${CI_REGISTRY_IMAGE}/opensearch-dashboards:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}"
-t "${CI_REGISTRY_IMAGE}/opensearch-dashboards:${CI_COMMIT_BRANCH}"
-t "${CI_REGISTRY_IMAGE}/opensearch-dashboards:${CI_COMMIT_SHORT_SHA}"
-t "${CI_REGISTRY_IMAGE}/opensearch-dashboards:$(cat ${CI_PROJECT_DIR}/opensearch-dashboards/version)"
- docker push ${CI_REGISTRY_IMAGE}/opensearch-dashboards:${CI_COMMIT_BRANCH}-${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}/opensearch-dashboards:${CI_COMMIT_BRANCH}
- docker push ${CI_REGISTRY_IMAGE}/opensearch-dashboards:${CI_COMMIT_SHORT_SHA}
- docker push ${CI_REGISTRY_IMAGE}/opensearch-dashboards:$(cat ${CI_PROJECT_DIR}/opensearch-dashboards/version)
release-to-github:
stage: release
image: bitnami/git
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
when: on_success
script:
- git config --global user.email $GITLAB_USER_EMAIL
- git config --global user.name $GITLAB_USER_NAME
- git remote add github "https://$GITHUB_USERNAME:[email protected]/StamusNetworks/stamus-images.git"
- git push github HEAD:next