Skip to content
Snippets Groups Projects
Verified Commit 03ffbc88 authored by Konrad Botor's avatar Konrad Botor
Browse files

Pinned example jobs to specific hive and haf commits and expanded README - ref. hive#406

parent b1af5819
No related branches found
No related tags found
1 merge request!1Custom docker containers containing required bash scripts
Pipeline #57473 passed
......@@ -101,6 +101,8 @@ lint_python_scripts:
echo -e "\e[0Ksection_start:$(date +%s):push2[collapsed=true]\r\e[0KPushing image "$CI_REGISTRY_IMAGE/$BUILD_TARGET:$CI_COMMIT_SHA"..."
docker push "$CI_REGISTRY_IMAGE/$BUILD_TARGET:$CI_COMMIT_SHA"
echo -e "\e[0Ksection_end:$(date +%s):push2\r\e[0K"
needs:
- build_docker_dind_image
tags:
- public-runner-docker
......@@ -153,7 +155,8 @@ prepare_example_hived_data_5m_image:
REGISTRY_PASS: "$CI_REGISTRY_PASSWORD"
REGISTRY_URL: "registry.gitlab.syncad.com/hive/common-ci-configuration/hive/"
before_script:
- git clone --branch develop $REPOSITORY_URL
- LOG_FILE=tmp.log source /usr/local/bin/common.sh
- do_clone_commit 9f39eae9ef35642445ae63e8c0a681f1376334ed $SUBDIRECTORY $REPOSITORY_URL
after_script:
- cat docker_image_name.env
when: manual
......@@ -168,7 +171,8 @@ prepare_example_haf_data_5m_image:
REGISTRY_PASS: "$CI_REGISTRY_PASSWORD"
REGISTRY_URL: "registry.gitlab.syncad.com/hive/common-ci-configuration/haf/"
before_script:
- git clone --branch develop $REPOSITORY_URL
- LOG_FILE=tmp.log source /usr/local/bin/common.sh
- do_clone_commit c21bdf1937c1cbd2781aa86816f159285a1909bf $SUBDIRECTORY $REPOSITORY_URL
after_script:
- cat docker_image_name.env
when: manual
......
# Common CI Configuration
This project contains the common CI templates and scripts.
This project contains the common CI templates and scripts for Hive and Hive-related projects.
## Directory structure
......@@ -9,7 +9,24 @@ This project contains the common CI templates and scripts.
- scripts/python - Python scripts
- templates - GitLab CI templates
## Tmp
## Example jobs
docker build --target docker-builder --tag docker-builder .
docker build --target image-remover --tag image-remover .
The GitLab CI configuration for this repository contains example jobs based on the templates defined in it. On top of that the Docker images are built by jobs also based on said templates.
Note that jobs **prepare_example_hived_data_5m_image** and **prepare_example_haf_data_5m_image** are configured to use Docker image registry belonging to this project, rather than one belonging to hive/hive> and hive/haf> projects respectively. This does not work out of the box, beacuse the jobs require certain prebuilt images. Those images need to be either built manually or pulled from hive/hive> and hive/haf> and then pushed to whatever custom registry you'd like to use. The credentials required by those jobs are the same you'd use with `docker login` command. Not that the **before_script** sections in those jobs are only necessary since this repository defines neither hive/hive> nor hive/haf> as submodules.
The password required by the **example_hived_data_image_cleanup** and **example_haf_data_image_cleanup** is either personal, group or project access token with permission to use GitLab API.
## Miscellaneous files
Currently available miscellaneous files are [checkstyle2junit.xslt](misc/checkstyle2junit.xslt) and [docker-compose.dind.yml](misc/docker-compose.dind.yml).
The former is an XSL transformation file, which can be used to transform checkstyle-style test reports into junit-style ones. You can see how to use it in job **lint_bash_scripts**.
The latter is a Compose file for setting up a simple Docker-in-Docker container. To connect to that container with a Docker CLI one use command like:
```bash
docker run -it --rm --network docker -e DOCKER_TLS_CERTDIR=/certs -v docker-certs-client:/certs/client:ro --name docker-cli docker:20.10.10
```
The iportant bit is connecting to the right network (`--network docker`) and mounting the TLS certificates (`-e DOCKER_TLS_CERTDIR=/certs -v docker-certs-client:/certs/client:ro`). Other parameters can be changed to suit your purposes.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment