-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from wunderio/feature/cicd-php82-node16
Added circleci-php8.2-node16-composer2 image
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 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,72 @@ | ||
FROM cimg/php:8.2.22 | ||
|
||
# Make composer packages executable. | ||
ENV PATH="/home/circleci/.composer/vendor/bin:${PATH}" | ||
|
||
# Upgrade packages | ||
RUN sudo apt update && sudo apt upgrade && sudo apt clean | ||
|
||
# Install drush | ||
ENV DRUSH_LAUNCHER_VERSION 0.9.1 | ||
RUN sudo wget -q https://github.com/drush-ops/drush-launcher/releases/download/${DRUSH_LAUNCHER_VERSION}/drush.phar -O /usr/local/bin/drush \ | ||
&& sudo chmod +x /usr/local/bin/drush | ||
|
||
# Install vim based on popular demand. | ||
RUN sudo apt-get update && sudo apt-get install vim && sudo apt-get clean | ||
|
||
# Add gcloud CLI and kubectl | ||
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \ | ||
&& sudo apt-get install apt-transport-https ca-certificates \ | ||
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \ | ||
&& sudo apt-get update && sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin kubectl \ | ||
&& sudo apt-get clean | ||
|
||
# Install AWS cli and aws-iam-authenticator, git, python | ||
RUN sudo apt install -y git python3 \ | ||
&& sudo apt-get install -y unzip curl \ | ||
&& sudo apt-get clean \ | ||
&& sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ | ||
&& sudo unzip awscliv2.zip \ | ||
&& sudo ./aws/install \ | ||
&& sudo rm -rf awscliv2.zip \ | ||
&& sudo rm -rf ./aws | ||
|
||
# Install Helm 3 | ||
ENV HELM_VERSION v3.14.0 | ||
ENV FILENAME helm-${HELM_VERSION}-linux-amd64.tar.gz | ||
ENV HELM_URL https://get.helm.sh/${FILENAME} | ||
|
||
RUN curl -o /tmp/$FILENAME ${HELM_URL} \ | ||
&& tar -zxvf /tmp/${FILENAME} -C /tmp \ | ||
&& rm /tmp/${FILENAME} \ | ||
&& sudo mv /tmp/linux-amd64/helm /bin/helm \ | ||
&& helm repo add bitnami https://charts.bitnami.com/bitnami \ | ||
# && helm repo add minio https://helm.min.io/ \ | ||
&& helm repo add wunderio https://storage.googleapis.com/charts.wdr.io \ | ||
&& helm repo add percona https://percona.github.io/percona-helm-charts/ \ | ||
&& helm plugin install https://github.com/quintush/helm-unittest --version 0.2.4 | ||
|
||
# NOTE: quintush/helm-unittest v0.2.0 release breaks helm tests. | ||
|
||
# TODO: when https://github.com/lrills/helm-unittest/issues/87 is merged, | ||
# switch back to using https://github.com/lrills/helm-unittest as the source | ||
|
||
# Install Node.js and Yarn. | ||
# The following code is based on the CircleCI Node.js Dockerfile template: | ||
# https://github.com/CircleCI-Public/cimg-shared/blob/main/variants/node.Dockerfile.template | ||
ENV NODE_VERSION 16.15.1 | ||
RUN echo "Installing Node.js version ${NODE_VERSION}" | ||
RUN curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" && \ | ||
sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ | ||
rm node.tar.xz && \ | ||
sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs | ||
|
||
ENV YARN_VERSION 1.22.22 | ||
RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ | ||
sudo tar -xzf yarn.tar.gz -C /opt/ && \ | ||
rm yarn.tar.gz && \ | ||
sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ | ||
sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg | ||
|
||
# Add custom php config and lift memory limit. | ||
COPY conf/php/memory.ini /usr/local/etc/php/conf.d/memory.ini |
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 @@ | ||
# silta-circleci | ||
A docker image used circleCI, based on `cimg/php:8.2.22` with the following additions: | ||
|
||
- Composer configured correctly | ||
- Drush-launcher and coder pre-installed | ||
- Vim, useful for debugging | ||
- kubernetes and helm | ||
- Node.js | ||
- Yarn | ||
|
||
## Versions | ||
- PHP: 8.2.22 | ||
- Composer: 2.7.7 | ||
- Node: 16.15.1 | ||
- Yarn: 1.22.22 | ||
- Helm: v3.14.0 |
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,3 @@ | ||
circleci-php8.2-node16-composer2-v1 | ||
circleci-php8.2-node16-composer2-v1.0 | ||
circleci-php8.2-node16-composer2-v1.0.0 |
1 change: 1 addition & 0 deletions
1
silta-cicd/circleci-php8.2-node16-composer2/conf/php/memory.ini
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 @@ | ||
memory_limit = -1 |