Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Add docker-description publishing #514

Merged
merged 4 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 236 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ stages:
- build
- test
- prod
- publish-docker-description

variables: &default-vars
REGISTRY_PATH: docker.io/paritytech
Expand Down Expand Up @@ -92,6 +93,23 @@ default:
--tag "$REGISTRY_PATH/$IMAGE_NAME:staging"
--file "dockerfiles/$IMAGE_NAME/Dockerfile" dockerfiles

.publish-docker-image-description:
stage: publish-docker-description
image: paritytech/dockerhub-description
variables:
DOCKERHUB_REPOSITORY: paritytech/$IMAGE_NAME
DOCKER_USERNAME: $Docker_Hub_User_Parity
DOCKER_PASSWORD: $Docker_Hub_Pass_Parity
README_FILEPATH: $CI_PROJECT_DIR/dockerfiles/$IMAGE_NAME/README.md
rules:
- if: $CI_COMMIT_REF_NAME == "master"
changes:
- dockerfiles/$IMAGE_NAME/README.md
script:
- cd / && sh entrypoint.sh
tags:
- kubernetes-parity-build

#### stage: build

# Only build in PR
Expand Down Expand Up @@ -827,3 +845,221 @@ parity-scale-codec-production:
artifacts: false
rules:
- if: $IMAGE_NAME == "parity-scale-codec"

# Publish images descriptions to hub.docker.com

publish-ansible-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: ansible
SHORT_DESCRIPTION: "ansible utility Docker image."

publish-awscli-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: awscli
SHORT_DESCRIPTION: "awscli utility Docker image."

publish-base-ci-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: base-ci
SHORT_DESCRIPTION: "base-ci utility Docker image."

publish-base-ci-linux-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: base-ci-linux
SHORT_DESCRIPTION: "base-ci-linux utility Docker image."

publish-benchmarks-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: benchmarks
SHORT_DESCRIPTION: "benchmarks utility Docker image."

publish-bridges-ci-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: bridges-ci
SHORT_DESCRIPTION: "bridges-ci utility Docker image."

publish-cachepot-ci-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: cachepot-ci
SHORT_DESCRIPTION: "cachepot-ci utility Docker image."

publish-ci-linux-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: ci-linux
SHORT_DESCRIPTION: "ci-linux utility Docker image."

publish-contracts-ci-linux-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: contracts-ci-linux
SHORT_DESCRIPTION: "contracts-ci-linux utility Docker image."

publish-deb-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: deb
SHORT_DESCRIPTION: "deb utility Docker image."

publish-debian10-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: debian10
SHORT_DESCRIPTION: "debian10 utility Docker image."

publish-gnupg-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: gnupg
SHORT_DESCRIPTION: "gnupg utility Docker image."

publish-ink-ci-linux-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: ink-ci-linux
SHORT_DESCRIPTION: "ink-ci-linux utility Docker image."

publish-ink-waterfall-ci-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: ink-waterfall-ci
SHORT_DESCRIPTION: "ink-waterfall-ci utility Docker image."

publish-kubetools-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: kubetools
SHORT_DESCRIPTION: "kubetools utility Docker image."

publish-lz4-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: lz4
SHORT_DESCRIPTION: "lz4 utility Docker image."

publish-mdbook-utils-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: mdbook-utils
SHORT_DESCRIPTION: "mdbook-utils utility Docker image."

publish-mitogen-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: mitogen
SHORT_DESCRIPTION: "mitogen utility Docker image."

publish-molecule-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: molecule
SHORT_DESCRIPTION: "molecule utility Docker image."

publish-multisig-ci-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: multisig-ci
SHORT_DESCRIPTION: "multisig-ci utility Docker image."

publish-node-bench-regression-guard-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: node-bench-regression-guard
SHORT_DESCRIPTION: "node-bench-regression-guard utility Docker image."

publish-node-wrk-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: node-wrk
SHORT_DESCRIPTION: "node-wrk utility Docker image."

publish-parity-keyring-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: parity-keyring
SHORT_DESCRIPTION: "parity-keyring utility Docker image."

publish-parity-scale-codec-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: parity-scale-codec
SHORT_DESCRIPTION: "parity-scale-codec utility Docker image."

publish-polkadotjs-cli-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: polkadotjs-cli
SHORT_DESCRIPTION: "polkadotjs-cli utility Docker image."

publish-query-exporter-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: query-exporter
SHORT_DESCRIPTION: "query-exporter utility Docker image."

publish-redis-exporter-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: redis-exporter
SHORT_DESCRIPTION: "redis-exporter utility Docker image."

publish-rpm-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: rpm
SHORT_DESCRIPTION: "rpm utility Docker image."

publish-rusty-cachier-env-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: rusty-cachier-env
SHORT_DESCRIPTION: "rusty-cachier-env utility Docker image."

publish-smart-bench-ci-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: smart-bench-ci
SHORT_DESCRIPTION: "smart-bench-ci utility Docker image."

publish-sops-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: sops
SHORT_DESCRIPTION: "sops utility Docker image."

publish-substrate-session-keys-grabber-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: substrate-session-keys-grabber
SHORT_DESCRIPTION: "substrate-session-keys-grabber utility Docker image."

publish-terraform-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: terraform
SHORT_DESCRIPTION: "terraform utility Docker image."

publish-tools-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: tools
SHORT_DESCRIPTION: " utility Docker image."

publish-ws-health-exporter-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: ws-health-exporter
SHORT_DESCRIPTION: "ws-health-exporter utility Docker image."

publish-xbuilder-aarch64-unknown-linux-gnu-docker-image-description:
extends: .publish-docker-image-description
variables:
IMAGE_NAME: xbuilder-aarch64-unknown-linux-gnu
SHORT_DESCRIPTION: "xbuilder-aarch64-unknown-linux-gnu utility Docker image."
1 change: 1 addition & 0 deletions dockerfiles/ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Ansible utility Docker image
2 changes: 1 addition & 1 deletion dockerfiles/awscli/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Awscli.
# Awscli utility Docker image
1 change: 1 addition & 0 deletions dockerfiles/base-ci-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Used to build and test Substrate-based projects.
```Dockerfile
FROM docker.io/paritytech/base-ci-linux:latest
```

1 change: 1 addition & 0 deletions dockerfiles/base-ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ Used to build and test Substrate-based projects.
```Dockerfile
FROM docker.io/paritytech/base-ci-linux:latest
```

13 changes: 6 additions & 7 deletions dockerfiles/benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Docker image to push and check benchmark results
# Docker image to push and check benchmark results

Long term storage metrics is done with Thanos now
https://github.com/paritytech/devops/wiki/DevOps-Internal%3A-Thanos
Expand All @@ -7,7 +7,7 @@ https://github.com/paritytech/devops/wiki/DevOps-Internal%3A-Thanos

## check_bench_result.py

The script takes an output file of `carg bench`, compares current result with the
The script takes an output file of `carg bench`, compares current result with the
latest result and creates a github issue if the threshold is exceeded.


Expand Down Expand Up @@ -254,7 +254,7 @@ export TRESHOLD=20 # Optional. Threshold to create github issue,
python3 check_bench_result.py output.txt


export CI_PROJECT_NAME=jsonrpsee
export CI_PROJECT_NAME=jsonrpsee
export PROMETHEUS_URL="https://thanos.parity-mgmt.parity.io"
export TRESHOLD=20
python3 check_bench_result.py output.txt
Expand Down Expand Up @@ -298,7 +298,7 @@ send-becnh-result:
-l 'commit="'$CI_COMMIT_SHORT_SHA'",cirunner="'$runner'"'
-s $PROMETHEUS_URL


# example with values
push_bench_result --type common \
--project substrate-api-sidecar \
Expand All @@ -311,8 +311,8 @@ send-becnh-result:
## check_single_bench_results.py

Script compares provided result either with constant or with previuos value from Thanos
If the result exceeds constant or threshold, scripts creates github issue.
2 env variables should exist: CI_COMMIT_SHA and GITHUB_TOKEN
If the result exceeds constant or threshold, scripts creates github issue.
2 env variables should exist: CI_COMMIT_SHA and GITHUB_TOKEN

ci example:

Expand Down Expand Up @@ -358,4 +358,3 @@ send-becnh-result:
--constant 35000 \
--value 37461.43
```

1 change: 1 addition & 0 deletions dockerfiles/bridges-ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ test-ink:
script:
- cargo build ...
```

1 change: 1 addition & 0 deletions dockerfiles/cachepot-ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ test-ink:
script:
- cargo build ...
```

1 change: 1 addition & 0 deletions dockerfiles/ci-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ test-substrate:
script:
- cargo build ...
```

1 change: 1 addition & 0 deletions dockerfiles/contracts-ci-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ test-contracts:
script:
- cargo build ...
```

1 change: 1 addition & 0 deletions dockerfiles/deb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Used for signing and managing .deb repositories and packages
```Dockerfile
FROM docker.io/paritytech/deb:latest
```

3 changes: 2 additions & 1 deletion dockerfiles/debian10/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Description
This Debian 10 image is used in the ansible Molecule test as a base to apply roles.

This Debian 10 image is used in the ansible Molecule test as a base to apply roles.
The docker image should be close to default GCP or AWS images.
1 change: 1 addition & 0 deletions dockerfiles/gnupg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Used as base for tooling that requires gnupg.
```Dockerfile
FROM docker.io/paritytech/gnupg:latest
```

1 change: 1 addition & 0 deletions dockerfiles/ink-ci-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ test-ink:
script:
- cargo build ...
```

1 change: 1 addition & 0 deletions dockerfiles/ink-waterfall-ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ test-ink:
script:
- cargo build ...
```

2 changes: 1 addition & 1 deletion dockerfiles/kubetools/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Image with Kube and Helm.
# Image with Kube and Helm.
2 changes: 1 addition & 1 deletion dockerfiles/lz4/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Image containing lz4 and wget binaries.
# Image containing lz4 and wget binaries.
1 change: 1 addition & 0 deletions dockerfiles/mdbook-utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
- mdbook-linkcheck
- mdbook-graphviz
- mdbook-last-changed

2 changes: 1 addition & 1 deletion dockerfiles/mitogen/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Mitogen

Ansible container with mitogen plugin.
Ansible container with mitogen plugin.
1 change: 1 addition & 0 deletions dockerfiles/molecule/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Description

Image with ansible and molecule. Used in GitLab CI to test ansible roles.
2 changes: 1 addition & 1 deletion dockerfiles/multisig-ci/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python:buster image with poetry and non-root user
# python:buster image with poetry and non-root user
1 change: 1 addition & 0 deletions dockerfiles/node-bench-regression-guard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ Just `bundle install && bundle exec ruby run-tests.rb`.
### Dependencies

The test script uses `faker` and `minitest` as the external dependencies. The main script (`node-bench-regression-guard`) is dependency-free and relies solely on Ruby's standard library.

2 changes: 1 addition & 1 deletion dockerfiles/node-wrk/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Dockerfile based on `node:16-slim` contains [wrk](https://github.com/wg/wrk) tool for benchmarks
# Dockerfile based on `node:16-slim` contains [wrk](https://github.com/wg/wrk) tool for benchmarks
Loading