Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated extension builds #32

Merged
merged 12 commits into from Apr 10, 2018

Test moab makezip

  • Loading branch information
sammacbeth committed Apr 6, 2018
commit 924458af2c80fbe933972e6355a7d2aac3ea1539
@@ -1,6 +1,8 @@
FROM node:6.14.1

RUN npm install -g web-ext
#RUN npm install -g web-ext
RUN curl https://s3.amazonaws.com/cdncliqz/update/ghostery/moab/moab_2 > /bin/moab && \
chmod +x /bin/moab

ARG UID
ARG GID
@@ -4,6 +4,7 @@ node('docker') {
}

def img
def artifact

stage('Build Docker Image') {
img = docker.build('ghostery/build', '--build-arg UID=`id -u` --build-arg GID=`id -g` .')
@@ -12,10 +13,10 @@ node('docker') {
stage('Build Extension') {
img.inside() {
withCache {
// rerun postinstall for vendor-copy
sh 'npm run postinstall'
sh 'npm run build.prod'
sh 'web-ext build --overwrite-dest'
sh 'rm -r build/'
sh 'moab makezip'
// get the name of the firefox build
artifact = sh(returnStdout: true, script: 'ls build/ | grep firefox').trim()
}
}
}
@@ -27,7 +28,9 @@ node('docker') {
passwordVariable: 'AWS_SECRET_ACCESS_KEY',
usernameVariable: 'AWS_ACCESS_KEY_ID']]) {
echo "${env.BRANCH_NAME}/${env.BUILD_NUMBER}"
sh "aws s3 sync web-ext-artifacts/ s3://cdncliqz/update/ghostery/nightly_test/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/ --acl public-read"
def uploadLocation = "s3://cdncliqz/update/ghostery/nightly_test/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/${artifact}"
currentBuild.description = uploadLocation
sh "aws s3 cp build/${artifact} ${uploadLocation} --acl public-read"
}
}
}
ProTip! Use n and p to navigate between commits in a pull request.