From 82e096a19c5662773b4ec6b79338e77c97ff08bf Mon Sep 17 00:00:00 2001 From: lucasgarfield Date: Fri, 19 Jan 2024 17:06:21 +0100 Subject: [PATCH] Travis: Remove Travis CI We have replaced the Travis CI with a Github action, `dev-checks.yml`. Travis is less reliable than the Github dev checks, recently it has been flaking on timeouts. Additionally, removing it will allow us to move the owner of the image-builder-frontend repository from RedHatInsights to osbuild. --- .travis.yml | 29 --------------- .travis/Jenkinsfile | 75 -------------------------------------- .travis/custom_release.sh | 26 ------------- .travis/deploy_key.enc | Bin 3392 -> 0 bytes README.md | 2 +- 5 files changed, 1 insertion(+), 131 deletions(-) delete mode 100644 .travis.yml delete mode 100644 .travis/Jenkinsfile delete mode 100755 .travis/custom_release.sh delete mode 100644 .travis/deploy_key.enc diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e59f8830..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: node_js -sudo: required -branches: - only: - - main - - stage-stable - - prod-beta - - prod-stable -notifications: - email: false -node_js: - - '16' -cache: - npm: false -install: - - npm ci -before_script: | - npm run api && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] && echo "✓ No manual API changes." || echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints." && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] -script: - - NODE_ENV=production npm run build - - npm run lint - - npm run test - - npx codecov -after_success: - - curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/bootstrap.sh | bash -s -env: - global: - - DEPLOY_REPO="git@github.com:RedHatInsights/image-builder-frontend-build" - - NODE_OPTIONS="--max-old-space-size=4096 --max_old_space_size=4096" diff --git a/.travis/Jenkinsfile b/.travis/Jenkinsfile deleted file mode 100644 index 6faa5d1d..00000000 --- a/.travis/Jenkinsfile +++ /dev/null @@ -1,75 +0,0 @@ -@Library("github.com/RedHatInsights/insights-pipeline-lib@v3") -import groovy.json.JsonSlurper - -node { - stage ("deploy") { - - checkout scm - withCredentials(bindings: [sshUserPrivateKey(credentialsId: "cloud-netstorage", - keyFileVariable: "privateKeyFile", - passphraseVariable: "", - usernameVariable: "")]) { - - String APP_NAME = "__APP_NAME__" - String BRANCH = env.BRANCH_NAME.replaceAll("origin/", "") - - if (BRANCH == "prod-stable") { - PREFIX = "" - } else if (BRANCH == "prod-beta") { - PREFIX = "beta/" - } else if (BRANCH == "qa-stable" || BRANCH == "stage-stable") { - PREFIX = "stage/" - } else if (BRANCH == "qa-beta" || BRANCH == "stage-beta") { - PREFIX = "stage/beta/" - } else { - error "Bug: invalid branch name, we only support (prod/qa/stage)-(beta/stable) and we got ${BRANCH}" - } - - // Write build info into app.info.json - // We have the src info there already - def app_info = readJSON file: "./app.info.json" - app_info.build_branch = BRANCH - app_info.build_hash = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() - app_info.build_id = env.BUILD_ID - writeJSON file: "./app.info.json", json: app_info - - // Send Slack Notification - String SLACK_TEXT = "${APP_NAME}/${BRANCH} [STATUS] - Deploy build ${app_info.build_id} started for GIT COMMIT ${app_info.build_hash}." - slackSend message: SLACK_TEXT, color: 'black', channel: '#insights-bots' - - AKAMAI_BASE_PATH = "822386" - AKAMAI_APP_PATH = "/${AKAMAI_BASE_PATH}/${PREFIX}apps/${APP_NAME}" - - sh """ - eval `ssh-agent` - ssh-add \"$privateKeyFile\" - chmod 600 ~/.ssh/known_hosts ~/.ssh/config - n=0 - until [ \$n -ge 10 ] - do - rsync -arv -e \"ssh -2 -o StrictHostKeyChecking=no\" * sshacs@cloud-unprotected.upload.akamai.com:${AKAMAI_APP_PATH} && break - n=\$[\$n+1] - sleep 10 - done - """ - - //Clear the cache for the app being deployed - openShiftUtils.withJnlpNode( - image: "quay.io/redhatqe/origin-jenkins-agent-akamai:4.9", - namespace: "insights-dev-jenkins" - ) { - //install python dependencies - sh "wget https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/akamai_cache_buster/bustCache.py" - sh "wget https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/akamai_cache_buster/requirements.txt" - sh "pip install -r requirements.txt" - withCredentials([file(credentialsId: "jenkins-eccu-cache-purge", variable: 'EDGERC')]) { - //path to .edgerc file is now set to $EDGERC" - //Bust the current cache - sh "python3 bustCache.py $EDGERC ${APP_NAME} ${BRANCH}" - } - // Trigger IQE pipelines - sh ("curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"Trigger IQE pipelines\"}' WEBHOOK_PLACEHOLDER") - } - } - } -} diff --git a/.travis/custom_release.sh b/.travis/custom_release.sh deleted file mode 100755 index c8179b98..00000000 --- a/.travis/custom_release.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -ex - -if [ "${TRAVIS_BRANCH}" = "main" ]; then - .travis/release.sh "stage-beta" -fi - -if [ "${TRAVIS_BRANCH}" = "stage-stable" ]; then - # Download modified Jenkinsfile - curl -o .travis/58231b16fdee45a03a4ee3cf94a9f2c3 https://raw.githubusercontent.com/RedHatInsights/image-builder-frontend/stage-stable/.travis/Jenkinsfile - # Insert stage webhook URL - sed -i 's|WEBHOOK_PLACEHOLDER|https://smee.io/IQDT9yRXsWlqbxpg|g' .travis/58231b16fdee45a03a4ee3cf94a9f2c3 - .travis/release.sh "stage-stable" -fi - -if [ "${TRAVIS_BRANCH}" = "prod-beta" ]; then - .travis/release.sh "prod-beta" -fi - -if [ "${TRAVIS_BRANCH}" = "prod-stable" ]; then - # Download modified Jenkinsfile - curl -o .travis/58231b16fdee45a03a4ee3cf94a9f2c3 https://raw.githubusercontent.com/RedHatInsights/image-builder-frontend/stage-stable/.travis/Jenkinsfile - # Insert prod webhook URL - sed -i 's|WEBHOOK_PLACEHOLDER|https://smee.io/F9gZwIGELxwah4if|g' .travis/58231b16fdee45a03a4ee3cf94a9f2c3 - .travis/release.sh "prod-stable" -fi diff --git a/.travis/deploy_key.enc b/.travis/deploy_key.enc deleted file mode 100644 index 4c15ff68d9fa30bab875fa187fca43c777a6f464..0000000000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;jm`3;mG4FmPkOn|viIQpsZ5{q`s?TxN>eB2l@ zz7_Bj&L%=5#L%LaSFylHp;fBNQhO2H{XLia?!X0o6y@Zba1=9+R%{EF>N3s>!~PT5 zv8742gOZHLL2xZw($mkzoS%DGO?LeFZ=Yo@saySiBV+;dcxj%!Q|POq!mgL-L_c(j zZFSmI1MW$T>WFeUiIe%)xJ28CtBmW0v?MFWa}$??kZCH4HJY*hsTq3znT6IG$L@>vJcCTd4>Chi7< z1LSeyKJVdLtQ9gx^`q0<#JiG-Xm6p6*O&==Na+1jZi*XC3C16zJ9>T%*-!diXnvv< z4=8!sZ%pb5Yg**rx3I=1wAiCOZ9@q#<;o0k;bfCVXw(up5?><|Ez>sEoLd)XnZI(t z0>HO?wYDMFN6>o?QLjE5X)+&1Ko%I*V0mp(CpPzvd+75X{@D6jqF?=;z-+?Awk|kB z9*^cV=FgLn!-VP%%IRWk zD;+_qE?7d@4?=@g?&TLzt!^)+t=#4RQS{b z(2vZWA<))lHSCF1Hb}1>6*;!oY*33;a2oaR;)B>=Y;;LC5^*jFg5^g%ZO&$!_Wx>) z9A&$F<*QxaEV)&UsY(g&2TlZPEwXvWvYky@|ZdOWP%{S@KN%SK_l$hpg#T+hQE<`AQC=)pJFFW59vG&UoOYIP(pwT2lW$ODF W$HR7%qJHipRpQRa6l5;y9lau#A+eqS diff --git a/README.md b/README.md index 2bc531ad..05b29461 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ To run the unit tests, the linter, and the code coverage check run: npm run test ``` -These tests will also be run in our Travis CI when a PR is opened. +These tests will also be run in our CI when a PR is opened. ### Using MSW data in development