Terms of Service | Privacy Policy | Cookie Policy

Verified Commit 679fa4d7 authored by Uwe Plonus's avatar Uwe Plonus
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
*~

.gitlab-ci.yml

0 → 100644
+48 −0
Original line number Diff line number Diff line
image: docker:stable

# When using dind, it's wise to use the overlayfs driver for
# improved performance.
variables:
  DOCKER_DRIVER: overlay2

services:
  - docker:dind

stages:
  - build
  - test
  - deploy

variables:
  TEST_IMAGE: ${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}:test
  DEPLOY_IMAGE: ${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}

build:
  stage: build
  script:
    - docker build -f Dockerfile -t ${TEST_IMAGE} --build-arg CI_REGISTRY=${CI_REGISTRY} --no-cache=true .
    - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${TEST_IMAGE}
    - docker push ${TEST_IMAGE}

test_os:
  stage: test
  script:
    - docker run --rm ${TEST_IMAGE} bash -c "apt-get update && apt-get -y upgrade"

test_golang:
  stage: test
  script:
    - docker run --rm ${TEST_IMAGE} bash -c "go version"

deploy:
  stage: deploy
  script:
    - docker pull ${TEST_IMAGE}
    - docker tag ${TEST_IMAGE} ${DEPLOY_IMAGE}:latest
    - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
    - docker push ${DEPLOY_IMAGE}:latest
    - docker tag ${TEST_IMAGE} ${DEPLOY_IMAGE}:$(date +%Y%m%d)
    - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
    - docker push ${DEPLOY_IMAGE}:$(date +%Y%m%d)
  only:
    - master

Dockerfile

0 → 100644
+6 −0
Original line number Diff line number Diff line
ARG CI_REGISTRY
FROM debian:buster-backports

RUN apt-get update && \
    apt-get -y upgrade && \
    apt-get -y install golang

LICENSE

0 → 100644
+674 −0

File added.

Preview size limit exceeded, changes collapsed.

README.md

0 → 100644
+7 −0
Original line number Diff line number Diff line
# Introduction

This project creates a docker image with golang installed.

The image can be used to run go builds.

This repository is mirrored to https://gitlab.com/sw4j-net/golang