-
Notifications
You must be signed in to change notification settings - Fork 10
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
1 parent
200ce46
commit 5fa333b
Showing
5 changed files
with
80 additions
and
142 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 |
---|---|---|
@@ -1,144 +1,36 @@ | ||
version: 2 | ||
|
||
# Keep this at the top to reduce noise in chatrooms when we mess up circleci setup | ||
experimental: | ||
notify: | ||
branches: | ||
only: | ||
- master | ||
|
||
# This CircleCI configuration was generated by Releaser for a specific release. It is not to be used | ||
# for regular CI builds. Be aware that rerunning this build may cause it to repeat release actions | ||
# such as publishing to a package manager. However, it will not perform any Git actions other than | ||
# reading the repository. | ||
version: 2.1 | ||
workflows: | ||
test: | ||
jobs: | ||
- release_linux | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:10-browsers # -browsers image has java but is otherwise relatively small | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Swagger Codegen | ||
command: | | ||
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.8/swagger-codegen-cli-2.4.8.jar -O swagger-codegen-cli.jar | ||
printf '#!/bin/bash\nexec java -jar /usr/local/bin/swagger-codegen-cli.jar "$@"\n' > ./swagger-codegen | ||
sudo mv ./swagger-codegen /usr/local/bin | ||
sudo mv ./swagger-codegen-cli.jar /usr/local/bin | ||
sudo chmod +x /usr/local/bin/swagger-codegen | ||
- run: | ||
name: Install pip | ||
command: sudo apt install python-pip | ||
|
||
- run: | ||
name: Loading previous client repos | ||
command: | | ||
export REPO_USER_URL=https://github.com/$CIRCLE_PROJECT_USERNAME | ||
make load_prior_targets | ||
- run: | ||
name: Generating code | ||
command: | | ||
export REPO_USER_URL=https://github.com/$CIRCLE_PROJECT_USERNAME | ||
make all | ||
- run: | ||
name: Archiving targets | ||
command: | | ||
cd targets | ||
VERSION=$(cat openapi.json | jq -r '.info.version') | ||
tar cvfz api-clients-${VERSION}-${CIRCLE_SHA1:0:7}.tgz api-client-* | ||
mkdir /tmp/api-clients | ||
cp api-clients-*.tgz /tmp/api-clients | ||
- persist_to_workspace: | ||
root: targets | ||
paths: | ||
- . | ||
|
||
- store_artifacts: | ||
path: targets/html2 | ||
destination: html | ||
|
||
- store_artifacts: | ||
path: targets/html | ||
destination: html-plain | ||
|
||
- store_artifacts: | ||
path: /tmp/api-clients | ||
|
||
test-go: | ||
docker: | ||
- image: circleci/golang | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: targets | ||
- run: | | ||
mkdir -p /go/src/github.com/launchdarkly | ||
cp -r targets/api-client-go /go/src/github.com/launchdarkly/ | ||
- run: | | ||
cd samples/go | ||
make | ||
test-javascript: | ||
release_linux: | ||
docker: | ||
- image: circleci/node | ||
- image: circleci/openjdk:10-node-browsers | ||
environment: | ||
LD_RELEASE_CIRCLECI_TYPE: linux | ||
GRADLE_USER_HOME: "/home/circleci" | ||
LD_RELEASE_BRANCH: "master" | ||
LD_RELEASE_CIRCLECI_BRANCH: "" | ||
LD_RELEASE_DOCS_GITHUB_PAGES: "1" | ||
LD_RELEASE_DOCS_TITLE: "" | ||
LD_RELEASE_PROJECT: "ld-openapi" | ||
LD_RELEASE_PROJECT_TEMPLATE: "" | ||
LD_RELEASE_VERSION: "2.0.28" | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: targets | ||
- run: | | ||
cd samples/javascript | ||
sudo npm link ../../targets/api-client-javascript | ||
node index.js | ||
test-python: | ||
docker: | ||
- image: circleci/python:3.7 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: targets | ||
- run: | | ||
cd samples/python | ||
sudo pip install -e ../../targets/api-client-python | ||
python main.py | ||
test-ruby: | ||
docker: | ||
- image: circleci/ruby | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: targets | ||
- run: | ||
name: Install Gem | ||
command: | | ||
cd targets/api-client-ruby | ||
gem build launchdarkly_api.gemspec | ||
gem install ./launchdarkly_api*.gem | ||
- run: | | ||
cd samples/ruby | ||
ruby main.rb | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- build: | ||
filters: | ||
branches: | ||
ignore: | ||
- gh-pages | ||
tags: | ||
only: | ||
/.*/ # Required in order to run publish job for a tag push | ||
- test-go: | ||
requires: | ||
- build | ||
- test-javascript: | ||
requires: | ||
- build | ||
- test-python: | ||
requires: | ||
- build | ||
- test-ruby: | ||
requires: | ||
- build | ||
- checkout | ||
- run: | ||
name: "Releaser: prepare" | ||
command: .ldrelease/circleci/mac/execute.sh prepare .ldrelease/prepare.sh | ||
- run: | ||
name: "Releaser: build" | ||
command: .ldrelease/circleci/mac/execute.sh build .ldrelease/build.sh | ||
- run: | ||
name: "Releaser: publish" | ||
command: .ldrelease/circleci/mac/execute.sh publish .ldrelease/publish.sh | ||
- store_artifacts: | ||
path: artifacts |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -ue | ||
|
||
# Performs a delegated release step in a CircleCI Linux container. This mechanism is described | ||
# in scripts/circleci/README.md. All of the necessary environment variables should already be | ||
# in the generated CircleCI configuration. | ||
|
||
mkdir -p artifacts | ||
|
||
STEP="$1" | ||
SCRIPT="$2" | ||
echo | ||
echo "[${STEP}] executing ${SCRIPT}" | ||
"./${SCRIPT}" |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
set -ue | ||
|
||
# Performs a delegated release step in a CircleCI Mac container. This mechanism is described | ||
# in scripts/circleci/README.md. All of the necessary environment variables should already be | ||
# in the generated CircleCI configuration. | ||
|
||
mkdir -p artifacts | ||
|
||
STEP="$1" | ||
SCRIPT="$2" | ||
echo | ||
echo "[${STEP}] executing ${SCRIPT}" | ||
"./${SCRIPT}" |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
param( | ||
[string]$step, | ||
[string]$script | ||
) | ||
|
||
# Performs a delegated release step in a CircleCI Windows container using PowerShell. This | ||
# mechanism is described in scripts/circleci/README.md. All of the necessary environment | ||
# variables should already be in the generated CircleCI configuration. | ||
|
||
$ErrorActionPreference = "Stop" | ||
|
||
New-Item -Path "./artifacts" -ItemType "directory" -Force | Out-Null | ||
|
||
Write-Host | ||
Write-Host "[$step] executing $script" | ||
& "./$script" |
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