Last active
March 16, 2018 12:37
-
-
Save husjon/e8ab82603905111f49042d1f996a6678 to your computer and use it in GitHub Desktop.
gitlab-runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example | |
--- | |
stages: | |
- test | |
- build | |
run_all_tests: | |
stage: test | |
script: | |
- nose2 | |
run_specific_test: | |
stage: test | |
script: | |
- nose2 tests.test_SomeClass | |
build_all_the_things: | |
stage: build | |
script: | |
- ./build_script.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /srv/gitlab-runner/config/config.toml | |
concurrent = 1 | |
check_interval = 0 | |
[[runners]] | |
name = "runner-name" | |
url = "http://<gitlab-server>" | |
token = "token" | |
executor = "docker" | |
[runners.docker] | |
tls_verify = false | |
image = "<registry>:443/<image>:<tag>" | |
privileged = false | |
disable_cache = false | |
volumes = ["/cache"] | |
shm_size = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clients | |
# Instruct every Docker daemon to trust that certificate. The way to do this depends on your OS. | |
# Copy the domain.crt file to /etc/docker/certs.d/<domain>:443/ca.crt on every Docker host. | |
# You do not need to restart Docker. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.docker.com/registry/insecure/#use-self-signed-certificates | |
# Server | |
$ mkdir -p certs | |
$ openssl req \ | |
-newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key \ | |
-x509 -days 365 -out certs/domain.crt | |
# Make sure CA is identical to domain / hostname of server | |
$ docker run -d \ | |
--restart=always \ | |
--name registry \ | |
-v `pwd`/certs:/certs \ | |
-e REGISTRY_HTTP_ADDR=0.0.0.0:443 \ | |
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt \ | |
-e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \ | |
-p 443:443 \ | |
registry:2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment