-
Notifications
You must be signed in to change notification settings - Fork 2
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 #18 from Heliozoa/master
Split main sandbox image to per-language images
- Loading branch information
Showing
39 changed files
with
2,962 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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Deploy csharp | |
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "csharp-v*" | ||
|
||
jobs: | ||
|
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Deploy cyber-security-base | |
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "cyber-security-base-v*" | ||
|
||
jobs: | ||
|
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,45 @@ | ||
name: Deploy Java | ||
|
||
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "java-v*" | ||
|
||
jobs: | ||
build_and_upload: | ||
name: Build and deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Enable Docker IPv6 | ||
run: | | ||
echo '{ "ipv6": true }' | sudo tee -a /etc/docker/daemon.json | ||
sudo systemctl reload docker | ||
- uses: actions/checkout@v1 | ||
- name: Authenticate to Google Cloud | ||
env: | ||
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
run: | | ||
echo Authenticating to Google Cloud | ||
echo $GCLOUD_SERVICE_KEY | python -m base64 -d > /tmp/key.json | ||
gcloud auth activate-service-account --key-file=/tmp/key.json | ||
if gcloud auth configure-docker -q; then | ||
echo "Authenticated to Google Cloud..." | ||
else | ||
echo "Authentication to Google Cloud failed. Exiting..." | ||
exit 1 | ||
fi | ||
- name: Building image | ||
run: | | ||
source ./env | ||
cd java | ||
docker build . -t "eu.gcr.io/moocfi-public/tmc-sandbox-java:$RUST_CLI_VER" --build-arg "RUST_CLI_URL=$RUST_CLI_URL" | ||
cd .. | ||
- name: Pushing image | ||
run: | | ||
source ./env | ||
cd java | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-java:$RUST_CLI_VER" | ||
docker tag "eu.gcr.io/moocfi-public/tmc-sandbox-java:$RUST_CLI_VER" "eu.gcr.io/moocfi-public/tmc-sandbox-java:latest" | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-java:latest" | ||
cd .. |
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,45 @@ | ||
name: Deploy Make | ||
|
||
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "make-v*" | ||
|
||
jobs: | ||
build_and_upload: | ||
name: Build and deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Enable Docker IPv6 | ||
run: | | ||
echo '{ "ipv6": true }' | sudo tee -a /etc/docker/daemon.json | ||
sudo systemctl reload docker | ||
- uses: actions/checkout@v1 | ||
- name: Authenticate to Google Cloud | ||
env: | ||
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
run: | | ||
echo Authenticating to Google Cloud | ||
echo $GCLOUD_SERVICE_KEY | python -m base64 -d > /tmp/key.json | ||
gcloud auth activate-service-account --key-file=/tmp/key.json | ||
if gcloud auth configure-docker -q; then | ||
echo "Authenticated to Google Cloud..." | ||
else | ||
echo "Authentication to Google Cloud failed. Exiting..." | ||
exit 1 | ||
fi | ||
- name: Building image | ||
run: | | ||
source ./env | ||
cd make | ||
docker build . -t "eu.gcr.io/moocfi-public/tmc-sandbox-make:$RUST_CLI_VER" --build-arg "RUST_CLI_URL=$RUST_CLI_URL" | ||
cd .. | ||
- name: Pushing image | ||
run: | | ||
source ./env | ||
cd make | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-make:$RUST_CLI_VER" | ||
docker tag "eu.gcr.io/moocfi-public/tmc-sandbox-make:$RUST_CLI_VER" "eu.gcr.io/moocfi-public/tmc-sandbox-make:latest" | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-make:latest" | ||
cd .. |
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,45 @@ | ||
name: Deploy Python | ||
|
||
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "python-v*" | ||
|
||
jobs: | ||
build_and_upload: | ||
name: Build and deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Enable Docker IPv6 | ||
run: | | ||
echo '{ "ipv6": true }' | sudo tee -a /etc/docker/daemon.json | ||
sudo systemctl reload docker | ||
- uses: actions/checkout@v1 | ||
- name: Authenticate to Google Cloud | ||
env: | ||
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
run: | | ||
echo Authenticating to Google Cloud | ||
echo $GCLOUD_SERVICE_KEY | python -m base64 -d > /tmp/key.json | ||
gcloud auth activate-service-account --key-file=/tmp/key.json | ||
if gcloud auth configure-docker -q; then | ||
echo "Authenticated to Google Cloud..." | ||
else | ||
echo "Authentication to Google Cloud failed. Exiting..." | ||
exit 1 | ||
fi | ||
- name: Building image | ||
run: | | ||
source ./env | ||
cd python | ||
docker build . -t "eu.gcr.io/moocfi-public/tmc-sandbox-python:$RUST_CLI_VER" --build-arg "RUST_CLI_URL=$RUST_CLI_URL" | ||
cd .. | ||
- name: Pushing image | ||
run: | | ||
source ./env | ||
cd python | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-python:$RUST_CLI_VER" | ||
docker tag "eu.gcr.io/moocfi-public/tmc-sandbox-python:$RUST_CLI_VER" "eu.gcr.io/moocfi-public/tmc-sandbox-python:latest" | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-python:latest" | ||
cd .. |
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,45 @@ | ||
name: Deploy R | ||
|
||
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "r-v*" | ||
|
||
jobs: | ||
build_and_upload: | ||
name: Build and deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Enable Docker IPv6 | ||
run: | | ||
echo '{ "ipv6": true }' | sudo tee -a /etc/docker/daemon.json | ||
sudo systemctl reload docker | ||
- uses: actions/checkout@v1 | ||
- name: Authenticate to Google Cloud | ||
env: | ||
GCLOUD_SERVICE_KEY: ${{ secrets.GCLOUD_SERVICE_KEY }} | ||
run: | | ||
echo Authenticating to Google Cloud | ||
echo $GCLOUD_SERVICE_KEY | python -m base64 -d > /tmp/key.json | ||
gcloud auth activate-service-account --key-file=/tmp/key.json | ||
if gcloud auth configure-docker -q; then | ||
echo "Authenticated to Google Cloud..." | ||
else | ||
echo "Authentication to Google Cloud failed. Exiting..." | ||
exit 1 | ||
fi | ||
- name: Building image | ||
run: | | ||
source ./env | ||
cd java | ||
docker build . -t "eu.gcr.io/moocfi-public/tmc-sandbox-r:$RUST_CLI_VER" --build-arg "RUST_CLI_URL=$RUST_CLI_URL" | ||
cd .. | ||
- name: Pushing image | ||
run: | | ||
source ./env | ||
cd java | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-r:$RUST_CLI_VER" | ||
docker tag "eu.gcr.io/moocfi-public/tmc-sandbox-r:$RUST_CLI_VER" "eu.gcr.io/moocfi-public/tmc-sandbox-r:latest" | ||
docker push "eu.gcr.io/moocfi-public/tmc-sandbox-r:latest" | ||
cd .. |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: Deploy tmc-langs-rust | |
on: | ||
push: | ||
tags: | ||
- "all-v*" | ||
- "rust-v*" | ||
|
||
jobs: | ||
|
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,151 @@ | ||
FROM debian:buster | ||
|
||
ARG RUST_CLI_URL | ||
RUN test -n "$RUST_CLI_URL" | ||
|
||
RUN \ | ||
apt update && \ | ||
# common utilities | ||
apt install -y unzip curl build-essential libssl wget locale locale-all \ | ||
apt install -y openjdk-11-jdk maven ant && \ | ||
useradd --create-home user && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US.UTF-8 | ||
|
||
WORKDIR /app | ||
RUN chown user /app | ||
USER user | ||
|
||
COPY maven-templates/maven-template /app/ | ||
|
||
RUN mvn -q clean compile test-compile | ||
RUN mvn -q -U dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.6:test || true | ||
|
||
COPY maven-templates/maven-template-2 /app/ | ||
|
||
RUN mvn -q clean compile test-compile | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.6:test || true | ||
|
||
COPY maven-templates/maven-template-3 /app/ | ||
|
||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.6:test || true | ||
|
||
COPY maven-templates/maven-template-4 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-5 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-6 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-7 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-8 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-9 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-10 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-11 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-12 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-13 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-14 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-15 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-16 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-17 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-18 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-19 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
COPY maven-templates/maven-template-20 /app | ||
RUN mvn -q clean compile test-compile || true | ||
RUN mvn -q dependency:resolve-plugins dependency:go-offline compile dependency:resolve-plugins | ||
RUN mvn -q test || true | ||
RUN mvn -q fi.helsinki.cs.tmc:tmc-maven-plugin:1.12:test || true | ||
|
||
ENV M2_HOME="/usr/share/maven" | ||
|
||
COPY Dockerfile /Dockerfile | ||
|
||
ADD --chown=user ${RUST_CLI_URL} /tmc-langs-cli | ||
RUN chmod +x /tmc-langs-cli && /tmc-langs-cli --version | ||
ADD --chown=user tmc-run /tmc-run |
Oops, something went wrong.