Skip to content

Commit

Permalink
feat(superchain): add mono toolchain (#687)
Browse files Browse the repository at this point in the history
Makes the `mono` tools available for consumers, including the `signtool`
command that is used for applying AuthentiCode signatures to the .NET
`.dll` artifacts.
  • Loading branch information
RomainMuller authored Aug 8, 2019
1 parent 6f8bdff commit 3defca3
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ branches:
services:
- docker

before_script:
# Attempt to pre-cache the previous version of the image, to speed build up
- docker pull jsii/superchain:nightly || true

script:
- set -eo pipefail
# Building the Docker image
Expand All @@ -20,6 +16,7 @@ script:
- docker run --rm -it --net=host -v ${PWD}:${PWD} -w ${PWD} jsii/superchain:nightly ./build.sh
# Make sure the build did not change the source tree (git diff-index will return non-zero if that's the case)
- git diff-index --exit-code --ignore-space-at-eol --stat HEAD
- untracked=$(git ls-files --others --exclude-standard) && echo "${untracked}" && test -z "${untracked}"
# Publish the image to DockerHub when relevant
- echo "TRAVIS_PULL_REQUEST = ${TRAVIS_PULL_REQUEST:-}"
- echo "TRAVIS_TAG = ${TRAVIS_TAG:-}"
Expand Down
18 changes: 12 additions & 6 deletions superchain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ RUN yum -y upgrade
###

# Install NVM and Node 8+
ENV NVM_DIR=/usr/local/nvm \
NODE_VERSION=8.16.0 \
NPM_VERSION=6.8.0
ARG NODE_VERSION=8.16.0
ARG NPM_VERSION=6.8.0
ENV NVM_DIR=/usr/local/nvm
RUN curl -sSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh -o /tmp/install-nvm.sh \
&& echo "ef7ad1db40c92f348c0461f24983b71ba0ea7d45d4007a36e484270fa7f81fcf /tmp/install-nvm.sh" | sha256sum -c \
&& mkdir -p ${NVM_DIR} \
Expand All @@ -26,11 +26,15 @@ RUN curl -sSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh -o
&& npm set unsafe-perm true
ENV NODE_PATH=${NVM_DIR}/versions/node/v${NODE_VERSION}/lib/node_modules \
PATH=${PATH}:${NVM_DIR}/versions/node/v${NODE_VERSION}/bin
# Install .NET Core
# Install .NET Core & mono
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
&& yum -y install dotnet-sdk-2.2 \
COPY gpg/mono.asc /tmp/mono.asc
RUN rpm --import "https://packages.microsoft.com/keys/microsoft.asc" \
&& rpm -Uvh "https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm" \
&& rpm --import /tmp/mono.asc && rm -f /tmp/mono.asc \
&& curl "https://download.mono-project.com/repo/centos6-stable.repo" | tee /etc/yum.repos.d/mono-centos6-stable.repo \
&& yum -y install dotnet-sdk-2.2 mono-devel \
&& yum clean all && rm -rf /var/cache/yum

# Install Powershell
Expand Down Expand Up @@ -63,6 +67,8 @@ VOLUME /var/lib/docker
# Install some configuration
COPY ssh_config /root/.ssh/config
COPY dockerd-entrypoint.sh /usr/local/bin/
ENV CHARSET=UTF-8 \
LC_ALL=C.UTF-8

## Image Metadata
ARG BUILD_TIMESTAMP
Expand Down
2 changes: 1 addition & 1 deletion superchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ required in order to package [jsii] projects in all supported languages.
SDK | Version
----------------|-------------------------------------------
`OpenJDK 8` | Amazon Corretto `>= 8.222.10.2`
`.NET Core` | `>= 2.2.301`
`.NET Core` | `>= 2.2.301` and `mono >= 6.0.0.319`
`Javascript` | `node >= 8.16.0` with `npm >= 6.8.0`
`PowerShell` | `pwsh >= 6.2.2`
`Python 3` | `python3 >= 3.7.3` with `pip3 >= 19.1.1`
Expand Down
42 changes: 42 additions & 0 deletions superchain/gpg/mono.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-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