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
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: sed-tgt-version
|
||||
pull: always
|
||||
image: bash
|
||||
commands:
|
||||
- sed -i 's/3.1.110/3.1.404/' global.json
|
||||
# since we're running 3.1.404 here in the CI, this is necessary
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/heads/feature-*
|
||||
- refs/pull/*/head
|
||||
- refs/tags/*
|
||||
|
||||
steps:
|
||||
- name: debug
|
||||
pull: always
|
||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
||||
depends_on:
|
||||
- sed-tgt-version
|
||||
commands:
|
||||
- dotnet restore
|
||||
- dotnet build .
|
||||
|
@ -27,8 +25,6 @@ steps:
|
|||
- name: release
|
||||
pull: always
|
||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
|
||||
depends_on:
|
||||
- sed-tgt-version
|
||||
commands:
|
||||
- dotnet restore
|
||||
- dotnet publish -c Release -o out
|
||||
|
|
|
@ -5,14 +5,10 @@ ENV UNAME unpriv
|
|||
RUN adduser -D -u ${UID} -g ${GID} -H ${UNAME} -h /src
|
||||
WORKDIR /src
|
||||
|
||||
COPY global.json ./
|
||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
||||
|
||||
COPY *.csproj ./
|
||||
RUN dotnet restore
|
||||
|
||||
COPY . ./
|
||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
||||
RUN dotnet publish -c Release -o bin/out
|
||||
|
||||
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
|
||||
WORKDIR /src
|
||||
|
||||
COPY global.json ./
|
||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
||||
|
||||
COPY *.csproj ./
|
||||
RUN dotnet restore
|
||||
|
||||
COPY . ./
|
||||
RUN sed -i 's/3.1.110/3.1.404/' global.json
|
||||
RUN dotnet build -c Debug -o bin/out
|
||||
RUN chown -R ${UID}:${GID} ./ /root/
|
||||
USER ${UNAME}
|
||||
|
|
4
Makefile
4
Makefile
|
@ -35,13 +35,13 @@ dockerbuild:
|
|||
docker build \
|
||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||
-t $(dtag) -f $(dfile) .
|
||||
-t $(dtag) -f $(dfile) --no-cache .
|
||||
|
||||
dockerdevbuild:
|
||||
docker build \
|
||||
--build-arg VCS_REF=`git rev-parse --short HEAD` \
|
||||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
|
||||
-t $(dtagdev) -f $(dfiledev) .
|
||||
-t $(dtagdev) -f $(dfiledev) --no-cache .
|
||||
|
||||
dockerrun:
|
||||
@echo ======================
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "3.1.404"
|
||||
"version": "3.1.*"
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue