From 11de370cbbadad1a41adb298074e9979174a84a4 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:16:43 -0600 Subject: [PATCH 01/11] test --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dbccea9..a7fd4a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ Init: - example/node_modules image: ${DEVOPS_REGISTRY}usgs/node:16 script: + - env - npm ci - cd example - npm ci -- GitLab From 42fd61e2041dd239dd8acd1a40abf5c739722534 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:28:01 -0600 Subject: [PATCH 02/11] test --- .gitlab-ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7fd4a7..308b319 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,8 @@ variables: GITLAB_TOKEN: '${CI_JOB_TOKEN}' NODE_IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}--node +image: ${CODE_REGISTRY}usgs/node:lts + # Do not run for merge requests workflow: rules: @@ -28,9 +30,10 @@ Init: paths: - node_modules - example/node_modules - image: ${DEVOPS_REGISTRY}usgs/node:16 script: - - env + - echo $DEVOPS_REGISTRY + - echo $DEVOPS_REGISTRY > tmp + - cat tmp - npm ci - cd example - npm ci @@ -41,12 +44,12 @@ Init: #### Build Node Image: - image: ${DEVOPS_REGISTRY}docker:19.03-git + image: ${CODE_REGISTRY}usgs/docker:20 needs: [] script: - | docker build \ - --build-arg FROM_IMAGE=${DEVOPS_REGISTRY}usgs/node:16 \ + --build-arg FROM_IMAGE=${CODE_REGISTRY}usgs/node:lts \ --file "Dockerfile" \ --pull \ --tag ${NODE_IMAGE_NAME} \ @@ -54,7 +57,7 @@ Build Node Image: - docker push ${NODE_IMAGE_NAME} services: - alias: docker - name: ${DEVOPS_REGISTRY}docker:19.03-dind + name: ${CODE_REGISTRY}usgs/docker:20-dind stage: node-image tags: - build @@ -67,7 +70,6 @@ Build Node Image: Audit: allow_failure: true - image: ${DEVOPS_REGISTRY}usgs/node:16 needs: [] script: - npm audit @@ -75,7 +77,6 @@ Audit: Audit Angular: allow_failure: true - image: ${DEVOPS_REGISTRY}usgs/node:16 needs: [] script: - cd example @@ -83,7 +84,6 @@ Audit Angular: stage: build Build Angular: - image: ${DEVOPS_REGISTRY}usgs/node:16 needs: - Init script: @@ -92,7 +92,6 @@ Build Angular: stage: build Lint Angular: - image: ${DEVOPS_REGISTRY}usgs/node:16 needs: - Init script: @@ -101,7 +100,6 @@ Lint Angular: stage: build Lint Project: - image: ${DEVOPS_REGISTRY}usgs/node:16 needs: - Init script: @@ -118,7 +116,6 @@ Angular Unit Tests: - example/coverage/example reports: junit: example/junit.xml - image: ${DEVOPS_REGISTRY}usgs/node:16 needs: - Init script: -- GitLab From 75242ce6c8e88a91205ae5e90d5e662cb1d1d624 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:28:49 -0600 Subject: [PATCH 03/11] test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 308b319..2742132 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GITLAB_TOKEN: '${CI_JOB_TOKEN}' NODE_IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}--node -image: ${CODE_REGISTRY}usgs/node:lts +image: ${DEVOPS_REGISTRY}usgs/node:lts # Do not run for merge requests workflow: -- GitLab From c4ded00609e8c25fa63fec2e2850861c322d99a1 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:30:11 -0600 Subject: [PATCH 04/11] add image --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2742132..fb765b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GITLAB_TOKEN: '${CI_JOB_TOKEN}' NODE_IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}--node -image: ${DEVOPS_REGISTRY}usgs/node:lts +image: ${CODE_REGISTRY}devops/images/usgs/node:lts # Do not run for merge requests workflow: -- GitLab From 514d5f0c6c299f6ca394bdeae25b2f708644ded9 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:30:53 -0600 Subject: [PATCH 05/11] test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb765b7..6c47040 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GITLAB_TOKEN: '${CI_JOB_TOKEN}' NODE_IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}--node -image: ${CODE_REGISTRY}devops/images/usgs/node:lts +image: code.usgs.gov:5001/devops/images/usgs/node:lts # Do not run for merge requests workflow: -- GitLab From ba76247b01352ba3468c15627175946a7fc879b7 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:31:48 -0600 Subject: [PATCH 06/11] test --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c47040..a577c88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,8 +31,9 @@ Init: - node_modules - example/node_modules script: - - echo $DEVOPS_REGISTRY - - echo $DEVOPS_REGISTRY > tmp + - echo $CODE_REGISTRY > tmp + - echo $DEVOPS_REGISTRY >> tmp + - echo $CODE_REGISTRY_IMAGE >> - cat tmp - npm ci - cd example -- GitLab From 80d94e40b8e19c04e161d7c36686e81b7c3e70d9 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:33:04 -0600 Subject: [PATCH 07/11] test --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a577c88..ba7ab12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ Init: script: - echo $CODE_REGISTRY > tmp - echo $DEVOPS_REGISTRY >> tmp - - echo $CODE_REGISTRY_IMAGE >> + - echo $CODE_REGISTRY_IMAGE >> tmp - cat tmp - npm ci - cd example -- GitLab From bc61cfda245fff10c153587ad611336644d83143 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:39:05 -0600 Subject: [PATCH 08/11] update pipeline images --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba7ab12..0860208 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ variables: GITLAB_TOKEN: '${CI_JOB_TOKEN}' NODE_IMAGE_NAME: ${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${CI_COMMIT_REF_SLUG}--node -image: code.usgs.gov:5001/devops/images/usgs/node:lts +image: ${CI_REGISTRY}/devops/images/usgs/node:lts # Do not run for merge requests workflow: @@ -31,10 +31,6 @@ Init: - node_modules - example/node_modules script: - - echo $CODE_REGISTRY > tmp - - echo $DEVOPS_REGISTRY >> tmp - - echo $CODE_REGISTRY_IMAGE >> tmp - - cat tmp - npm ci - cd example - npm ci @@ -50,7 +46,7 @@ Build Node Image: script: - | docker build \ - --build-arg FROM_IMAGE=${CODE_REGISTRY}usgs/node:lts \ + --build-arg FROM_IMAGE=${CI_REGISTRY}/devops/images/usgs/node:lts \ --file "Dockerfile" \ --pull \ --tag ${NODE_IMAGE_NAME} \ @@ -58,7 +54,7 @@ Build Node Image: - docker push ${NODE_IMAGE_NAME} services: - alias: docker - name: ${CODE_REGISTRY}usgs/docker:20-dind + name: ${CI_REGISTRY}/devops/images/usgs/docker:20-dind stage: node-image tags: - build -- GitLab From c1a682f141b27b6e0502b98c7d4579bec4462e2f Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:44:24 -0600 Subject: [PATCH 09/11] fix image path --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0860208..7af5d90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,7 +41,7 @@ Init: #### Build Node Image: - image: ${CODE_REGISTRY}usgs/docker:20 + image: ${CI_REGISTRY}/devops/images/usgs/docker:20 needs: [] script: - | -- GitLab From ffc375402738963b32b80adf5dcee57b74741f0a Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:53:40 -0600 Subject: [PATCH 10/11] test --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7af5d90..54ddc03 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,6 +31,7 @@ Init: - node_modules - example/node_modules script: + - git - npm ci - cd example - npm ci -- GitLab From 3f7f816aa5f9a825b0290a7e7986b2625990bf75 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Thu, 27 Jul 2023 10:56:38 -0600 Subject: [PATCH 11/11] switch to ubuntu command --- .gitlab-ci.yml | 1 - Dockerfile | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54ddc03..7af5d90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,6 @@ Init: - node_modules - example/node_modules script: - - git - npm ci - cd example - npm ci diff --git a/Dockerfile b/Dockerfile index b02f452..46b2954 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,6 @@ FROM ${FROM_IMAGE} USER root -RUN yum install -y git +RUN apt-get install git -y USER usgs-user -- GitLab