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.
This commit is contained in:
parent
46ac78b1de
commit
82e096a19c
5 changed files with 1 additions and 131 deletions
29
.travis.yml
29
.travis.yml
|
|
@ -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"
|
|
||||||
75
.travis/Jenkinsfile
vendored
75
.travis/Jenkinsfile
vendored
|
|
@ -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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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
|
|
||||||
Binary file not shown.
|
|
@ -247,7 +247,7 @@ To run the unit tests, the linter, and the code coverage check run:
|
||||||
npm run test
|
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
|
### Using MSW data in development
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue