From 624975e123d6bd475a8de5acf69df13d4ebf7878 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 4 Jan 2022 11:29:00 -0600 Subject: [PATCH 1/4] getting scheduling to work --- .gitlab/.gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 54aecb3df..c99e9c7e2 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -24,6 +24,8 @@ stages: golangci-lint: image: golangci/golangci-lint:v1.39.0 stage: lint + except: + - schedules extends: .go-cache allow_failure: false rules: @@ -34,6 +36,8 @@ golangci-lint: build lattice: stage: test + except: + - schedules image: node:14 variables: CI: "false" @@ -54,6 +58,8 @@ build lattice: run jest tests: stage: test + except: + - schedules image: node:14 variables: CI: "true" @@ -70,6 +76,8 @@ run jest tests: run go tests: stage: test + except: + - schedules image: golang:$GOVERSION extends: .go-cache rules: @@ -84,6 +92,8 @@ run go tests: run go tests future: stage: test + except: + - schedules image: golang:1.17.3 extends: .go-cache rules: @@ -99,6 +109,8 @@ run go tests future: run go tests with output: stage: test + except: + - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -111,6 +123,8 @@ run go tests with output: upload to sonarcloud: stage: test + except: + - schedules image: sonarsource/sonar-scanner-cli:4.6 variables: SONAR_TOKEN: $SONAR_TOKEN @@ -125,6 +139,8 @@ upload to sonarcloud: build for linux amd64: stage: build + except: + - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -140,6 +156,8 @@ build for linux amd64: build for linux arm64: stage: build + except: + - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -155,6 +173,8 @@ build for linux arm64: build for darwin amd64: stage: build + except: + - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -170,6 +190,8 @@ build for darwin amd64: build for darwin arm64: stage: build + except: + - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -186,6 +208,8 @@ build for darwin arm64: package for linux amd64: stage: build image: golang:$GOVERSION + except: + - schedules rules: - if: '$CI_PIPELINE_SOURCE == "push"' variables: @@ -204,6 +228,8 @@ package for linux amd64: build container fb: image: docker:stable stage: build + except: + - schedules needs: - "build for linux amd64" tags: @@ -222,6 +248,8 @@ build container fb: # diabling for now - will come back and refactor POK # deploy node for linux amd64: # stage: integration +# except: +# - schedules # image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest # variables: # PROFILE: "default" @@ -256,9 +284,11 @@ gauntlet: AWS_SSH_PRIVATE_KEY: $AWS_FBCI_SSH_KEY AWS_ACCESS_KEY_ID: $AWS_FBCI_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY - # TODO: For now, run always - rules: - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' +# rules: +# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + only: + - schedules + - web before_script: - apt-get update && apt-get install -y gnupg software-properties-common curl git - curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - @@ -284,7 +314,6 @@ gauntlet: - export PATH=$PATH:/usr/local/go/bin script: - ./qa/scripts/setupSamsungGauntlet.sh - - ./qa/scripts/testSamsungGauntlet.sh +# - ./qa/scripts/testSamsungGauntlet.sh after_script: - - ./qa/scripts/teardownSamsungGauntlet.sh - needs: ["build for linux arm64"] + - ./qa/scripts/teardownSamsungGauntlet.sh \ No newline at end of file From c06d21a1892c3bb29c3edf6f9e9e530a928fb228 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 4 Jan 2022 12:33:45 -0600 Subject: [PATCH 2/4] rules it is.. --- .gitlab/.gitlab-ci.yml | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index c99e9c7e2..793ce69dd 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -24,8 +24,6 @@ stages: golangci-lint: image: golangci/golangci-lint:v1.39.0 stage: lint - except: - - schedules extends: .go-cache allow_failure: false rules: @@ -36,8 +34,6 @@ golangci-lint: build lattice: stage: test - except: - - schedules image: node:14 variables: CI: "false" @@ -58,8 +54,6 @@ build lattice: run jest tests: stage: test - except: - - schedules image: node:14 variables: CI: "true" @@ -76,8 +70,6 @@ run jest tests: run go tests: stage: test - except: - - schedules image: golang:$GOVERSION extends: .go-cache rules: @@ -92,8 +84,6 @@ run go tests: run go tests future: stage: test - except: - - schedules image: golang:1.17.3 extends: .go-cache rules: @@ -109,8 +99,6 @@ run go tests future: run go tests with output: stage: test - except: - - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -123,8 +111,6 @@ run go tests with output: upload to sonarcloud: stage: test - except: - - schedules image: sonarsource/sonar-scanner-cli:4.6 variables: SONAR_TOKEN: $SONAR_TOKEN @@ -139,8 +125,6 @@ upload to sonarcloud: build for linux amd64: stage: build - except: - - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -156,8 +140,6 @@ build for linux amd64: build for linux arm64: stage: build - except: - - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -173,8 +155,6 @@ build for linux arm64: build for darwin amd64: stage: build - except: - - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -190,8 +170,6 @@ build for darwin amd64: build for darwin arm64: stage: build - except: - - schedules image: golang:$GOVERSION rules: - if: '$CI_PIPELINE_SOURCE == "push"' @@ -208,8 +186,6 @@ build for darwin arm64: package for linux amd64: stage: build image: golang:$GOVERSION - except: - - schedules rules: - if: '$CI_PIPELINE_SOURCE == "push"' variables: @@ -228,8 +204,6 @@ package for linux amd64: build container fb: image: docker:stable stage: build - except: - - schedules needs: - "build for linux amd64" tags: @@ -248,8 +222,6 @@ build container fb: # diabling for now - will come back and refactor POK # deploy node for linux amd64: # stage: integration -# except: -# - schedules # image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest # variables: # PROFILE: "default" @@ -284,11 +256,9 @@ gauntlet: AWS_SSH_PRIVATE_KEY: $AWS_FBCI_SSH_KEY AWS_ACCESS_KEY_ID: $AWS_FBCI_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY -# rules: + rules: + - if: '$CI_PIPELINE_SOURCE == "schedule" || '$CI_PIPELINE_SOURCE == "web"' # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - only: - - schedules - - web before_script: - apt-get update && apt-get install -y gnupg software-properties-common curl git - curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - From a2be201009224488d2f0c3edb1b1010f6162a961 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 4 Jan 2022 12:37:05 -0600 Subject: [PATCH 3/4] fixed yaml fubar --- .gitlab/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 793ce69dd..d0c73195c 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -257,7 +257,7 @@ gauntlet: AWS_ACCESS_KEY_ID: $AWS_FBCI_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY rules: - - if: '$CI_PIPELINE_SOURCE == "schedule" || '$CI_PIPELINE_SOURCE == "web"' + - if: '$CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' # - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' before_script: - apt-get update && apt-get install -y gnupg software-properties-common curl git From 13b6f6f1339ee3b3e2c03dd2e9346e67561ac73d Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Tue, 4 Jan 2022 13:02:45 -0600 Subject: [PATCH 4/4] re-enabling actual test --- .gitlab/.gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index d0c73195c..55bbde528 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -257,8 +257,7 @@ gauntlet: AWS_ACCESS_KEY_ID: $AWS_FBCI_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY rules: - - if: '$CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' -# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web")' before_script: - apt-get update && apt-get install -y gnupg software-properties-common curl git - curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - @@ -284,6 +283,6 @@ gauntlet: - export PATH=$PATH:/usr/local/go/bin script: - ./qa/scripts/setupSamsungGauntlet.sh -# - ./qa/scripts/testSamsungGauntlet.sh + - ./qa/scripts/testSamsungGauntlet.sh after_script: - ./qa/scripts/teardownSamsungGauntlet.sh \ No newline at end of file