chore: target 3.1.* + connected simplification
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
* global.json sdk value will now match 3.1.whatever * rm the now-redundant sed both from the ci pipeline and Dockerfile* * limit ci pipeline runs to single build for an event. e.g. on a pr, run a single build instead of both a pr build and a push build * edit Makefile to force --no-cache builds
This commit is contained in:
parent
4fd5b9f4de
commit
b0669f65c0
18
.drone.yml
18
.drone.yml
|
@ -7,19 +7,17 @@ platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
trigger:
|
||||||
- name: sed-tgt-version
|
ref:
|
||||||
pull: always
|
- refs/heads/master
|
||||||
image: bash
|
- refs/heads/feature-*
|
||||||
commands:
|
- refs/pull/*/head
|
||||||
- sed -i 's/3.1.110/3.1.404/' global.json
|
- refs/tags/*
|
||||||
# since we're running 3.1.404 here in the CI, this is necessary
|
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: debug
|
- name: debug
|
||||||
pull: always
|
pull: always
|
||||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
||||||
depends_on:
|
|
||||||
- sed-tgt-version
|
|
||||||
commands:
|
commands:
|
||||||
- dotnet restore
|
- dotnet restore
|
||||||
- dotnet build .
|
- dotnet build .
|
||||||
|
@ -27,8 +25,6 @@ steps:
|
||||||
- name: release
|
- name: release
|
||||||
pull: always
|
pull: always
|
||||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
||||||
depends_on:
|
|
||||||
- sed-tgt-version
|
|
||||||
commands:
|
commands:
|
||||||
- dotnet restore
|
- dotnet restore
|
||||||
- dotnet publish -c Release -o out
|
- dotnet publish -c Release -o out
|
||||||
|
|
|
@ -5,14 +5,10 @@ ENV UNAME unpriv
|
||||||
RUN adduser -D -u ${UID} -g ${GID} -H ${UNAME} -h /src
|
RUN adduser -D -u ${UID} -g ${GID} -H ${UNAME} -h /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY global.json ./
|
|
||||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
|
||||||
RUN dotnet publish -c Release -o bin/out
|
RUN dotnet publish -c Release -o bin/out
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:3.1
|
FROM mcr.microsoft.com/dotnet/aspnet:3.1
|
||||||
|
|
|
@ -5,14 +5,10 @@ ENV UNAME unpriv
|
||||||
RUN adduser -D -u ${UID} -g ${GID} -H ${UNAME} -h /src
|
RUN adduser -D -u ${UID} -g ${GID} -H ${UNAME} -h /src
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY global.json ./
|
|
||||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
|
||||||
|
|
||||||
COPY *.csproj ./
|
COPY *.csproj ./
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
|
||||||
RUN dotnet build -c Debug -o bin/out
|
RUN dotnet build -c Debug -o bin/out
|
||||||
RUN chown -R ${UID}:${GID} ./ /root/
|
RUN chown -R ${UID}:${GID} ./ /root/
|
||||||
USER ${UNAME}
|
USER ${UNAME}
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -35,13 +35,13 @@ dockerbuild:
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
-t $(dtag) -f $(dfile) .
|
-t $(dtag) -f $(dfile) --no-cache .
|
||||||
|
|
||||||
dockerdevbuild:
|
dockerdevbuild:
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||||
-t $(dtagdev) -f $(dfiledev) .
|
-t $(dtagdev) -f $(dfiledev) --no-cache .
|
||||||
|
|
||||||
dockerrun:
|
dockerrun:
|
||||||
@echo ======================
|
@echo ======================
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "3.1.404"
|
"version": "3.1.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue