Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
9e9ffb26
Commit
9e9ffb26
authored
2 years ago
by
Yaroslav Dynnikov
Browse files
Options
Downloads
Patches
Plain Diff
k8s: fixup ci and dockerfile
parent
8ec11879
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!396
Picodata helm chart
Pipeline
#14926
passed
2 years ago
Stage: build-base-image
Stage: test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+8
-0
8 additions, 0 deletions
.dockerignore
.gitlab-ci.yml
+66
-53
66 additions, 53 deletions
.gitlab-ci.yml
helm/picodata.Dockerfile
+5
-7
5 additions, 7 deletions
helm/picodata.Dockerfile
with
79 additions
and
60 deletions
.dockerignore
0 → 100644
+
8
−
0
View file @
9e9ffb26
/target
.rocks
.dockerignore
.gitlab-ci.yaml
*.snap
*.xlog
__pycache__/
tmp/
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
66
−
53
View file @
9e9ffb26
...
...
@@ -9,8 +9,6 @@ stages:
-
sign
-
deploy
-
test_rpm
-
release
-
docker
workflow
:
# See https://docs.gitlab.com/ee/ci/jobs/job_control.html#avoid-duplicate-pipelines
...
...
@@ -23,7 +21,8 @@ workflow:
-
if
:
$CI_PIPELINE_SOURCE == "web"
variables
:
BASE_IMAGE
:
docker-public.binary.picodata.io/picodata-build-base
REGISTRY
:
docker-public.binary.picodata.io
BASE_IMAGE
:
${REGISTRY}/picodata-build-base
CARGO_HOME
:
/shared-storage/picodata/.cargo
CACHE_PATHS
:
target .venv
CACHE_ARCHIVE
:
/shared-storage/picodata/cache.tar
...
...
@@ -125,7 +124,7 @@ test:
#
# Tags in `tarantool-sys` and `luajit` submodules are necessary for
# the build scripts. Without them the job fails.
-
|
-
&fetch-tags
|
# Fetch tags
ci-log-section start "fetch-submodule-tags" Fetching tags for submodules
for s in tarantool-sys tarantool-sys/third_party/luajit; do
...
...
@@ -179,6 +178,40 @@ test:
echo "Skip saving cache on a non-master branch"
fi
test-docker
:
stage
:
test
tags
:
-
shell
rules
:
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
changes
:
compare_to
:
master
paths
:
-
helm/picodata.Dockerfile
-
helm/picodata-diag.Dockerfile
-
.gitlab-ci.yml
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when
:
on_success
-
# else
when
:
never
variables
:
GIT_DEPTH
:
100
GIT_STRATEGY
:
fetch
GIT_SUBMODULE_STRATEGY
:
recursive
before_script
:
-
export PATH=docker-build-base:$PATH
-
*fetch-tags
script
:
-
|
# Build docker images
for image in picodata picodata-diag; do
ci-log-section start "test-docker-${image}" Building docker image ${image}
docker build \
--label GIT_COMMIT=${CI_COMMIT_SHA} \
-f helm/${image}.Dockerfile .
ci-log-section end "test-docker-${image}"
done
.pack
:
tags
:
-
shell
...
...
@@ -350,6 +383,35 @@ deploy-job:
-
pack-debian
-
sign-rpm-packages
deploy-docker
:
stage
:
deploy
tags
:
-
shell
only
:
-
web
-
tags
variables
:
GIT_DEPTH
:
100
GIT_STRATEGY
:
fetch
GIT_SUBMODULE_STRATEGY
:
recursive
before_script
:
-
export PATH=docker-build-base:$PATH
-
*fetch-tags
-
mkdir -p $CI_PROJECT_DIR/.docker
-
echo $DOCKER_AUTH_RW > $CI_PROJECT_DIR/.docker/config.json
script
:
-
|
# Rebuild and push docker images
for image in picodata picodata-diag; do
ci-log-section start "deploy-docker-${image}" Building and pushing docker image ${image}
docker build \
--label GIT_COMMIT=${CI_COMMIT_SHA} \
-t ${REGISTRY}/${image}:latest \
-f helm/${image}.Dockerfile .
docker --config $CI_PROJECT_DIR/.docker push ${REGISTRY}/${image}:latest
ci-log-section end "deploy-docker-${image}"
done
test_el7
:
stage
:
test_rpm
only
:
...
...
@@ -394,52 +456,3 @@ test_redos:
-
yum install -y picodata
needs
:
-
deploy-job
docker_build
:
stage
:
docker
tags
:
-
shell
rules
:
-
if
:
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes
:
# implies compare_to HEAD~1
paths
:
&helm-changes-paths
-
helm/**
-
.gitlab-ci.yml
-
if
:
$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
changes
:
compare_to
:
master
paths
:
*helm-changes-paths
-
when
:
never
variables
:
GIT_DEPTH
:
0
GIT_STRATEGY
:
fetch
GIT_SUBMODULE_STRATEGY
:
recursive
script
:
# Build main k8s image
-
docker build -t docker-public.binary.picodata.io/picodata:latest -f helm/picodata.Dockerfile .
# Build diagnostic image
-
docker build -t docker-public.binary.picodata.io/picodata-diag:latest -f helm/picodata-diag.Dockerfile .
docker_push
:
stage
:
docker
tags
:
-
shell
# only:
# - web
# - tags
variables
:
GIT_DEPTH
:
0
GIT_STRATEGY
:
fetch
GIT_SUBMODULE_STRATEGY
:
recursive
before_script
:
-
mkdir -p $CI_PROJECT_DIR/.docker
-
echo $DOCKER_AUTH_RW > $CI_PROJECT_DIR/.docker/config.json
script
:
-
rm -rf ~/.docker
# Push main k8s image
-
docker build -t docker-public.binary.picodata.io/picodata:latest -f helm/picodata.Dockerfile .
-
docker --config $CI_PROJECT_DIR push docker-public.binary.picodata.io/picodata:latest
# Push diagnostic image
-
docker build -t docker-public.binary.picodata.io/picodata-diag:latest -f helm/picodata-diag.Dockerfile .
-
docker --config $CI_PROJECT_DIR push docker-public.binary.picodata.io/picodata-diag:latest
This diff is collapsed.
Click to expand it.
helm/picodata.Dockerfile
+
5
−
7
View file @
9e9ffb26
...
...
@@ -5,16 +5,14 @@ RUN dnf -y install dnf-plugins-core \
&&
dnf
install
-y
gcc gcc-c++ make cmake git libstdc++-static libtool
\
&&
dnf clean all
RUN
set
-e
;
curl
--proto
'=https'
--tlsv1
.2
-sSf
https://sh.rustup.rs
\
| sh
-s
--
-y
--profile
default
--default-toolchain
1.65.0
\
&&
export
PATH
=
/root/.cargo/bin:
${
PATH
}
\
&&
mkdir
/build
RUN
set
-e
;
\
curl
--proto
'=https'
--tlsv1
.2
-sSf
https://sh.rustup.rs |
\
sh
-s
--
-y
--profile
default
--default-toolchain
1.65.0
ENV
PATH=/root/.cargo/bin:${PATH}
WORKDIR
/build/picodata
COPY
. .
RUN
make build-release
RUN
cargo build
--locked
--release
FROM
rockylinux:8
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment