Move to Gitlab CI

This commit is contained in:
2020-05-03 04:04:18 +00:00
parent 6763d8c4f0
commit 06ae4fe078
5 changed files with 31 additions and 22 deletions

View File

@@ -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
View 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

View File

@@ -1,4 +1,4 @@
FROM registry.lan/alpine:3.10 FROM alpine:3
RUN apk -v --update add \ RUN apk -v --update add \
bash \ bash \

8
Jenkinsfile vendored
View File

@@ -1,8 +0,0 @@
node {
checkout scm
docker.withRegistry('https://registry.lan') {
def image = docker.build('dns-updater')
image.push("1")
image.push("latest")
}
}

View File

@@ -1,7 +1,5 @@
# Homelab-Route53-DNS # Homelab-Route53-DNS
[![Build Status](https://drone.lan/api/badges/max/Homelab-Route53-DNS/status.svg)](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/). 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. 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.