Skip to content

Commit

Permalink
Merge f0a135b into 0dfb39a
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegron committed Mar 8, 2021
2 parents 0dfb39a + f0a135b commit 816381f
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 4 deletions.
42 changes: 42 additions & 0 deletions .deployment.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"team_name": "searchuiextensions",
"product": "search-ui-extensions-cdn",
"general": {
"environments_order": {
"sequential": [
"dev",
"qa",
"prd"
]
},
"start_environment_automatically": true
},
"snyk": {
"org": "coveo-jsui",
"no_container_images": true
},
"observatory": {
"no_endpoint": true
},
"veracode": {
"no_scan": true
},
"phases": {
"s3": {
"dev": {
"bucket": "coveo-ndev-binaries"
},
"qa": {
"bucket": "coveo-nqa-binaries"
},
"prd": {
"bucket": "coveo-nprod-binaries"
},
"directory": "proda/StaticCDN",
"parameters": {
"acl": "public-read"
}
}
},
"deployment_config_version": 1
}
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ node_modules/**/*
.prettierignore
.snyk
.travis.yml
LICENSE
LICENSE
Jenkinsfile
.deployment.config
63 changes: 63 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
library(
identifier: "jenkins-common-lib@v1.6",
retriever: modernSCM(github(credentialsId: "github-app-dev", repository: "jenkins-common-lib", repoOwner: "coveo")),
changelog: false
)

pipeline {
agent {
label "linux && docker"
}
options {
timestamps()
ansiColor("xterm")
buildDiscarder(logRotator(numToKeepStr: "30"))
timeout(time: 1, unit: "HOURS")
}
environment {
NODE_IMAGE = "node:lts"
DEPLOY_PIPELINE_IMAGE = '458176070654.dkr.ecr.us-east-1.amazonaws.com/jenkins/deployment_package:v7'
}

stages {
stage("Build") {
steps {
withDockerContainer(image: NODE_IMAGE, args: "-u root:root") {
withCredentials([string(credentialsId: 'coveralls-search-ui-extensions', variable: 'COVERALLS_REPO_TOKEN')]) {
sh "apt-get update -qq"
sh "apt install -qq -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget"
sh "npm install"
sh "npm run lint"
sh "npm run build"
sh "npm run testCoverage"
}
}
}
}

stage("Test package") {
steps {
withCredentials([string(credentialsId: 'snyk_token', variable: 'SNYK_TOKEN')]) {
runSnyk(org: "coveo-jsui", directory: ".")
}
}
}

stage("Deploy on Tag") {
when {
tag pattern: "^v\\d+\\.\\d+\\.\\d+", comparator: "REGEXP"
}
steps {
sh "mkdir -p s3/${TAG_NAME}"
sh "cp -r bin/commonjs bin/css bin/es6 bin/img bin/typings s3/${TAG_NAME}"

script {
deploymentPackage.command(
command: "package create",
parameters: [ withDeploy: true ]
)
}
}
}
}
}
9 changes: 6 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 816381f

Please sign in to comment.