From 53bc78db4155eeadc4c5ec6fa25067ecec5ace48 Mon Sep 17 00:00:00 2001 From: Geo Bosincianu Date: Tue, 12 Oct 2021 19:33:05 +0300 Subject: [PATCH] fix(build): remove jenkins-pipeline, fix main workflow fix main workflow, removed crossbrowser-tests and Jenkins pipeline --- .github/workflows/main.yml | 36 +------------ Jenkinsfile | 102 ------------------------------------- 2 files changed, 1 insertion(+), 137 deletions(-) delete mode 100644 Jenkinsfile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6eec9ff..fe33aa6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,43 +37,9 @@ jobs: report_paths: 'build/junit**/*.xml' github_token: ${{ secrets.GITHUB_TOKEN }} - crossbrowser-test: - name: Crossbrowser test - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: ⬇️ Checkout repo - uses: actions/checkout@v2 - - - name: ⎔ Setup node - uses: actions/setup-node@v2 - with: - node-version: 14 - registry-url: 'https://npm.pkg.github.com' - cache: 'npm' - - - name: 📥 Download deps - run: npm install - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - - name: ▶️ Run test - run: npm run test:integration - env: - BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }} - BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }} - - - name: Publish Test Report - uses: tradeshift/action-junit-report@v1 - if: ${{ always() }} - with: - check_name: Crossbrowser tests - report_paths: 'build/junit**/*.xml' - github_token: ${{ secrets.GITHUB_TOKEN }} - release: name: 🚀 Release - needs: [validate, crossbrowser-test] + needs: [validate] runs-on: ubuntu-latest if: ${{ !github.event.fork && contains('refs/heads/master,refs/heads/beta,refs/heads/next,refs/heads/alpha', diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index d444c59..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,102 +0,0 @@ -// This Jenkinsfile uses the declarative syntax. If you need help, check: -// Overview and structure: https://jenkins.io/doc/book/pipeline/syntax/ -// For plugins and steps: https://jenkins.io/doc/pipeline/steps/ -// For Github integration: https://github.com/jenkinsci/pipeline-github-plugin -// For credentials: https://jenkins.io/doc/book/pipeline/jenkinsfile/#handling-credentials -// For credential IDs: https://ci.ts.sv/credentials/store/system/domain/_/ -// Docker: https://jenkins.io/doc/book/pipeline/docker/ -// Custom commands: https://github.com/Tradeshift/jenkinsfile-common/tree/master/vars -// Environment variables: env.VARIABLE_NAME - -pipeline { - agent any // Or you could make the whole job or certain stages run inside docker - triggers { - issueCommentTrigger('^(retest|npm publish)$') - } - - options { - ansiColor('xterm') - timestamps() - timeout(time: 60, unit: 'MINUTES') // Kill the job if it gets stuck for too long - } - - stages { - stage('Initialise PR') { - when { changeRequest() } - steps { - githubNotify(status: 'PENDING', context: 'semantic-release', description: 'Not analysed') - } - } - - stage('Clone') { - steps { - checkout scm - } - } - - stage('Setup nodejs') { - steps { - useNodeJS() - } - } - - stage('npm install') { - steps { - sh 'which node; node -v' - sh 'which npm; npm -v' - sh 'npm install' - } - } - - stage('Build and test') { - steps { - sh "npm run validate" - } - post { - always { - checkstyle pattern:'build/checkstyle/*.xml', unstableTotalAll: '0', usePreviousBuildAsReference: true - junit testResults: 'build/junit/*.xml', allowEmptyResults: true - } - } - } - - stage('npm publish') { - when { - changeRequest() - expression { return pullRequest.comments.any { it.body == 'npm publish' } } - } - environment { - NPM_TOKEN = credentials 'tradeshiftci-npm-readwrite-token' - NPM_CONFIG_REGISTRY = 'https://npm.pkg.github.com/' - } - steps { - npmPublish() - } - } - - stage('Semantic release') { - environment { - NPM_TOKEN = credentials 'tradeshiftci-npm-readwrite-token' - NPM_CONFIG_REGISTRY = 'https://npm.pkg.github.com/' - } - steps { - semanticVersion() - } - } - - stage('Sonarqube') { - // If you use Typescript - // sh 'npm install typescript' - when { - anyOf { - branch 'master' // Only run Sonarqube on master... - changeRequest() // ... and PRs - } - } - steps { - sonarqube() - } - } - } -} -