Skip to content

Commit

Permalink
ci: Use goreleaser orb (ory#1692)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Jan 14, 2020
1 parent fc16ab9 commit 4ad50ab
Show file tree
Hide file tree
Showing 22 changed files with 56 additions and 90 deletions.
58 changes: 20 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: 2.1
orbs:
changelog: ory/[email protected]
sdk: ory/[email protected]
goreleaser: ory/[email protected]

jobs:
format:
Expand Down Expand Up @@ -48,11 +49,6 @@ jobs:
steps:
- checkout
- setup_remote_docker
- run:
command: |
./.circleci/release_name.bash
echo 'export DOCKER_SHORT_TAG=$CIRCLE_SHA1' >> $BASH_ENV
source $BASH_ENV
- run: GO111MODULE=off go get github.com/mattn/goveralls github.com/ory/go-acc
- restore_cache:
keys:
Expand All @@ -66,7 +62,6 @@ jobs:
# Running race conditions requires parallel tests, otherwise it's worthless (which is the case)
# - run: go test -race -short $(go list ./... | grep -v cmd)
- run: test -z "$CIRCLE_PR_NUMBER" && goveralls -service=circle-ci -coverprofile=coverage.txt -repotoken=$COVERALLS_REPO_TOKEN || echo "forks are not allowed to push to coveralls"
- run: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --skip-publish --rm-dist

test-e2e-memory:
docker:
Expand Down Expand Up @@ -340,24 +335,6 @@ jobs:
- run: "cp configuration.md ../docs/docs/hydra/configuration.md"
- run: "(cd ../docs && git add -A && git commit -a -m \"Updates ORY Hydra autogenerated docs\" && git push origin) || exit 0"

release:
docker:
- image: circleci/golang:1.13
environment:
- GO111MODULE=on
working_directory: /go/src/github.com/ory/hydra
steps:
- checkout
- run:
command: |
echo 'export DOCKER_FULL_TAG=$(echo $CIRCLE_TAG | tr '+' '_')' >> $BASH_ENV
echo 'export DOCKER_SHORT_TAG=$(echo $CIRCLE_TAG | cut -d '+' -f1)' >> $BASH_ENV
./.circleci/release_name.bash
source $BASH_ENV
- setup_remote_docker
- run: docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
- run: curl -sL https://git.io/goreleaser | bash

workflows:
bdt:
jobs:
Expand Down Expand Up @@ -392,17 +369,18 @@ workflows:
- benchmark:
# Avoids race conditions when pushing
requires:
- release
- goreleaser/release
- sdk/release
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- release:
- changelog/generate:
requires:
- test
- format
- sdk/generate
- test-e2e-memory
- test-e2e-postgres
- test-e2e-mysql
Expand All @@ -412,38 +390,42 @@ workflows:
tags:
only: /.*/
branches:
ignore: /.*/
- changelog/generate:
only: master
- sdk/generate:
appname: Ory_Hydra
requires:
- test
- format
- sdk/generate
- test-e2e-memory
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- test-e2e-plugin
- sdk/release:
requires:
- test
- format
- sdk/generate
- goreleaser/release
filters:
tags:
only: /.*/
branches:
only: master
- sdk/generate:
appname: Ory_Hydra
ignore: /.*/
- goreleaser/test:
filters:
tags:
only: /.*/
- goreleaser/release:
requires:
- goreleaser/test
- test
- format
- test-e2e-memory
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- test-e2e-plugin
- sdk/release:
requires:
- test
- format
- sdk/generate
- release
filters:
tags:
only: /.*/
Expand Down
13 changes: 0 additions & 13 deletions .circleci/release_name.bash

This file was deleted.

37 changes: 17 additions & 20 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1903,7 +1903,6 @@
},
"JSONWebKeySet": {
"type": "object",
"title": "JSONWebKeySet represents a JWK Set object.",
"properties": {
"keys": {
"description": "The value of the \"keys\" parameter is an array of JWK values. By\ndefault, the order of the JWK values within the array does not imply\nan order of preference among them, although applications of JWK Sets\ncan choose to assign a meaning to the order for their purposes, if\ndesired.",
Expand All @@ -1915,7 +1914,7 @@
}
},
"PreviousConsentSession": {
"description": "PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json",
"description": "PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession PreviousConsentSession The response used to return used consent requests\nsame as HandledLoginRequest, just with consent_request exposed as json",
"type": "object",
"properties": {
"consent_request": {
Expand Down Expand Up @@ -1951,7 +1950,7 @@
},
"acceptConsentRequest": {
"type": "object",
"title": "AcceptConsentRequest AcceptConsentRequest AcceptConsentRequest AcceptConsentRequest AcceptConsentRequest AcceptConsentRequest AcceptConsentRequest The request payload used to accept a consent request.",
"title": "The request payload used to accept a consent request.",
"properties": {
"grant_access_token_audience": {
"description": "GrantedAudience sets the audience the user authorized the client to use. Should be a subset of `requested_access_token_audience`.",
Expand Down Expand Up @@ -1983,7 +1982,7 @@
},
"acceptLoginRequest": {
"type": "object",
"title": "HandledLoginRequest is the request payload used to accept a login request.",
"title": "AcceptLoginRequest HandledLoginRequest is the request payload used to accept a login request.",
"required": [
"subject"
],
Expand Down Expand Up @@ -2030,7 +2029,7 @@
},
"consentRequest": {
"type": "object",
"title": "ConsentRequest Contains information on an ongoing consent request.",
"title": "ConsentRequest ConsentRequest Contains information on an ongoing consent request.",
"properties": {
"acr": {
"description": "ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it\nto express that, for example, a user authenticated using two factor authentication.",
Expand Down Expand Up @@ -2091,7 +2090,7 @@
},
"consentRequestSession": {
"type": "object",
"title": "ConsentRequestSession ConsentRequestSession Used to pass session data to a consent request.",
"title": "ConsentRequestSession ConsentRequestSession ConsentRequestSession Used to pass session data to a consent request.",
"properties": {
"access_token": {
"description": "AccessToken sets session data for the access and refresh token, as well as any future tokens issued by the\nrefresh grant. Keep in mind that this data will be available to anyone performing OAuth 2.0 Challenge Introspection.\nIf only your services can perform OAuth 2.0 Challenge Introspection, this is usually fine. But if third parties\ncan access that endpoint as well, sensitive data from the session might be exposed to them. Use with care!",
Expand All @@ -2110,11 +2109,10 @@
}
},
"flushInactiveOAuth2TokensRequest": {
"description": "FlushInactiveOAuth2TokensRequest FlushInactiveOAuth2TokensRequest flush inactive o auth2 tokens request",
"type": "object",
"properties": {
"notAfter": {
"description": "NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history\nof recently issued tokens for auditing.\nFormat: date-time\nFormat: date-time",
"description": "NotAfter sets after which point tokens should not be flushed. This is useful when you want to keep a history\nof recently issued tokens for auditing.",
"type": "string",
"format": "date-time"
}
Expand Down Expand Up @@ -2152,7 +2150,6 @@
}
},
"healthNotReadyStatus": {
"description": "HealthNotReadyStatus HealthNotReadyStatus HealthNotReadyStatus health not ready status",
"type": "object",
"properties": {
"errors": {
Expand All @@ -2165,7 +2162,6 @@
}
},
"healthStatus": {
"description": "HealthStatus health status",
"type": "object",
"properties": {
"status": {
Expand All @@ -2175,7 +2171,7 @@
}
},
"jsonWebKeySetGeneratorRequest": {
"description": "JSONWebKeySetGeneratorRequest json web key set generator request",
"description": "JSONWebKeySetGeneratorRequest JSONWebKeySetGeneratorRequest json web key set generator request",
"type": "object",
"required": [
"alg",
Expand All @@ -2199,7 +2195,7 @@
},
"loginRequest": {
"type": "object",
"title": "LoginRequest LoginRequest LoginRequest LoginRequest LoginRequest Contains information on an ongoing login request.",
"title": "LoginRequest LoginRequest LoginRequest LoginRequest LoginRequest LoginRequest Contains information on an ongoing login request.",
"properties": {
"challenge": {
"description": "Challenge is the identifier (\"login challenge\") of the login request. It is used to\nidentify the session.",
Expand Down Expand Up @@ -2245,7 +2241,7 @@
},
"logoutRequest": {
"type": "object",
"title": "Contains information about an ongoing logout request.",
"title": "LogoutRequest Contains information about an ongoing logout request.",
"properties": {
"request_url": {
"description": "RequestURL is the original Logout URL requested.",
Expand Down Expand Up @@ -2532,7 +2528,7 @@
},
"openIDConnectContext": {
"type": "object",
"title": "Contains optional information about the OpenID Connect request.",
"title": "OpenIDConnectContext Contains optional information about the OpenID Connect request.",
"properties": {
"acr_values": {
"description": "ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request.\nIt is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required.\n\nOpenID Connect defines it as follows:\n\u003e Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values\nthat the Authorization Server is being requested to use for processing this Authentication Request, with the\nvalues appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication\nperformed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a\nVoluntary Claim by this parameter.",
Expand Down Expand Up @@ -2593,7 +2589,7 @@
}
},
"userinfoResponse": {
"description": "UserinfoResponse The userinfo response",
"description": "The userinfo response",
"type": "object",
"properties": {
"birthdate": {
Expand Down Expand Up @@ -2676,6 +2672,7 @@
}
},
"version": {
"description": "Version version",
"type": "object",
"properties": {
"version": {
Expand All @@ -2687,15 +2684,15 @@
"wellKnown": {
"description": "It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms\namong others.",
"type": "object",
"title": "WellKnown WellKnown represents important OpenID Connect discovery metadata",
"title": "WellKnown represents important OpenID Connect discovery metadata",
"required": [
"issuer",
"authorization_endpoint",
"token_endpoint",
"id_token_signing_alg_values_supported",
"issuer",
"jwks_uri",
"subject_types_supported",
"response_types_supported",
"id_token_signing_alg_values_supported"
"subject_types_supported",
"token_endpoint"
],
"properties": {
"authorization_endpoint": {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ require (
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.6.2
github.com/ory/sdk/swagutil v0.0.0-20200108122515-375eeddba1e8
github.com/ory/sdk/swagutil v0.0.0-20200113182044-f6518ab8017d
github.com/ory/viper v1.5.6
github.com/ory/x v0.0.88
github.com/pborman/uuid v1.2.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,8 @@ github.com/ory/sdk/swagutil v0.0.0-20200108105435-05ff711a8efb h1:RBptWdx27DdGJf
github.com/ory/sdk/swagutil v0.0.0-20200108105435-05ff711a8efb/go.mod h1:Ufg1eAyz+Zt3+oweSZVThG13ewewWCKwBmoNmK8Z0co=
github.com/ory/sdk/swagutil v0.0.0-20200108122515-375eeddba1e8 h1:HgdLBUUFatzSA2EVV2zyBbSYZW8+ccyYnriIGmWR+CE=
github.com/ory/sdk/swagutil v0.0.0-20200108122515-375eeddba1e8/go.mod h1:Ufg1eAyz+Zt3+oweSZVThG13ewewWCKwBmoNmK8Z0co=
github.com/ory/sdk/swagutil v0.0.0-20200113182044-f6518ab8017d h1:AVIzsXij0v8DoVLAZw9Yo7RXVhM0H53ql3DosRkH5rg=
github.com/ory/sdk/swagutil v0.0.0-20200113182044-f6518ab8017d/go.mod h1:Ufg1eAyz+Zt3+oweSZVThG13ewewWCKwBmoNmK8Z0co=
github.com/ory/viper v1.5.6 h1:w4ceGgWwWLzAFYQ7bHaDZmwNsAto2JPVdyQjQnn7VWI=
github.com/ory/viper v1.5.6/go.mod h1:TYmpFpKLxjQwvT4f0QPpkOn4sDXU1kDgAwJpgLYiQ28=
github.com/ory/x v0.0.88 h1:epgeKh5kaT/89YQ9o/eIO3rgwmo3kOwyXcHJRZcZogI=
Expand Down
2 changes: 1 addition & 1 deletion internal/httpclient/models/accept_consent_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/accept_login_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/consent_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/consent_request_session.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/health_not_ready_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/health_status.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/httpclient/models/json_web_key_set.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ad50ab

Please sign in to comment.