Commit b773e0d0 authored by Roger Feese's avatar Roger Feese
Browse files

Merge branch 'add-dotnet-build-server' into 'develop'

Add dotnet build server

See merge request !56
parents 265cf22f e6a32a85
......@@ -119,3 +119,17 @@ Make Detect Secrets:
- detect-secrets/**/*
except:
- schedules
Make dotnet-build-server:
stage: build
tags:
- linux
- dockerd
script:
- make dotnet
only:
changes:
- dotnet-build-server/*
- dotnet-build-server/**/*
except:
- schedules
......@@ -133,3 +133,17 @@ Publish Detect Secrets:
- detect-secrets/**/*
except:
- schedules
Publish dotnets:
<<: *push_to_registry
variables:
IMG_NAME: "dotnet-build-server"
needs: ["Make dotnet-build-server"]
only:
refs:
- master
changes:
- dotnet-build-server/*
- dotnet-build-server/**/*
except:
- schedules
......@@ -18,7 +18,7 @@ GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
####################
BUILD_ARGS := --build-arg VCS_REF=$(GIT_COMMIT)
.PHONY: all clean test $(DOCKERFILES) static-code-analysis mobile delete_dangling_images security publish utility
.PHONY: all clean test $(DOCKERFILES) static-code-analysis mobile delete_dangling_images security publish utility dotnet
all: php-lint php-unit-test mobile static-code-analysis utility detect-secrets dependency-check xml-lint
......@@ -29,6 +29,7 @@ php-unit-test: php-unit-test_5.6 php-unit-test_7.0 php-unit-test_7.1 php-unit-te
mobile: android-build-server
static-code-analysis: static-code-analysis_latest static-code-analysys_php static-code-analysys_python static-code-analysys_android
utility: alpine-ssh-client merge-request-check
dotnet: dotnet_3.1 dotnet_5.0
# PHP Lint Images
####################
......@@ -132,6 +133,15 @@ detect-secrets: detect-secrets/Dockerfile
dependency-check: dependency-check/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/dependency-check dependency-check/
# dotnet Images
####################
dotnet_3.1: dotnet-build-server/3.1/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/dotnet-build-server:3.1 -f dotnet-build-server/3.1/Dockerfile dotnet-build-server/3.1/
dotnet_5.0: dotnet-build-server/5.0/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/dotnet-build-server:5.0 -f dotnet-build-server/5.0/Dockerfile dotnet-build-server/5.0/
#IMAGES_TO_SCAN = $(shell docker images --format '{{.Repository}}:{{.Tag}}' | grep unl-its )
#security:
# @docker login -u ${TENABLE_IO_ACCESS_KEY} -p ${TENABLE_IO_SECRET_KEY} registry.cloud.tenable.com
......
FROM mcr.microsoft.com/dotnet/sdk:3.1-buster
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="dotnet SDK 3.1" \
org.label-schema.description="Docker image to build .NET core 3.1 applications" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version="0.1.0" \
org.label-schema.schema-version="1.0" \
maintainer="Roger Feese <rfeese@nebraska.edu>"
# Make sure that tools we need are installed
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# sonarscanner (https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/)
RUN dotnet tool install --global dotnet-sonarscanner
RUN dotnet tool install --global trx2junit
ENV PATH=/root/.dotnet/tools:$PATH
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="dotnet SDK 5.0" \
org.label-schema.description="Docker image to build .NET core 5.0 applications" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version="0.1.0" \
org.label-schema.schema-version="1.0" \
maintainer="Roger Feese <rfeese@nebraska.edu>"
# Make sure that tools we need are installed
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
# sonarscanner (https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/)
RUN dotnet tool install --global dotnet-sonarscanner
RUN dotnet tool install --global trx2junit
ENV PATH=/root/.dotnet/tools:$PATH
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment