diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000..4807db7ead414 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +#Datadog nanoc + Jenkins Dockerfile + +FROM quay.io/datadog/jenkins-slave +MAINTAINER Ilan Rabinovitch + +# Install depdencies +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git python-pip nodejs +RUN pip install awscli + + +COPY Gemfile Gemfile.lock /home/jenkins/ +RUN mkdir /cache +RUN chown jenkins:jenkins /home/jenkins/Gemfile /home/jenkins/Gemfile.lock /cache + +USER jenkins +WORKDIR /home/jenkins + +RUN /bin/bash -l -c "bundle config --global path /cache/" +RUN /bin/bash -l -c "gem install bundler" +RUN /bin/bash -l -c "bundle install" + +USER root diff --git a/Gemfile b/Gemfile index a28a59cb31f74..d6e5d132ae112 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,7 @@ gem 'video_info' gem 'sassc' gem 'nanoc-cachebuster' gem 'octokit' +gem 'therubyracer', :platforms => :ruby group :development do gem 'guard-nanoc' gem 'guard-livereload' diff --git a/Rakefile b/Rakefile index f0eb3aa21225b..3740404ee983c 100644 --- a/Rakefile +++ b/Rakefile @@ -30,21 +30,21 @@ task predeploy: [:clean, :compile, :checks] namespace :release do desc 'Build and release the site to prod (http://docs.datadoghq.com)' - task prod: [:clean, :compile, :"deploy:prod"] + task prod: [:clean, :compile, :checks, :"deploy:prod"] desc 'Build and release the site to staging (http://docs-staging.datadoghq.com)' - task staging: [:clean, :compile, :"deploy:staging"] + task staging: [:clean, :compile, :checks, :"deploy:staging"] end namespace :deploy do desc 'Deploy to prod S3 bucket; Should be used by `rake release:prod`' task :prod do - sh('cd output && s3cmd -c ~/.docs-deploy.prod sync --delete-removed --no-mime-magic --guess-mime-type . s3://docs.datadoghq.com') + sh('cd output && aws s3 sync --delete --size-only . s3://datadog-docs-prod --acl public-read') end desc 'Deploy to staging S3 bucket; Should be used by `rake release:staging`' task :staging do - sh("cd output && s3cmd -c ~/.docs-deploy.prod sync --delete-removed --no-mime-magic --guess-mime-type . s3://docs-staging.datadoghq.com") + sh("cd output && aws s3 sync --delete --size-only . s3://datadog-docs-staging --acl public-read") end end