From e2e95ca08cebb34524c2b0b6f7b6f054f11405ba Mon Sep 17 00:00:00 2001
From: Raul Barreras <rbarreras@nebraska.edu>
Date: Fri, 20 Sep 2019 17:15:08 +0000
Subject: [PATCH] Update .gitlab-ci.yml, .gitlab/ci/verify.yml,
 .gitlab/ci/test.yml, .gitlab/ci/publish.yml, .gitlab/ci/build.yml files

---
 .gitlab-ci.yml         | 58 +++---------------------------------------
 .gitlab/ci/build.yml   |  8 ++++++
 .gitlab/ci/publish.yml |  8 ++++++
 .gitlab/ci/test.yml    | 16 ++++++++++++
 .gitlab/ci/verify.yml  | 13 ++++++++++
 5 files changed, 49 insertions(+), 54 deletions(-)
 create mode 100644 .gitlab/ci/build.yml
 create mode 100644 .gitlab/ci/publish.yml
 create mode 100644 .gitlab/ci/test.yml
 create mode 100644 .gitlab/ci/verify.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3b79254..a454e57 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,58 +9,8 @@ stages:
   - security
 
 include:
+  - local: .gitlab/ci/verify.yml
+  - local: .gitlab/ci/build.yml
+  - local: .gitlab/ci/test.yml
   - local: .gitlab/ci/test.dependency_check.yml
-
-.Check Makefile:
-  stage: verify
-  tags:
-    - linux, dockerd
-  script:
-    - docker run --rm -v "${PWD}:/work" -w /work mandrean/checkmake ./Makefile
-
-.Lint and Validate dockerfiles:
-  stage: verify
-  tags:
-    - linux, dockerd
-  script:
-    - make test
-
-.Make All Images:
-  stage: build
-  image: projectatomic/dockerfile-lint
-  tags:
-    - linux, dockerd
-  script:
-    - make 
-
-.Test Sonar Scanner:
-  stage: test
-  tags:
-    - dockerd
-  script: 
-    - docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -v
-    - docker run --rm -v "${PWD}:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/detect-secrets -s
-
-.Test PHP Lint:
-  stage: test
-  tags:
-    - linux, dockerd
-  script: 
-    - t/php-lint/tests.sh
-
-.Push to Container Registry:
-  after_script:
-    - rm -f /var/lib/gitlab-runner/.docker/config.json
-  stage: publish
-  tags:
-    - linux, dockerd
-  script:
-    - make publish
-
-.Scan with Tenable:
-  stage: security
-  tags:
-    - linux, dockerd
-  script:
-    - make security
-
+  - local: .gitlab/ci/publish.yml
diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml
new file mode 100644
index 0000000..039b932
--- /dev/null
+++ b/.gitlab/ci/build.yml
@@ -0,0 +1,8 @@
+
+Make All Images:
+  stage: build
+  image: projectatomic/dockerfile-lint
+  tags:
+    - linux, dockerd
+  script:
+    - make 
diff --git a/.gitlab/ci/publish.yml b/.gitlab/ci/publish.yml
new file mode 100644
index 0000000..32a03af
--- /dev/null
+++ b/.gitlab/ci/publish.yml
@@ -0,0 +1,8 @@
+Push to Container Registry:
+  after_script:
+    - rm -f /var/lib/gitlab-runner/.docker/config.json
+  stage: publish
+  tags:
+    - linux, dockerd
+  script:
+    - make publish
diff --git a/.gitlab/ci/test.yml b/.gitlab/ci/test.yml
new file mode 100644
index 0000000..2fcdc9d
--- /dev/null
+++ b/.gitlab/ci/test.yml
@@ -0,0 +1,16 @@
+Test Container Versions:
+  stage: test
+  tags:
+    - dockerd
+  script: 
+    - docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -v
+    - docker run --rm -v "${PWD}:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/detect-secrets -s
+    - docker run --rm its-registry.unl.edu/unl-its/docker-ci/dependency-check dependency-check -v
+
+Test PHP Lint:
+  stage: test
+  tags:
+    - linux, dockerd
+  script: 
+    - t/php-lint/tests.sh
+
diff --git a/.gitlab/ci/verify.yml b/.gitlab/ci/verify.yml
new file mode 100644
index 0000000..b3d8218
--- /dev/null
+++ b/.gitlab/ci/verify.yml
@@ -0,0 +1,13 @@
+Check Makefile:
+  stage: verify
+  tags:
+    - linux, dockerd
+  script:
+    - docker run --rm -v "${PWD}:/work" -w /work mandrean/checkmake ./Makefile
+
+Lint and Validate dockerfiles:
+  stage: verify
+  tags:
+    - linux, dockerd
+  script:
+    - make test
\ No newline at end of file
-- 
GitLab