Light README update and CI configuration.

This commit is contained in:
Stanislav Nikitin 2021-09-27 16:58:59 +05:00
parent 1b1c218bb6
commit c2d309c9e9
Signed by: pztrn
GPG Key ID: 1E944A0F0568B550
2 changed files with 69 additions and 0 deletions

48
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,48 @@
variables:
DOCKER_IMAGE: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:20.10.8-dind
DOCKER_HOST: tcp://docker:2375
DOCKER_TCP_PORT: 2375
DOCKER_TLS_CERTDIR: ""
LINTTEST_IMAGE: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v1.42.1
REGISTRY_IMAGE_LATEST: ${CI_REGISTRY_IMAGE}:latest
REGISTRY_IMAGE_TAGGED: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
services:
- name: ${DOCKER_IMAGE}
alias: docker
stages:
- test
- release
lint:
stage: test
tags:
- docker
image: ${LINTTEST_IMAGE}
script:
- golangci-lint run
build_master_image:
stage: release
only:
- master
tags:
- docker
image: ${DOCKER_IMAGE}
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build --pull -t ${REGISTRY_IMAGE_LATEST} --build-arg CI_COMMIT_TAG=${CI_COMMIT_TAG} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} --build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA} --build-arg CI_PROJECT_NAME=${CI_PROJECT_NAME} .
- docker push ${REGISTRY_IMAGE_LATEST}
build_tag_image:
stage: release
only:
- tags
tags:
- docker
image: ${DOCKER_IMAGE}
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker build -t ${REGISTRY_IMAGE_TAGGED} --build-arg CI_COMMIT_TAG=${CI_COMMIT_TAG} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} --build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA} --build-arg CI_PROJECT_NAME=${CI_PROJECT_NAME} .
- docker push ${REGISTRY_IMAGE_TAGGED}

View File

@ -0,0 +1,21 @@
# Periodicator
A thing that do some things periodically.
Initially created for periodic issues (or tasks) creation in Gitlab.
## Installing
There are several ways to install Periodicator.
### Using binary release
Head over releases page, grab your binary and configure your system to start binary using cron.
### Using Docker image
To be written :).
## Configuring
To be written :).