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 4c15ff68..00000000 Binary files a/.travis/deploy_key.enc and /dev/null differ 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