-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
58 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,36 +67,52 @@ jobs: | |
- run: docker build -f Dockerfile-alpine -t hydra-test-alpine . | ||
- run: docker run hydra-test help | ||
|
||
release: | ||
release-docker: | ||
docker: | ||
- image: circleci/golang:1.10 | ||
working_directory: /go/src/github.com/ory/hydra | ||
steps: | ||
- checkout | ||
- setup_remote_docker: | ||
version: 17.10.0-ce | ||
# Environment dependencies | ||
- run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
- run: go get -u github.com/mitchellh/gox github.com/tcnksm/ghr | ||
- run: dep ensure -vendor-only | ||
- run: curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | ||
- run: sudo apt-get install -y nodejs | ||
# Build binaries for GitHub | ||
- run: ./scripts/run-deploy.sh | ||
- run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/ | ||
# Build and push docker image | ||
- run: docker build --build-arg git_tag=$(git describe --tags) --build-arg git_commit=$(git rev-parse HEAD) -f Dockerfile -t oryd/hydra:$CIRCLE_TAG . | ||
- run: docker build --build-arg git_tag=$(git describe --tags) --build-arg git_commit=$(git rev-parse HEAD) -f Dockerfile-alpine -t oryd/hydra:$CIRCLE_TAG-alpine . | ||
- run: docker tag oryd/hydra:$CIRCLE_TAG oryd/hydra:latest | ||
- run: docker tag oryd/hydra:$CIRCLE_TAG-alpine oryd/hydra:latest-alpine | ||
- run: docker login --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD" | ||
- run: docker push oryd/hydra:$CIRCLE_TAG | ||
- run: docker push oryd/hydra:$CIRCLE_TAG-alpine | ||
# Release node / JavaScript SDK | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
- run: sudo npm i -g npm | ||
- run: docker push oryd/hydra:latest-alpine | ||
- run: docker push oryd/hydra:latest-alpine | ||
|
||
release-npm: | ||
docker: | ||
- image: circleci/node:8.9.3 | ||
working_directory: ~/hydra | ||
steps: | ||
- checkout | ||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
- run: | | ||
npm version -f --no-git-tag-version $CIRCLE_TAG | ||
- run: npm view ory-hydra-sdk | ||
- run: npm whoami | ||
- run: npm publish | ||
|
||
changelog: | ||
release-binaries: | ||
docker: | ||
- image: circleci/golang:1.10 | ||
working_directory: /go/src/github.com/ory/hydra | ||
steps: | ||
- checkout | ||
- run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | ||
- run: go get -u github.com/mitchellh/gox github.com/tcnksm/ghr | ||
- run: dep ensure -vendor-only | ||
- run: | | ||
gox -parallel=2 -ldflags "-X github.com/ory/hydra/cmd.Version=`git describe --tags` -X github.com/ory/hydra/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/hydra/cmd.GitHash=`git rev-parse HEAD`" -output "dist/{{.Dir}}-{{.OS}}-{{.Arch}}"; | ||
- run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/ | ||
|
||
release-changelog: | ||
docker: | ||
- image: circleci/ruby:2.4-node | ||
steps: | ||
|
@@ -114,7 +130,7 @@ jobs: | |
- run: git remote add origin https://arekkas:[email protected]/ory/hydra.git | ||
- run: git push origin HEAD:master | ||
|
||
publish-docs: | ||
release-docs: | ||
docker: | ||
- image: alpine/git:1.0.4 | ||
working_directory: /go/src/github.com/ory/hydra | ||
|
@@ -138,7 +154,7 @@ workflows: | |
filters: | ||
tags: | ||
only: /.*/ | ||
- publish-docs: | ||
- release-docs: | ||
filters: | ||
branches: | ||
only: master | ||
|
@@ -154,17 +170,35 @@ workflows: | |
filters: | ||
tags: | ||
only: /.*/ | ||
- release: | ||
- release-binaries: | ||
requires: | ||
- build-docker | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: /.*/ | ||
- release-docker: | ||
requires: | ||
- build-docker | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: /.*/ | ||
- release-npm: | ||
requires: | ||
- build-docker | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: /.*/ | ||
- changelog: | ||
- release-changelog: | ||
requires: | ||
- release | ||
- release-docker | ||
- release-npm | ||
- release-binaries | ||
filters: | ||
tags: | ||
only: /.*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,11 @@ pkg/ | |
policy/ | ||
rand/ | ||
scripts/ | ||
sdk/go/ | ||
vendor/ | ||
warden/ | ||
dist/ | ||
sdk/php/ | ||
sdk/go/ | ||
*.yml | ||
*.go | ||
*.md | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.