jenkins-controller-eclair: initial commit for repo with jenkins-controller

Import the jenkins-controller-eclair dockerfile as the first dockerfile
of the repo.

Since this is also the first commit of the repo, let's also bootstrap
a README.md and setup a gitignore to ignore the .docker-tag files.

Change-Id: I645516415b9f33d76bcac26f664f32651f05adcc
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..b08be19
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*/.docker-tag
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e9fef4e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+# misra-dockerfiles
+
+This repository contains the dockerfiles used to create the MISRA docker
+images stored in the TrustedFirmware ECR.
+
+Since not all components of the docker images are public, some files are
+stored in a private S3 repository.
+
+Each directory in this repo corresponds to a tagname for the MISRA ECR and
+contains a build.sh for the image.
diff --git a/jenkins-controller-eclair/.env b/jenkins-controller-eclair/.env
new file mode 100644
index 0000000..6c805a4
--- /dev/null
+++ b/jenkins-controller-eclair/.env
@@ -0,0 +1,2 @@
+# Jenkins path on the host
+JENKINS_HOST_PATH=/srv/jenkins
diff --git a/jenkins-controller-eclair/Dockerfile b/jenkins-controller-eclair/Dockerfile
new file mode 100644
index 0000000..5437570
--- /dev/null
+++ b/jenkins-controller-eclair/Dockerfile
@@ -0,0 +1,14 @@
+FROM trustedfirmware/ci-x86_64-jenkins-master-debian:lts
+
+ENV JENKINS_JAVA_PARAMETERS="-server -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/jenkins/heapdump.log -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+ExplicitGCInvokesConcurrent -XX:+UnlockDiagnosticVMOptions -XX:G1SummarizeRSetStatsPeriod=1 -XX:MaxMetaspaceExpansion=64M -Djenkins.model.Jenkins.logStartupPerformance=true"
+ENV JAVA_OPTS="$JENKINS_JAVA_PARAMETERS -Djava.awt.headless=true -Dhudson.slaves.WorkspaceList='_' -Dhudson.model.ParametersAction.keepUndefinedParameters=true -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=30 -Dorg.eclipse.jetty.server.Request.maxFormContentSize=1000000"
+ENV JENKINS_OPTS="--sessionTimeout=1440 --sessionEviction=86400"
+ENV JAVA_MEM=${JAVA_MEM:-8}
+
+USER jenkins
+# Just install jenkins eclair plugins
+COPY mods/*.hpi /var/jenkins_plugins/
+RUN export JAVA_OPTS="-Xmx{$JAVA_MEM}g -Xms${JAVA_MEM}g $JAVA_OPTS"
+
+# Forward ports to host
+EXPOSE 2222
diff --git a/jenkins-controller-eclair/build.sh b/jenkins-controller-eclair/build.sh
new file mode 100755
index 0000000..e7c651b
--- /dev/null
+++ b/jenkins-controller-eclair/build.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+export LANG=C
+
+tag=$(basename $PWD)
+
+[ -z $ECR ] && echo "Error: ECR environment variable not set" && exit 1
+
+image=${ECR}/misra:$tag
+docker build --pull --tag=$image .
+echo $image > .docker-tag
diff --git a/jenkins-controller-eclair/docker-compose.yml b/jenkins-controller-eclair/docker-compose.yml
new file mode 100644
index 0000000..ea6a5d7
--- /dev/null
+++ b/jenkins-controller-eclair/docker-compose.yml
@@ -0,0 +1,26 @@
+version: '3'
+services:
+  jenkins:
+    image: 'misra:jenkins-controller-eclair'
+    container_name: jenkins-controller
+    logging:
+      driver: journald
+    ports:
+      - "2222:2222"
+      - "2233:2233"
+      - "8080:8080"
+      - "50000:50000"
+    volumes:
+      - "${JENKINS_HOST_PATH}:/var/jenkins_home:rw"
+  gerrit:
+    image: 'debian:buster'
+    container_name: gerrit
+    logging:
+      driver: journald
+    ports:
+      - "2222:2222"
+      - "2233:2233"
+      - "8080:8080"
+      - "50000:50000"
+    volumes:
+      - "${JENKINS_HOST_PATH}:/var/jenkins_home:rw"
diff --git a/jenkins-controller-eclair/plugins.txt b/jenkins-controller-eclair/plugins.txt
new file mode 100644
index 0000000..2c1f9e7
--- /dev/null
+++ b/jenkins-controller-eclair/plugins.txt
@@ -0,0 +1,52 @@
+basic-branch-build-strategies:1.3.2
+build-name-setter:2.2.0
+build-timeout:1.21
+blueocean:1.25.5
+copyartifact:1.46.4
+docker-plugin:1.2.9
+docker-slaves:1.0.7
+ec2:1.68
+email-ext:2.88
+envinject:2.866.v5c0403e3d4df
+envinject-api:1.199.v3ce31253ed13
+extended-read-permission:3.2
+flexible-publish:0.16.1
+generic-webhook-trigger:1.84
+gerrit-trigger:2.36.0
+git:4.11.3
+git-parameter:0.9.17
+github-oauth:0.38
+groovy-postbuild:2.5
+jdk-tool:1.5
+jenkins-multijob-plugin:1.36
+jobConfigHistory:1133.v0f5420f85053
+leastload:3.0.0
+lockable-resources:2.15
+matrix-auth:3.1.2
+monitoring:1.91.0
+multiple-scms:0.8
+parameterized-trigger:2.44
+parameterized-scheduler:1.0
+pipeline-github:2.8-138.d766e30bb08b
+pipeline-github-lib:38.v445716ea_edda_
+pipeline-githubnotify-step:49.vf37bf92d2bc8
+pipeline-utility-steps:2.12.2
+prometheus:2.0.11
+postbuildscript:3.1.0-375.v3db_cd92485e1
+rebuild:1.34
+role-strategy:488.v0634ce149b_8c
+script-security:1175.v4b_d517d6db_f0
+ssh-agent:295.v9ca_a_1c7cc3a_a_
+ssh-slaves:1.814.vc82988f54b_10
+slack:608.v19e3b_44b_b_9ff
+timestamper:1.17
+throttle-concurrents:2.8
+windows-slaves:1.8.1
+workflow-aggregator:581.v0c46fa_697ffd
+workflow-api:1164.v760c223ddb_32
+workflow-cps-global-lib-http:2.0.0
+workflow-basic-steps:948.v2c72a_091b_b_68
+workflow-durable-task-step:1144.vd77b_57189936
+ws-cleanup:0.42
+yet-another-docker-plugin:0.2.0
+blueocean-pipeline-api-impl:1.25.5