Import manual trigger jobs

Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: I69b98aeda82c3620c57be41f6f83ba9e0e8ce7fd
diff --git a/mbedtls-dockerfile-builder.yaml b/mbedtls-dockerfile-builder.yaml
new file mode 100644
index 0000000..c9a38ea
--- /dev/null
+++ b/mbedtls-dockerfile-builder.yaml
@@ -0,0 +1,126 @@
+- job:
+    concurrent: true
+    description: Dockerfile building job.
+    disabled: false
+    dsl: |-
+      timestamps {
+          stage('build-dockerfiles') {
+              node('dockerfile-builder') {
+                  dir('src') {
+                      deleteDir()
+                      checkout([
+                          scm: [
+                              $class: 'GitSCM',
+                              userRemoteConfigs: [
+                                  [url: MBED_TLS_TEST_REPO]
+                              ],
+                              branches: [[name: MBED_TLS_TEST_BRANCH]],
+                              extensions: [
+                                  [$class: 'CloneOption', timeout: 60],
+                                  [$class: 'SubmoduleOption', recursiveSubmodules: true],
+                                  [$class: 'LocalBranch', localBranch: MBED_TLS_TEST_BRANCH],
+                              ],
+                          ]
+                      ])
+                      dir('resources') {
+                          dir('docker_files') {
+                              withCredentials([string(credentialsId: 'DOCKER_AUTH', variable: 'TOKEN')]) {
+                              sh """\
+      mkdir -p ${env.HOME}/.docker
+      cat > ${env.HOME}/.docker/config.json << EOF
+      {
+              "auths": {
+                      "https://index.docker.io/v1/": {
+                              "auth": "\${TOKEN}"
+                      }
+              }
+      }
+      EOF
+      chmod 0600 ${env.HOME}/.docker/config.json
+      """
+                              }
+                              if (BUILD_16_04_DOCKERFILE == "true") {
+                                  dir('ubuntu-16.04') {
+                                      sh """\
+      docker build --build-arg ARMLMD_LICENSE_FILE=27000@flexnet.trustedfirmware.org -t trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_16_04_DOCKERFILE} .
+      docker push trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_16_04_DOCKERFILE}
+      """
+                                  }
+                              }
+                              if (BUILD_18_04_DOCKERFILE == "true") {
+                                  dir('ubuntu-18.04') {
+                                      sh """\
+      docker build --build-arg ARMLMD_LICENSE_FILE=27000@flexnet.trustedfirmware.org -t trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_18_04_DOCKERFILE} .
+      docker push trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_18_04_DOCKERFILE}
+      """
+                                  }
+                              }
+                              if (BUILD_20_04_DOCKERFILE == "true") {
+                                  dir('ubuntu-20.04') {
+                                      sh """\
+      docker build --build-arg ARMLMD_LICENSE_FILE=27000@flexnet.trustedfirmware.org -t trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_20_04_DOCKERFILE} .
+      docker push trustedfirmware/ci-amd64-mbed-tls-ubuntu:${TAG_FOR_20_04_DOCKERFILE}
+      """
+                                  }
+                              }
+                          }
+                      }
+                  }
+              }
+          }
+      }
+    name: mbedtls-dockerfile-builder
+    parameters:
+    - string:
+        default: https://github.com/Mbed-TLS/mbedtls-test.git
+        description: Enter mbed TLS test repo/fork
+        name: MBED_TLS_TEST_REPO
+        trim: 'false'
+    - string:
+        default: master
+        description: Enter branch or commit to build dockerfile from
+        name: MBED_TLS_TEST_BRANCH
+        trim: 'false'
+    - bool:
+        default: false
+        description: Build the Ubuntu 16.04 Docker image
+        name: BUILD_16_04_DOCKERFILE
+    - string:
+        default: ubuntu-16.04-testing
+        description: Enter tag for Ubuntu 16.04 Docker image being built
+        name: TAG_FOR_16_04_DOCKERFILE
+        trim: 'false'
+    - bool:
+        default: false
+        description: Build the Ubuntu 18.04 Docker image
+        name: BUILD_18_04_DOCKERFILE
+    - string:
+        default: ubuntu-18.04-testing
+        description: Enter tag for Ubuntu 18.04 Docker image being built
+        name: TAG_FOR_18_04_DOCKERFILE
+        trim: 'false'
+    - bool:
+        default: false
+        description: Build the Ubuntu 20.04 Docker image
+        name: BUILD_20_04_DOCKERFILE
+    - string:
+        default: ubuntu-20.04-testing
+        description: Enter tag for Ubuntu 20.04 Docker image being built
+        name: TAG_FOR_20_04_DOCKERFILE
+        trim: 'false'
+    project-type: pipeline
+    properties:
+    - speed-durability:
+        hint: performance-optimized
+    - build-blocker:
+        block-level: GLOBAL
+        blocking-jobs: []
+        queue-scanning: DISABLED
+        use-build-blocker: false
+    - build-discarder:
+        artifact-days-to-keep: -1
+        artifact-num-to-keep: -1
+        days-to-keep: 60
+        num-to-keep: 100
+    sandbox: true
+    triggers: []
diff --git a/mbedtls-release-ci-testing.yaml b/mbedtls-release-ci-testing.yaml
new file mode 100644
index 0000000..1538bef
--- /dev/null
+++ b/mbedtls-release-ci-testing.yaml
@@ -0,0 +1,153 @@
+- job:
+    concurrent: true
+    description: Mbed TLS Release job (new)
+    disabled: false
+    name: mbedtls-release-ci-testing
+    parameters:
+    - string:
+        default: https://github.com/Mbed-TLS/mbedtls.git
+        description: Enter mbed TLS repo/fork
+        name: MBED_TLS_REPO
+        trim: 'true'
+    - string:
+        default: development
+        description: Enter branch or commit to test
+        name: MBED_TLS_BRANCH
+        trim: 'true'
+    - bool:
+        default: false
+        description: Run basic-build-test.sh (test coverage measurement)
+        name: RUN_BASIC_BUILD_TEST
+    - bool:
+        default: false
+        description: Run all.sh on Linux
+        name: RUN_ALL_SH
+    - bool:
+        default: false
+        description: Run a selection of all.sh on FreeBSD
+        name: RUN_FREEBSD
+    - bool:
+        default: false
+        description: Run Windows tests
+        name: RUN_WINDOWS_TEST
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS authcrypt
+          example.
+        name: TEST_MBED_OS_AUTHCRYPT_EXAMPLE
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS benchmark
+          example.
+        name: TEST_MBED_OS_BENCHMARK_EXAMPLE
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS hashing
+          example.
+        name: TEST_MBED_OS_HASHING_EXAMPLE
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS tls-client
+          example.
+        name: TEST_MBED_OS_TLS_CLIENT_EXAMPLE
+    - string:
+        default: ''
+        description: |-
+          Enter Mbed Crypto repo/fork. Note this *ONLY* influences the Mbed OS tests at this time.
+
+          Optional - if omitted will use what's embedded in the Mbed TLS submodule.
+        name: MBED_CRYPTO_REPO
+        trim: 'true'
+    - string:
+        default: ''
+        description: |-
+          Enter Mbed Crypto branch. Note this *ONLY* influences the Mbed OS tests at this time.
+
+          Optional - if omitted will use what's embedded in the Mbed TLS submodule.
+        name: MBED_CRYPTO_BRANCH
+        trim: 'true'
+    - string:
+        default: https://github.com/ARMmbed/mbed-os.git
+        description: Enter the Mbed OS repo or fork
+        name: MBED_OS_REPO
+        trim: 'true'
+    - string:
+        default: master
+        description: |-
+          Enter branch or commit to test.
+
+          By default we test with the HEAD of the master branch, which is NOT a fixed release.
+        name: MBED_OS_BRANCH
+        trim: 'true'
+    - string:
+        default: https://github.com/ARMmbed/mbed-os-example-tls.git
+        description: |-
+          Enter the Mbed OS examples repo or fork.
+
+          This defaults to the main repository the examples are held in.
+        name: MBED_OS_TLS_EXAMPLES_REPO
+        trim: 'true'
+    - string:
+        default: master
+        description: |-
+          Enter branch or commit to test.
+
+          This defaults to the HEAD of the master branch.
+        name: MBED_OS_TLS_EXAMPLES_BRANCH
+        trim: 'true'
+    - choice:
+        choices:
+        - Pull Request
+        - Mbed OS Gold Boards
+        - Mbed OS Silver Boards
+        - Mbed OS Gold Boards + Mbed OS Silver Boards
+        description: |-
+          Pull Request - Boards tested in the Pull Request job<br>
+
+          For the list of Mbed OS Gold and Silver boards, see <a href="https://confluence.arm.com/display/IoTBU/ISG+Device+SW+SUT+list">here</a>
+        name: PLATFORMS_TO_TEST
+    - bool:
+        default: false
+        description: Push head to coverity branch, triggering a scan (development only)
+        name: PUSH_COVERITY
+    - git-parameter:
+        name: TEST_BRANCH
+        description: Branch or tag in https://github.com/Mbed-TLS/mbedtls-test.git (forks are not supported)
+        type: PT_BRANCH_TAG
+        quickFilterEnabled: True
+        defaultValue: master
+    pipeline-scm:
+      lightweight-checkout: false
+      scm:
+      - git:
+          branches:
+          - ${TEST_BRANCH}
+          url: https://github.com/Mbed-TLS/mbedtls-test.git
+      script-path: vars/mbedtls-release-Jenkinsfile
+    project-type: pipeline
+    properties:
+    - speed-durability:
+        hint: performance-optimized
+    - build-blocker:
+        block-level: GLOBAL
+        blocking-jobs: []
+        queue-scanning: DISABLED
+        use-build-blocker: false
+    - build-discarder:
+        artifact-days-to-keep: -1
+        artifact-num-to-keep: -1
+        days-to-keep: 60
+        num-to-keep: 30
+    - github:
+        url: https://github.com/Mbed-TLS/mbedtls
+    - inject:
+        enabled: true
+        keep-build-variables: true
+        keep-system-variables: true
+        load-from-master: false
+        override-build-parameters: false
+        properties-content: |-
+          GIT_CREDENTIALS_ID=mbedtls-github-ssh
+          TEST_PASS_EMAIL_ADDRESS=arthur.she@linaro.org,CE-OSS-Firmware-Crypto-TLS@arm.com,darryl.green@arm.com
+          TEST_FAIL_EMAIL_ADDRESS=arthur.she@linaro.org,CE-OSS-Firmware-Crypto-TLS@arm.com,darryl.green@arm.com
+
diff --git a/mbedtls-restricted-release-new.yaml b/mbedtls-restricted-release-new.yaml
new file mode 100644
index 0000000..ae5db63
--- /dev/null
+++ b/mbedtls-restricted-release-new.yaml
@@ -0,0 +1,139 @@
+- job:
+    concurrent: true
+    description: Mbed TLS Release job (new)
+    disabled: false
+    name: mbedtls-restricted-release-new
+    parameters:
+    - string:
+        default: ssh://git@github.com/Mbed-TLS/mbedtls-restricted.git
+        description: Enter mbed TLS repo/fork
+        name: MBED_TLS_REPO
+        trim: 'true'
+    - string:
+        default: development-restricted
+        description: Enter branch or commit to test
+        name: MBED_TLS_BRANCH
+        trim: 'true'
+    - bool:
+        default: true
+        description: Run basic-build-test.sh
+        name: RUN_BASIC_BUILD_TEST
+    - bool:
+        default: true
+        description: Run all.sh on Linux
+        name: RUN_ALL_SH
+    - bool:
+        default: false
+        description: Run Windows tests
+        name: RUN_WINDOWS_TEST
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS authcrypt
+          example.
+        name: TEST_MBED_OS_AUTHCRYPT_EXAMPLE
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS benchmark
+          example.
+        name: TEST_MBED_OS_BENCHMARK_EXAMPLE
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS hashing
+          example.
+        name: TEST_MBED_OS_HASHING_EXAMPLE
+    - bool:
+        default: false
+        description: Import mbed TLS into mbed-os master and test mbed TLS tls-client
+          example.
+        name: TEST_MBED_OS_TLS_CLIENT_EXAMPLE
+    - string:
+        default: ''
+        description: |-
+          Enter Mbed Crypto repo/fork. Note this *ONLY* influences the Mbed OS tests at this time.
+
+          Optional - if omitted will use what's embedded in the Mbed TLS submodule.
+        name: MBED_CRYPTO_REPO
+        trim: 'true'
+    - string:
+        default: ''
+        description: |-
+          Enter Mbed Crypto branch. Note this *ONLY* influences the Mbed OS tests at this time.
+
+          Optional - if omitted will use what's embedded in the Mbed TLS submodule.
+        name: MBED_CRYPTO_BRANCH
+        trim: 'true'
+    - string:
+        default: https://github.com/ARMmbed/mbed-os.git
+        description: Enter the Mbed OS repo or fork
+        name: MBED_OS_REPO
+        trim: 'true'
+    - string:
+        default: master
+        description: |-
+          Enter branch or commit to test.
+
+          By default we test with the HEAD of the master branch, which is NOT a fixed release.
+        name: MBED_OS_BRANCH
+        trim: 'true'
+    - string:
+        default: https://github.com/ARMmbed/mbed-os-example-tls.git
+        description: |-
+          Enter the Mbed OS examples repo or fork.
+
+          This defaults to the main repository the examples are held in.
+        name: MBED_OS_TLS_EXAMPLES_REPO
+        trim: 'true'
+    - string:
+        default: master
+        description: |-
+          Enter branch or commit to test.
+
+          This defaults to the HEAD of the master branch.
+        name: MBED_OS_TLS_EXAMPLES_BRANCH
+        trim: 'true'
+    - choice:
+        choices:
+        - Pull Request
+        - Mbed OS Gold Boards
+        - Mbed OS Silver Boards
+        - Mbed OS Gold Boards + Mbed OS Silver Boards
+        description: |-
+          Pull Request - Boards tested in the Pull Request job<br>
+
+          For the list of Mbed OS Gold and Silver boards, see <a href="https://confluence.arm.com/display/IoTBU/ISG+Device+SW+SUT+list">here</a>
+        name: PLATFORMS_TO_TEST
+    pipeline-scm:
+      lightweight-checkout: true
+      scm:
+      - git:
+          branches:
+          - 'master'
+          url: https://github.com/Mbed-TLS/mbedtls-test.git
+      script-path: vars/mbedtls-release-Jenkinsfile
+    project-type: pipeline
+    properties:
+    - speed-durability:
+        hint: performance-optimized
+    - build-blocker:
+        block-level: GLOBAL
+        blocking-jobs: []
+        queue-scanning: DISABLED
+        use-build-blocker: false
+    - build-discarder:
+        artifact-days-to-keep: -1
+        artifact-num-to-keep: -1
+        days-to-keep: 60
+        num-to-keep: 100
+    - github:
+        url: https://github.com/Mbed-TLS/mbedtls
+    - inject:
+        enabled: true
+        keep-build-variables: true
+        keep-system-variables: true
+        load-from-master: false
+        override-build-parameters: false
+        properties-content: |-
+          GIT_CREDENTIALS_ID=mbedtls-github-ssh
+          TEST_PASS_EMAIL_ADDRESS=mbed-tls-eng@arm.com;jaeden.amero@arm.com;arthur.she@linaro.org
+          TEST_FAIL_EMAIL_ADDRESS=mbed-tls-eng@arm.com;jaeden.amero@arm.com;arthur.she@linaro.org
+    triggers: []