-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
a9b94df
commit aeb67b5
Showing
4 changed files
with
75 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and test docker image | ||
on: | ||
pull_request: | ||
paths: | ||
- Dockerfile | ||
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@v2 | ||
- 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: upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: oryd-sdk-${{ github.sha }} | ||
path: ./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" |
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,7 +1,10 @@ | ||
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 | ||
|
||
COPY scripts/build ./scripts | ||
|
||
ENV GOLANG_VERSION 1.17 | ||
|
||
RUN set -eux; \ | ||
|
@@ -50,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 | ||
|
@@ -72,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" | ||
|
@@ -88,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 | ||
|
@@ -124,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 | ||
|
||
ADD go.mod go.mod | ||
ADD go.sum go.sum | ||
|
@@ -133,4 +125,3 @@ RUN go build -o /usr/local/bin/ory github.com/ory/cli | |
RUN swagger version | ||
RUN ory version | ||
|
||
ENTRYPOINT /bin/bash |
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 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,27 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Check the platform architecture | ||
if [[ $(uname -m) == "x86_64" ]]; then | ||
# Download the x64 Dart SDK | ||
curl -L https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.0/sdk/dartsdk-linux-x64-release.zip -o dart-sdk.zip | ||
# Add your installation steps here | ||
else | ||
# Download the ARM Dart SDK | ||
curl -L https://storage.googleapis.com/dart-archive/channels/stable/release/3.3.0/sdk/dartsdk-linux-arm64-release.zip -o dart-sdk.zip | ||
# Add your installation steps here | ||
fi | ||
|
||
# Unzip the downloaded file | ||
unzip dart-sdk.zip | ||
|
||
# Remove the downloaded file | ||
rm dart-sdk.zip | ||
|
||
mkdir -p /usr/lib/dart | ||
# Move the Dart SDK to the /usr/lib/dart directory | ||
mv -v dart-sdk/* /usr/lib/dart | ||
|
||
# Add the Dart SDK to the PATH | ||
echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.bashrc |