add alpine image for using devops-build on gitlab
This commit is contained in:
parent
fb8200bc4d
commit
1ebf8fe06d
3 changed files with 46 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -69,6 +69,7 @@ instance/
|
|||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
|
|
40
infrastructure/docker/build.py
Normal file
40
infrastructure/docker/build.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
from subprocess import run
|
||||
from os import environ
|
||||
from pybuilder.core import task, init
|
||||
from ddadevops import *
|
||||
import logging
|
||||
|
||||
name = 'dda-devops-build'
|
||||
MODULE = 'docker'
|
||||
PROJECT_ROOT_PATH = '../..'
|
||||
|
||||
|
||||
class MyBuild(DevopsDockerBuild):
|
||||
pass
|
||||
|
||||
@init
|
||||
def initialize(project):
|
||||
project.build_depends_on('ddadevops>=0.6.1')
|
||||
stage = 'notused'
|
||||
dockerhub_user = 'notused'
|
||||
dockerhub_password = 'notused'
|
||||
config = create_devops_docker_build_config(
|
||||
stage, PROJECT_ROOT_PATH, MODULE, dockerhub_user, dockerhub_password)
|
||||
build = MyBuild(project, config)
|
||||
build.initialize_build_dir()
|
||||
|
||||
|
||||
@task
|
||||
def image(project):
|
||||
build = get_devops_build(project)
|
||||
build.image()
|
||||
|
||||
@task
|
||||
def drun(project):
|
||||
build = get_devops_build(project)
|
||||
build.drun()
|
||||
|
||||
@task
|
||||
def test(project):
|
||||
build = get_devops_build(project)
|
||||
build.test()
|
5
infrastructure/docker/image/Dockerfile
Normal file
5
infrastructure/docker/image/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM docker:19.03.12
|
||||
|
||||
RUN set -eux;
|
||||
RUN apk add --no-cache build-base python3 python3-dev py3-pip py3-setuptools py3-wheel libffi-dev openssl-dev;
|
||||
RUN pip3 install pybuilder ddadevops deprecation python-terraform boto3 mfa
|
Loading…
Reference in a new issue