-
Notifications
You must be signed in to change notification settings - Fork 10
feat: migrate to Ruby 3.3 w/ GitHub Actions automation #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iBotPeaches
wants to merge
3
commits into
fastlane:master
Choose a base branch
from
iBotPeaches:ruby-3.3-actions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,8 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| time: "03:00" | ||
| timezone: "America/New_York" |
This file contains hidden or 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,43 @@ | ||
| name: deploy | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - '**' | ||
| env: | ||
| IMAGE_NAME: fastlanetools/ci | ||
|
|
||
| jobs: | ||
| docker: | ||
| runs-on: ubuntu-latest | ||
| environment: deploy | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Login to Docker Hub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
| password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Extract metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ${{ env.IMAGE_NAME }} | ||
| tags: | | ||
| type=ref,event=tag | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
|
|
||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| sbom: true | ||
| push: true | ||
| provenance: mode=max | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} |
This file contains hidden or 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,34 @@ | ||
| name: test | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| tags-ignore: | ||
| - '**' | ||
|
|
||
| jobs: | ||
| docker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: build | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| load: true | ||
| tags: fastlaneci:latest | ||
|
|
||
| - name: Test installed tools | ||
| run: | | ||
| set -e | ||
| docker run --rm fastlaneci:latest java -version | ||
| docker run --rm fastlaneci:latest python3 --version | ||
| docker run --rm fastlaneci:latest ruby --version | ||
| docker run --rm fastlaneci:latest node --version | ||
| docker run --rm fastlaneci:latest xar --version | ||
| docker run --rm fastlaneci:latest pip --version | ||
| docker run --rm fastlaneci:latest pipenv --version | ||
| docker run --rm fastlaneci:latest uv --version |
This file contains hidden or 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 @@ | ||
| .idea |
This file contains hidden or 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,66 +1,65 @@ | ||
| FROM circleci/ruby:2.7-node | ||
| FROM cimg/ruby:3.3-node | ||
|
|
||
| ENV XAR_VERSION "2.0.0" | ||
| ENV XAR_VERSION="2.0.0" | ||
| USER root | ||
|
|
||
| # iTMSTransporter needs java installed | ||
| # We also have to install make to install xar | ||
| # And finally shellcheck | ||
| RUN echo 'deb http://archive.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/jessie-backports.list \ | ||
| && sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list \ | ||
| && apt-get -o Acquire::Check-Valid-Until=false update \ | ||
| && apt-get install --yes \ | ||
| make \ | ||
| shellcheck \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN apt-get install --yes libssl-dev | ||
| # Install dependencies for building Python and xar | ||
| # gcc/make/libssl-dev/zlib1g-dev are needed to build xar/python | ||
| # openjdk-21-jdk is needed for iTMSTransporter | ||
| # shellcheck for linting shell scripts | ||
| RUN apt-get update && apt-get install --yes \ | ||
| gcc \ | ||
| make \ | ||
| shellcheck \ | ||
| libssl-dev \ | ||
| zlib1g-dev \ | ||
| openjdk-21-jdk \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| WORKDIR /tmp | ||
|
|
||
| RUN ls | ||
|
|
||
| # Build xar | ||
| # Original download location https://github.com/downloads/mackyle/xar/xar-$XAR_VERSION.tar.gz | ||
| # Original: https://github.com/downloads/mackyle/xar/xar-$XAR_VERSION.tar.gz | ||
| # Now using a fastlane fork that supports OpenSSL 1.1.0 | ||
| ADD https://github.com/fastlane/xar/archive/$XAR_VERSION.tar.gz . | ||
| RUN tar -xzf $XAR_VERSION.tar.gz \ | ||
| && mv xar-$XAR_VERSION/xar xar \ | ||
| && cd xar \ | ||
| && ./autogen.sh --noconfigure \ | ||
| && ./configure \ | ||
| && make | ||
|
|
||
| ENV PATH $PATH:/usr/local/itms/bin | ||
|
|
||
| # Java versions to be installed | ||
| ENV JAVA_VERSION 8u131 | ||
| ENV JAVA_DEBIAN_VERSION 8u131-b11-1~bpo8+1 | ||
| ENV CA_CERTIFICATES_JAVA_VERSION 20161107~bpo8+1 | ||
| && make | ||
|
|
||
| # Needed for fastlane to work | ||
| ENV LANG C.UTF-8 | ||
| ENV LC_ALL C.UTF-8 | ||
| ENV LANG=C.UTF-8 | ||
| ENV LC_ALL=C.UTF-8 | ||
|
|
||
| # Required for iTMSTransporter to find Java | ||
| ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre | ||
| ENV PATH=$PATH:/usr/local/itms/bin | ||
| ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64/jre | ||
|
|
||
| # Install Python | ||
| ARG BUILDDIR="/tmp/build" | ||
| ARG PYTHON_VER="3.6.8" | ||
| ARG PYTHON_VER="3.8.13" | ||
| WORKDIR ${BUILDDIR} | ||
|
|
||
| RUN apt-get update -o Acquire::Check-Valid-Until=false -qq && \ | ||
| apt-get -o Acquire::Check-Valid-Until=false upgrade -y > /dev/null 2>&1 && \ | ||
| apt-get install wget gcc make zlib1g-dev -y -qq > /dev/null 2>&1 && \ | ||
| wget --quiet https://www.python.org/ftp/python/${PYTHON_VER}/Python-${PYTHON_VER}.tgz > /dev/null 2>&1 && \ | ||
| RUN wget --quiet https://www.python.org/ftp/python/${PYTHON_VER}/Python-${PYTHON_VER}.tgz > /dev/null 2>&1 && \ | ||
| tar zxf Python-${PYTHON_VER}.tgz && \ | ||
| cd Python-${PYTHON_VER} && \ | ||
| ./configure > /dev/null 2>&1 && \ | ||
| make > /dev/null 2>&1 && \ | ||
| make install > /dev/null 2>&1 && \ | ||
| rm -rf ${BUILDDIR} | ||
| rm -rf ${BUILDDIR} | ||
|
|
||
| # Install uv | ||
| COPY --from=ghcr.io/astral-sh/uv:0.6.6 /uv /bin/uv | ||
| ENV UV_PYTHON_INSTALL_DIR=/opt/uv/python | ||
|
|
||
| # Install pip & pipenv | ||
| RUN wget --quiet https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py > /dev/null 2>&1 && \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't uv supposed to replace pip?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I figured I needed both in meantime to do a few "hops" among fastlane/docs so everything didn't go at once. |
||
| python /tmp/get-pip.py && \ | ||
| rm /tmp/get-pip.py && \ | ||
| pip install pipenv | ||
|
|
||
| USER circleci | ||
|
|
||
|
|
||
This file contains hidden or 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,17 +1,19 @@ | ||
| # fastlane-docker | ||
| _A `Dockerfile` that is used on _fastlane_'s CIs for testing _fastlane_ on a Linux system with all dependencies._ | ||
|
|
||
| A `Dockerfile` that is used on _fastlane_'s CIs which is configured for Ruby 2.7, Python 3.6.8, and Java 8. | ||
| ### Tools included | ||
|
|
||
| This is built to be used on a CI (primarly CircleCI) when needing to either test _fastlane_ on a Linux CI or test and deploy _fastlane_ docs using Linux. Using this `Dockerfile` is the most effecient way of using the required Ruby, Python, and Java versions for each build and keeping it consistent. | ||
| - Ruby 3.3 | ||
| - Python 3.8.13 | ||
| - Java 21 | ||
| - NodeJS 20 | ||
| - Xar (for .pkg creation) | ||
|
|
||
| ## Places being used | ||
|
|
||
| - [fastlane/docs](https://github.com/fastlane/docs/blob/master/.circleci/config.yml) | ||
| - [fastlane/fastlane](https://github.com/fastlane/fastlane/blob/master/.circleci/config.yml) | ||
|
|
||
| ## Publishing a new version | ||
| ## Publishing | ||
|
|
||
| ``` | ||
| docker build -t fastlanetools/ci:x.y.z ./ | ||
| docker push fastlanetools/ci:x.y.z | ||
| ``` | ||
| - Push a tag with the version you want to publish (`x.y.z`). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.