Skip to content

Commit

Permalink
Merge branch 'master' into add-swift-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
sashatalalasha committed Mar 13, 2024
2 parents 97d0ccb + dcf8f16 commit ce6e593
Show file tree
Hide file tree
Showing 6,961 changed files with 166,747 additions and 40,584 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:
publish:
docker:
- image: oryd/sdk:v0.0.51
- image: oryd/sdk:v0.0.52
working_directory: /sdk
steps:
- checkout
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and test docker image
on:
pull_request:
paths:
- Dockerfile
- .github/workflows/docker-ci.yaml
- scripts/build/**
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_docker_image:
name: Build docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- run: sudo chown runner:docker /var/run/docker.sock
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build docker image
uses: docker/build-push-action@v5
with:
tags: oryd/sdk:${{ github.sha }}
push: false
outputs: type=docker,dest=./sdk.tar
- name: run generate.sh and test.sh
run: |
docker load --input ./sdk.tar
rm ./sdk.tar
docker run --mount type=bind,source="$(pwd)",target=/project -e FORCE_PROJECT=client -e FORCE_VERSION=$(cat ./spec/client/latest) -i oryd/sdk:${{ github.sha }} /bin/sh -c "cd /project && ./scripts/generate.sh && ./scripts/test.sh"
29 changes: 8 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM openjdk:15-buster
# can't use bookworm (latest LTS as of June23) yet, as elixir/erlang does not provide packages for it yet. Check if https://binaries.erlang-solutions.com/debian/dists/bookworm/ is available to change this
FROM openjdk:21-bullseye

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates ssh bash

RUN apt-get -y install libncurses5 clang libcurl4 libpython2.7 libpython2.7-dev

RUN apt-get -y install libxml2
COPY scripts/build ./scripts

ENV GOLANG_VERSION 1.17

Expand Down Expand Up @@ -54,10 +53,10 @@ ENV GO111MODULE=on

RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

RUN curl -sL https://deb.nodesource.com/setup_15.x | bash - && apt-get install -y nodejs
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y nodejs
# the following is a workaround for openjdk-11-jre-headless erroring due to not having a man path in slim-debian
RUN apt-get update -y
RUN apt-get install -y --no-install-recommends python3 python3-dev python3-pip ruby jq gnupg git gettext libffi6 libffi-dev libssl-dev php composer php-curl php7.3-tokenizer php-dom php-xml php-simplexml php-xmlwriter maven pkg-config
RUN apt-get install -y --no-install-recommends python3 python3-dev python3-pip ruby jq gnupg git gettext libffi-dev libssl-dev php composer php-curl php-dom php-xml php-simplexml php-xmlwriter maven pkg-config twine
# RUN apk add -U --no-cache ca-certificates bash nodejs npm python3 python3-dev py-pip ruby jq build-base gnupg git openssh curl gettext libffi libffi-dev openssl-dev php composer php-curl php7-tokenizer wget php-dom php-xml php-simplexml php-xmlwriter maven

# https://stackoverflow.com/questions/35736598/cannot-pip-install-cryptography-in-docker-alpine-linux-3-3-with-openssl-1-0-2g
Expand All @@ -76,8 +75,6 @@ RUN apt-get install -y --no-install-recommends python3 python3-dev python3-pip r
RUN npm install -g [email protected]
RUN npm i -g @openapitools/openapi-generator-cli
RUN openapi-generator-cli version-manager set 5.2.1
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --user --upgrade setuptools wheel twine

# dotnet
ENV PATH "$PATH:/root/.dotnet"
Expand All @@ -92,19 +89,10 @@ RUN apt-get install -y --no-install-recommends \
&& rm dotnet-install.sh

# dart
RUN \
apt-get -q update && apt-get install --no-install-recommends -y -q gnupg2 curl git ca-certificates apt-transport-https openssh-client && \
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
apt-get update && \
apt-get install dart=2.19.6-1
RUN ./scripts/install-dart.sh

# elixir
RUN \
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \
dpkg -i erlang-solutions_2.0_all.deb && \
apt-get -q update && apt-get install --no-install-recommends -y -q esl-erlang elixir && \
rm erlang-solutions_2.0_all.deb && \
RUN apt-get -q update && apt-get install -y -q elixir && \
mix local.hex --force

# rust
Expand All @@ -128,7 +116,7 @@ RUN td=$(mktemp) \

RUN gem install bundler -v 2.3.26 && \
apt-get update && \
apt-get install -y --no-install-recommends ruby-dev
apt-get install -y --no-install-recommends ruby-dev=1:2.7+2

# swift
RUN \
Expand Down Expand Up @@ -169,4 +157,3 @@ RUN go build -o /usr/local/bin/ory github.com/ory/cli
RUN swagger version
RUN ory version

ENTRYPOINT /bin/bash
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
# Generated SDKs for the ORY Ecosystem
# Generated SDKs for the Ory Ecosystem

All SDKs provided in this repository are generated using openapi-generator.

## Ory Network SDKs

When developing against [Ory Network](https://www.ory.sh/docs/sdk), use the
latest `client` or `ory-client` SDK for your preferred language. It bundles the
individual SDKs (Identities, OAuth2, Permissions) and works with [Ory API
keys](https://www.ory.sh/docs/concepts/personal-access-token).

## Ory self-hosted SDKs

When developing against self-hosted Ory components (Kratos, Hydra, Keto), use
the corresponding individual SDKs for your language and match the SDK version to
the version of Kratos/Hydra/Keto you have deployed.

## Publish the Docker Image

To publish the SDK Builder Docker Image, create a new GitHub release with the
Expand All @@ -25,13 +38,13 @@ docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/proj

### Debugging Failing Tests on CI

If a tests fails on CI, you may run the following code snippet to reproduce the failure locally:
If a test fails in CI, you may run the following code snippet to reproduce the failure locally:

```shell script
docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/project --name sdk -it oryd/sdk:v0.0.51 /bin/sh
docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/project --name sdk -it oryd/sdk:v0.0.51 /bin/bash

export FORCE_VERSION=v1.2.17
export FORCE_PROJECT=client # or hydra or something else
export FORCE_VERSION=$(cat /project/spec/$FORCE_PROJECT/latest) # or a specific version, e.g. v1.2.17
cd /project

./scripts/generate.sh
Expand Down
Loading

0 comments on commit ce6e593

Please sign in to comment.