From 265dda9edbd633457d3f7adbc19a34c7d10caeeb Mon Sep 17 00:00:00 2001 From: donal Date: Wed, 31 Jul 2019 15:50:38 -0400 Subject: [PATCH 1/9] =?UTF-8?q?=F0=9F=94=A5=20bump=20version=20of=20applie?= =?UTF-8?q?r=20and=20change=20site=20to=20apply=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .openshift-applier/{site.yml => apply.yml} | 0 .openshift-applier/requirements.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .openshift-applier/{site.yml => apply.yml} (100%) diff --git a/.openshift-applier/site.yml b/.openshift-applier/apply.yml similarity index 100% rename from .openshift-applier/site.yml rename to .openshift-applier/apply.yml diff --git a/.openshift-applier/requirements.yml b/.openshift-applier/requirements.yml index 88b7618..4000503 100644 --- a/.openshift-applier/requirements.yml +++ b/.openshift-applier/requirements.yml @@ -4,5 +4,5 @@ # From 'openshift-applier' - src: https://github.com/redhat-cop/openshift-applier scm: git - version: v2.0.9 + version: v2.0.10 name: openshift-applier From 8c6fddea680d30fa1c78eecd4c71802ffb2c40d3 Mon Sep 17 00:00:00 2001 From: donal Date: Thu, 1 Aug 2019 12:54:45 -0400 Subject: [PATCH 2/9] =?UTF-8?q?=F0=9F=A6=84=20update=20to=20the=20Jenkinsf?= =?UTF-8?q?ile=20=F0=9F=A6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 51daa29..7c3abbf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { environment { // Global Vars NAMESPACE_PREFIX="" - GITLAB_DOMAIN = "gitlab.apps.change.me.com" + GITLAB_DOMAIN = "" GITLAB_PROJECT = "" PIPELINES_NAMESPACE = "${NAMESPACE_PREFIX}-ci-cd" @@ -73,16 +73,13 @@ pipeline { } } steps { - // git branch: 'develop', - // credentialsId: 'jenkins-git-creds', - // url: 'https://gitlab-${NAMESPACE_PREFIX}-ci-cd.apps.somedomain.com/${NAMESPACE_PREFIX}/todolist.git' sh 'printenv' echo '### Install deps ###' sh 'npm install' echo '### Running tests ###' - sh 'npm run test:all:ci' + // sh 'npm run test:all:ci' echo '### Running build ###' sh 'npm run build:ci' @@ -96,11 +93,10 @@ pipeline { post { always { archive "**" - junit 'test-report.xml' - junit 'reports/server/mocha/test-results.xml' + // ADD TESTS REPORTS HERE + // publish html - // Notify slack or some such } success { echo "Git tagging" @@ -178,29 +174,5 @@ pipeline { waitUnit: 'sec' } } - stage("e2e test") { - agent { - node { - label "jenkins-slave-npm" - } - } - when { - expression { GIT_BRANCH ==~ /(.*master|.*develop)/ } - } - steps { - unstash 'source' - - echo '### Install deps ###' - sh 'npm install' - - echo '### Running end to end tests ###' - sh 'npm run e2e:ci' - } - post { - always { - junit 'reports/e2e/specs/*.xml' - } - } - } } } From 87ad2e96224a4eff27bcc1fa8b674434c624905a Mon Sep 17 00:00:00 2001 From: donal Date: Thu, 1 Aug 2019 12:58:46 -0400 Subject: [PATCH 3/9] =?UTF-8?q?=F0=9F=A6=84=20update=20to=20the=20Jenkinsf?= =?UTF-8?q?ile=20=F0=9F=A6=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7c3abbf..e98031a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -104,7 +104,7 @@ pipeline { git config --global user.email "jenkins@jmail.com" git config --global user.name "jenkins-ci" git tag -a ${JENKINS_TAG} -m "JENKINS automated commit" - # git push https://${GIT_CREDENTIALS_USR}:${GIT_CREDENTIALS_PSW}@${GITLAB_DOMAIN}/${GITLAB_PROJECT}/${APP_NAME}.git --tags + git push https://${GIT_CREDENTIALS_USR}:${GIT_CREDENTIALS_PSW}@${GITLAB_DOMAIN}/${GITLAB_PROJECT}/${APP_NAME}.git --tags ''' } failure { From add7afbdcc9a65ee13129badd94a7629401c04dd Mon Sep 17 00:00:00 2001 From: donal Date: Fri, 2 Aug 2019 14:29:35 -0400 Subject: [PATCH 4/9] =?UTF-8?q?FIX=20nexus=20and=20git=20credentials=20?= =?UTF-8?q?=F0=9F=98=8D=F0=9F=8F=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e98031a..89f2f38 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ pipeline { JOB_NAME = "${JOB_NAME}".replace("/", "-") GIT_SSL_NO_VERIFY = true - GIT_CREDENTIALS = credentials('jenkins-git-creds') + GIT_CREDENTIALS = credentials("${NAMESPACE_PREFIX}-ci-cd-gitlab-auth") } // The options directive is for configuration that applies to the whole job. diff --git a/package.json b/package.json index 8817f44..d652e4a 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "mongo:start": "docker start mongo-local", "mongo:start-ide": "mongod --dbpath /projects/mongo", "mongo:stop-ide": "killall mongod", - "prepare-nexus": "curl -X POST -u admin:admin123 -H 'Content-Type: application/json' -H 'Accept: application/json' -d @nexus.json http://${NEXUS_SERVICE_HOST}:${NEXUS_SERVICE_PORT}/service/siesta/rest/v1/script && curl -X POST -u admin:admin123 -H 'Content-Type: text/plain' -H 'Accept: application/json' http://${NEXUS_SERVICE_HOST}:${NEXUS_SERVICE_PORT}/service/siesta/rest/v1/script/zip/run", + "prepare-nexus": "curl -X POST -u admin:admin123 -H 'Content-Type: application/json' -H 'Accept: application/json' -d @nexus.json https://${NEXUS_SERVICE_HOST}:${NEXUS_SERVICE_PORT}/service/siesta/rest/v1/script && curl -X POST -u admin:admin123 -H 'Content-Type: text/plain' -H 'Accept: application/json' https://${NEXUS_SERVICE_HOST}:${NEXUS_SERVICE_PORT}/service/siesta/rest/v1/script/zip/run", "publish": "curl -vvv -u admin:admin123 --upload-file package-contents.zip http://${NEXUS_SERVICE_HOST}:${NEXUS_SERVICE_PORT}/repository/zip/com/redhat/todolist/${JOB_NAME}.${BUILD_NUMBER}/package-contents.zip", "publish:get": "curl -vvv http://admin:admin123@${NEXUS_SERVICE_HOST}:${NEXUS_SERVICE_PORT}/repository/zip/com/redhat/todolist/${BUILD_TAG}/package-contents.zip -o package-contents.zip" }, From 0d093e25df3db6b80a17e1175b216b00023e307f Mon Sep 17 00:00:00 2001 From: mike hepburn Date: Wed, 7 Aug 2019 00:46:07 +1000 Subject: [PATCH 5/9] =?UTF-8?q?=F0=9F=8E=A0=20GITLAB=5FPROJECT=20was=20wro?= =?UTF-8?q?ng=20=F0=9F=8E=A0=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 89f2f38..51f8bbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { // Global Vars NAMESPACE_PREFIX="" GITLAB_DOMAIN = "" - GITLAB_PROJECT = "" + GIT_USERNAME = "" PIPELINES_NAMESPACE = "${NAMESPACE_PREFIX}-ci-cd" APP_NAME = "todolist" @@ -104,7 +104,7 @@ pipeline { git config --global user.email "jenkins@jmail.com" git config --global user.name "jenkins-ci" git tag -a ${JENKINS_TAG} -m "JENKINS automated commit" - git push https://${GIT_CREDENTIALS_USR}:${GIT_CREDENTIALS_PSW}@${GITLAB_DOMAIN}/${GITLAB_PROJECT}/${APP_NAME}.git --tags + git push https://${GIT_CREDENTIALS_USR}:${GIT_CREDENTIALS_PSW}@${GITLAB_DOMAIN}/${GITLAB_USERNAME}/${APP_NAME}.git --tags ''' } failure { From 4746584471ac6dc3cea3a2c24d565a03bdf0b3ef Mon Sep 17 00:00:00 2001 From: mike hepburn Date: Fri, 9 Aug 2019 02:57:09 +1000 Subject: [PATCH 6/9] =?UTF-8?q?=F0=9F=8E=A0=20GITLAB=5FPROJECT=20was=20wro?= =?UTF-8?q?ng=20=F0=9F=8E=A0=20(#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 51f8bbb..d1deaa4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { // Global Vars NAMESPACE_PREFIX="" GITLAB_DOMAIN = "" - GIT_USERNAME = "" + GITLAB_USERNAME = "" PIPELINES_NAMESPACE = "${NAMESPACE_PREFIX}-ci-cd" APP_NAME = "todolist" From 5698f44280a4c5eb4d4d05241abfc14ad8df4b35 Mon Sep 17 00:00:00 2001 From: Shahein Moussavi Date: Fri, 9 Aug 2019 13:34:36 -0400 Subject: [PATCH 7/9] Background selenium server and run e2e scripts seqentially --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d652e4a..6baeae0 100644 --- a/package.json +++ b/package.json @@ -100,9 +100,9 @@ "test:server:ci": "export MOCHA_FILE='reports/server/mocha/test-results.xml' && export NODE_ENV=ci && node_modules/.bin/nyc node_modules/.bin/mocha 'server/**/*.spec.js' -R mocha-junit-reporter --exit", "test:all": "npm run test:client && npm run test:server", "test:all:ci": "npm run test:client && npm run test:server:ci", - "selenium": "java -Dwebdriver.chrome.driver=\"$(pwd)/node_modules/chromedriver/lib/chromedriver/chromedriver\" -jar $(pwd)/node_modules/selenium-server/lib/runner/selenium-server-standalone-3.11.0.jar -port 8084", + "selenium": "nohup java -Dwebdriver.chrome.driver=\"$(pwd)/node_modules/chromedriver/lib/chromedriver/chromedriver\" -jar $(pwd)/node_modules/selenium-server/lib/runner/selenium-server-standalone-3.11.0.jar -port 8084 0<&- &>/dev/null &", "e2e": "export SELENIUM_PORT=443; export SELENIUM_SSL=1; export SELENIUM_HOST=$(oc get routes/$(oc get routes | grep 8084 | cut -d ' ' -f 1) --template='{{.spec.host}}') && export E2E_TEST_ROUTE=$(oc get routes/$(oc get routes | grep 8080 | cut -d ' ' -f 1) --template='{{.spec.host}}') && echo \"testing app on https://${E2E_TEST_ROUTE} \n with selenium address ${SELENIUM_HOST}\" && vue-cli-service e2e --env jenkins --url https://${E2E_TEST_ROUTE}", - "e2e:jenkins": "npm-run-all -p -r selenium e2e:ci", + "e2e:jenkins": "npm-run-all selenium e2e:ci", "e2e:ci": "vue-cli-service e2e --env jenkins --url http://${E2E_TEST_ROUTE}", "lint": "vue-cli-service lint", "lint:ci": "vue-cli-service lint --format checkstyle > eslint-report.xml", From 3fd82e03af0613afe36f4fc45b22b97b737654af Mon Sep 17 00:00:00 2001 From: Mike Hepburn Date: Fri, 16 Aug 2019 08:52:31 +1000 Subject: [PATCH 8/9] =?UTF-8?q?=F0=9F=90=98=20fixes=20#486=20-=20e2e=20run?= =?UTF-8?q?ning=20in=20ide=20=F0=9F=90=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 6baeae0..98d6b21 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "e2e": "export SELENIUM_PORT=443; export SELENIUM_SSL=1; export SELENIUM_HOST=$(oc get routes/$(oc get routes | grep 8084 | cut -d ' ' -f 1) --template='{{.spec.host}}') && export E2E_TEST_ROUTE=$(oc get routes/$(oc get routes | grep 8080 | cut -d ' ' -f 1) --template='{{.spec.host}}') && echo \"testing app on https://${E2E_TEST_ROUTE} \n with selenium address ${SELENIUM_HOST}\" && vue-cli-service e2e --env jenkins --url https://${E2E_TEST_ROUTE}", "e2e:jenkins": "npm-run-all selenium e2e:ci", "e2e:ci": "vue-cli-service e2e --env jenkins --url http://${E2E_TEST_ROUTE}", + "e2e:ide": "vue-cli-service e2e --url=http://localhost:8080 --env jenkins", "lint": "vue-cli-service lint", "lint:ci": "vue-cli-service lint --format checkstyle > eslint-report.xml", "jshint": "./node_modules/.bin/grunt jshint", From a03c5ff713d4eb860dc935d463c059a676819ffc Mon Sep 17 00:00:00 2001 From: donal Date: Fri, 16 Aug 2019 11:43:01 +0100 Subject: [PATCH 9/9] =?UTF-8?q?=F0=9F=8E=88=20FIX=20-=20stop=20all=20node?= =?UTF-8?q?=20process=20=F0=9F=8E=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 98d6b21..0f38416 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "serve": "vue-cli-service serve --open", "serve:all": "npm-run-all -p -r serve dev:server", "start": "node server/app.js", + "stop:all": "killall node", "clean": "rm -rf reports package-contents* reports dist ", "build:client": "vue-cli-service build", "build:ci": "cp src/config/openshift.js src/config/index.js && npm run build:client && mkdir -p package-contents && cp -vr dist server Dockerfile package.json package-contents",