Move to Gitlab CI
This commit is contained in:
11
.drone.yml
11
.drone.yml
@@ -1,11 +0,0 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: kaniko
|
||||
image: banzaicloud/drone-kaniko
|
||||
settings:
|
||||
registry: registry.lan
|
||||
repo: drone-test
|
||||
auto_tag: true
|
||||
30
.gitlab-ci.yml
Normal file
30
.gitlab-ci.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
stages:
|
||||
- build
|
||||
- release
|
||||
|
||||
variables:
|
||||
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
|
||||
|
||||
build:
|
||||
image: docker:19.03.8
|
||||
services:
|
||||
- docker:19.03.8-dind
|
||||
stage: build
|
||||
script:
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker build --pull -t $CONTAINER_TEST_IMAGE .
|
||||
- docker push $CONTAINER_TEST_IMAGE
|
||||
|
||||
release:
|
||||
image: docker:19.03.8
|
||||
services:
|
||||
- docker:19.03.8-dind
|
||||
stage: release
|
||||
script:
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker pull $CONTAINER_TEST_IMAGE
|
||||
- docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
|
||||
- docker push $CONTAINER_RELEASE_IMAGE
|
||||
only:
|
||||
- master
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.lan/alpine:3.10
|
||||
FROM alpine:3
|
||||
|
||||
RUN apk -v --update add \
|
||||
bash \
|
||||
|
||||
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
@@ -1,8 +0,0 @@
|
||||
node {
|
||||
checkout scm
|
||||
docker.withRegistry('https://registry.lan') {
|
||||
def image = docker.build('dns-updater')
|
||||
image.push("1")
|
||||
image.push("latest")
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
# Homelab-Route53-DNS
|
||||
|
||||
[](https://drone.lan/max/Homelab-Route53-DNS)
|
||||
|
||||
home.maxregan.me is a record that points to my home router for VPN access. Since IP is dynamic, this package builds a Docker image which automatically updates the DNS record stored in [AWS Route53](https://aws.amazon.com/route53/).
|
||||
|
||||
The built docker image executes a cronjob that queries http://checkip.amazonaws.com/ to discover its external IP, and then updates the record for home.maxregan.me accordingly. AWS credentials are passed as environment variables.
|
||||
Reference in New Issue
Block a user