Skip to content

Commit 48a66e4

Browse files
authored
Merge pull request go-swagger#2644 from go-swagger/release-0.28
Prepare for release of v0.28
2 parents 5bf9d67 + 92db4cd commit 48a66e4

File tree

88 files changed

+621
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+621
-274
lines changed

.circleci/config.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -365,16 +365,13 @@ jobs:
365365
- run:
366366
name: Build container
367367
command: |
368-
mkdir -p deploybuild/templates/
369-
cp -r generator/templates/contrib/* deploybuild/templates/
370-
cp Dockerfile ./dist/swagger-musl ./deploybuild
371-
docker build --pull -t quay.io/goswagger/swagger:latest -t quay.io/goswagger/swagger:$CIRCLE_TAG ./deploybuild
368+
docker build --pull --build-arg commit_hash="$CIRCLE_SHA1" --build-arg tag_name="${CIRCLE_TAG-dev}" -t quay.io/goswagger/swagger:latest -t quay.io/goswagger/swagger:${CIRCLE_TAG-dev} ./deploybuild
372369
373370
- run:
374371
name: Publish container
375372
command: |
376373
echo $QUAY_PASS | docker login -u $API_USERNAME --password-stdin https://quay.io
377-
docker push quay.io/goswagger/swagger:$CIRCLE_TAG
374+
docker push quay.io/goswagger/swagger:${CIRCLE_TAG-dev}
378375
docker push quay.io/goswagger/swagger:latest
379376
380377
- store_artifacts:
@@ -403,10 +400,7 @@ jobs:
403400
- run:
404401
name: Build container
405402
command: |
406-
mkdir -p deploybuild/templates/
407-
cp -r generator/templates/contrib/* deploybuild/templates/
408-
cp Dockerfile ./dist/swagger-musl ./deploybuild
409-
docker build --pull -t quay.io/goswagger/swagger:dev ./deploybuild
403+
docker build --pull --build-arg commit_hash="$CIRCLE_SHA1" --build-arg tag_name="dev" -t quay.io/goswagger/swagger:dev .
410404
411405
- run:
412406
name: Publish container

Dockerfile

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
FROM golang:alpine
22

3+
ARG commit_hash="dev"
4+
ARG tag_name="dev"
5+
6+
ADD . /work
7+
WORKDIR /work
8+
9+
RUN apk --no-cache add ca-certificates shared-mime-info mailcap git build-base
10+
11+
RUN mkdir -p bin &&\
12+
LDFLAGS="-linkmode external -extldflags \"-static\"" &&\
13+
LDFLAGS="$LDFLAGS -X github.com/go-swagger/go-swagger/cmd/swagger/commands.Commit=${commit_hash}" &&\
14+
LDFLAGS="$LDFLAGS -X github.com/go-swagger/go-swagger/cmd/swagger/commands.Version=${tag_name}" &&\
15+
go build -o bin/swagger -ldflags "$LDFLAGS" -a ./cmd/swagger
16+
17+
FROM golang:alpine
18+
319
LABEL maintainer="Ivan Porto Carrero <[email protected]> (@casualjim)"
420

5-
RUN apk --no-cache add ca-certificates shared-mime-info mailcap git build-base &&\
6-
go get -u github.com/go-openapi/runtime &&\
7-
go get -u github.com/asaskevich/govalidator &&\
8-
go get -u golang.org/x/net/context &&\
9-
go get -u github.com/jessevdk/go-flags &&\
10-
go get -u golang.org/x/net/context/ctxhttp
21+
RUN apk --no-cache add ca-certificates shared-mime-info mailcap git build-base
1122

12-
ADD ./swagger-musl /usr/bin/swagger
13-
ADD ./templates/ /templates/contrib/
23+
COPY --from=0 /work/bin/swagger /usr/bin/swagger
24+
COPY --from=0 /work/generator/templates/contrib /templates/
1425

1526
ENTRYPOINT ["/usr/bin/swagger"]
1627
CMD ["--help"]

Dockerfile.alpine.ci

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.15-alpine
1+
FROM golang:1.17-alpine
22

33
ENV GOCOVMODE atomic
44

@@ -7,12 +7,12 @@ RUN apk add -U --no-cache bash tar gzip xz procps git curl ruby ruby-dev alpine-
77

88
RUN set -e -x \
99
&& mkdir -p /usr/share/coverage /usr/share/testresults /usr/share/dist \
10-
&& go get -u golang.org/x/tools/cmd/... \
11-
&& go get -u github.com/axw/gocov/gocov \
12-
&& go get -u github.com/matm/gocov-html \
13-
&& go get -u -t github.com/cee-dub/go-junit-report \
14-
&& go get -u github.com/aktau/github-release \
15-
&& go get -u github.com/mitchellh/gox \
10+
&& go get golang.org/x/tools/cmd/...@latest \
11+
&& go get github.com/axw/gocov/gocov@latest \
12+
&& go get github.com/matm/gocov-html@latest \
13+
&& go get -t github.com/cee-dub/go-junit-report@latest \
14+
&& go get github.com/aktau/github-release@latest \
15+
&& go get github.com/mitchellh/gox@latest \
1616
&& gem install --no-document fpm etc \
1717
&& gem sources -c
1818

Dockerfile.ci

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.15
1+
FROM golang:1.17
22

33
ENV GOCOVMODE atomic
44

@@ -11,13 +11,13 @@ RUN apt-get update -qq &&\
1111

1212
RUN set -e -x \
1313
&& mkdir -p /usr/share/coverage /usr/share/testresults /usr/share/dist \
14-
&& go get -u golang.org/x/tools/cmd/... \
15-
&& go get -u github.com/axw/gocov/gocov \
16-
&& go get -u github.com/matm/gocov-html \
17-
&& go get -u -t github.com/cee-dub/go-junit-report \
18-
&& go get -u github.com/aktau/github-release \
19-
&& go get -u github.com/mitchellh/gox \
20-
&& go get -u gotest.tools/gotestsum \
14+
&& go get golang.org/x/tools/cmd/...@latest \
15+
&& go get github.com/axw/gocov/gocov@latest \
16+
&& go get github.com/matm/gocov-html@latest \
17+
&& go get -t github.com/cee-dub/go-junit-report@latest \
18+
&& go get github.com/aktau/github-release@latest \
19+
&& go get github.com/mitchellh/gox@latest \
20+
&& go get -u gotest.tools/gotestsum@latest \
2121
&& gem install --no-document fpm etc \
2222
&& gem sources -c
2323

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.15
1+
FROM golang:1.17
22

33
COPY hack/devtools.sh /opt/devtools.sh
44

examples/authentication/restapi/operations/customers/create.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/authentication/restapi/operations/customers/get_id.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/composed-auth/models/order.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/composed-auth/restapi/operations/add_order.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/composed-auth/restapi/operations/get_account.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)