Skip to content

Commit

Permalink
push to new marketing account, move to docker deployments in jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
irabinovitch committed Aug 16, 2016
1 parent 9c790ea commit a325265
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#Datadog nanoc + Jenkins Dockerfile

FROM quay.io/datadog/jenkins-slave
MAINTAINER Ilan Rabinovitch <ilan@datadoghq.com>

# 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
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a325265

Please sign in to comment.