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

Add support for <= v0.12 releases #261

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup/centos5/resources/jenkins.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ JENKINS_SLAVE_JAR="/home/iojs/slave.jar"
JENKINS_SLAVE_LOG="/home/iojs/$NAME.log"
JENKINS_SECRET="{{secret}}"
JENKINS_SLAVE_ARGS="-jnlpUrl https://ci.nodejs.org/computer/iojs-digitalocean-centos6-64-{{id}}/slave-agent.jnlp -secret $JENKINS_SECRET"
JENKINS_ENV="DESTCPU={{arch}} ARCH={{arch}} OSTYPE=linux-gnu NODE_COMMON_PIPE=/home/iojs/test.pipe"
JENKINS_ENV="PRE_1_PATH=/home/iojs/bin:$PATH JOBS=$(getconf _NPROCESSORS_ONLN) DESTCPU={{arch}} ARCH={{arch}} OSTYPE=linux-gnu NODE_COMMON_PIPE=/home/iojs/test.pipe"

This comment was marked as off-topic.

This comment was marked as off-topic.

JENKINS_PATH="/opt/rh/devtoolset-2/root/usr/bin"
4 changes: 4 additions & 0 deletions setup/www/ansible-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ dist_users:
- fishrock123
- jasnell
- rvagg
libuv_users:
- saghul
- piscisaureus
- bnoordhuis
packages:
- iojs
- nginx
Expand Down
27 changes: 27 additions & 0 deletions setup/www/resources/config/libuv.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server {
listen 80;
listen dist.libuv.org:80;
server_name dist.libuv.org;

keepalive_timeout 60;
server_tokens off;

resolver 8.8.4.4 8.8.8.8 valid=300s;
resolver_timeout 10s;

add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

access_log /var/log/nginx/libuv.org-access.log nodejs;
error_log /var/log/nginx/libuv.org-error.log;

gzip on;
gzip_static on;
gzip_disable "MSIE [1-6]\.";
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

root /home/libuv/dist;
default_type text/plain;
index index.html;
autoindex on;
}
2 changes: 2 additions & 0 deletions setup/www/tasks/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
with_items:
- nodejs.org
- iojs.org
- libuv.org
tags: nginx

- name: nginx | Create nginx config symlinks
Expand All @@ -16,6 +17,7 @@
with_items:
- { src: nodejs.org, dest: 00-nodejs.org }
- { src: iojs.org, dest: 01-iojs.org }
- { src: libuv.org, dest: 02-libuv.org }
tags: nginx

- name: nginx | Make /etc/nginx/ssl/
Expand Down
10 changes: 8 additions & 2 deletions setup/www/tasks/site-setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@
- { regexp: '\{\{cdn_api_nodejs_id\}\}', replace: '{{ cdn_api_nodejs_id }}' }
tags: setup

- name: Site Setup | Add cdn-purge.sh to crontab
- name: Site Setup | Add periodic tasks to crontab
lineinfile:
dest: /etc/crontab
line: '* * * * * root /home/nodejs/cdn-purge.sh'
line: "{{ item }}"
with_items:
- '*/5 * * * * dist /home/staging/tools/promote/promote_nightly.sh nodejs'
- '*/5 * * * * dist /home/staging/tools/promote/promote_nightly.sh iojs'
- '* * * * * nodejs /home/nodejs/check-build-site.sh nodejs'
- '* * * * * nodejs /home/nodejs/check-build-site.sh iojs'
- '* * * * * root /home/nodejs/cdn-purge.sh'
tags: setup

- name: Site Setup | Copy queue-cdn-purge.sh script
Expand Down
28 changes: 27 additions & 1 deletion setup/www/tasks/user.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
- name: User | Add nodejs, dist, staging users
- name: User | Add nodejs, dist, staging, libuv users
user:
name: "{{ item }}"
shell: /bin/bash
with_items:
- nodejs
- dist
- staging
- libuv
tags: user

- name: User | Add dist to staging group
Expand All @@ -28,6 +29,14 @@
with_items: dist_users
tags: user

- name: User | Download pubkeys (libuv_users)
get_url:
url: https://github.com/{{ item }}.keys
dest: /tmp/{{ item }}.keys
delegate_to: 127.0.0.1
with_items: libuv_users
tags: user

- name: User | Create authorized_keys for root
authorized_key:
user: "root"
Expand Down Expand Up @@ -56,6 +65,13 @@
with_items: dist_users
tags: user

- name: User | Create authorized_keys for libuv (libuv_users)
authorized_key:
user: "libuv"
key: "{{ lookup('file', '/tmp/' + item + '.keys') }}"
with_items: libuv_users
tags: user

- name: User | Set up dist/{nodejs,iojs}/ directories
file:
path: /home/dist/{{ item }}
Expand Down Expand Up @@ -101,3 +117,13 @@
- iojs/nightly
- iojs/release
tags: user

- name: User | Set up libuv directories
file:
path: /home/libuv/{{ item }}
state: directory
mode: 0755
owner: libuv
with_items:
- dist
tags: user
5 changes: 4 additions & 1 deletion setup/www/tools/promote/_resha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ if [ "X${version}" == "X" ]; then
exit 1
fi

(cd "${dstdir}/${version}" && shasum -a256 $(ls node* iojs* win-*/* 2> /dev/null) > SHASUMS256.txt) || exit 1
(cd "${dstdir}/${version}" && shasum -a256 $(ls node* openssl* iojs* win-*/* x64/* 2> /dev/null) > SHASUMS256.txt) || exit 1

This comment was marked as off-topic.

This comment was marked as off-topic.

if [[ $version =~ ^v[0] ]]; then
(cd "${dstdir}/${version}" && shasum $(ls node* openssl* x64/* 2> /dev/null) > SHASUMS.txt) || exit 1
fi
echo "${dstdir}/${version}/SHASUMS256.txt"
/home/dist/tools/dist-indexer/dist-indexer.js --dist $dstdir --indexjson ${dstdir}/index.json --indextab ${dstdir}/index.tab
find "${dstdir}/${version}" -type f -exec chmod 644 '{}' \;
Expand Down
12 changes: 6 additions & 6 deletions setup/www/tools/promote/promote_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,7 @@ site=$1
__dirname="$(CDPATH= cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [ "X$site" != "Xiojs" ] && [ "X$site" != "Xnodejs" ]; then
echo "Usage: promote_nightly.sh < iojs | nodejs > <version>"
exit 1
fi

if [ "X$2" == "X" ]; then
echo "Usage: promote_nightly.sh < iojs | nodejs > <version>"
echo "Usage: promote_nightly.sh < iojs | nodejs >"

This comment was marked as off-topic.

exit 1
fi

Expand All @@ -27,3 +22,8 @@ srcdir=$next_nightly_srcdir
dstdir=$next_nightly_dstdir

. ${__dirname}/_promote.sh $site

srcdir=$rc_srcdir

This comment was marked as off-topic.

dstdir=$rc_dstdir

. ${__dirname}/_promote.sh $site
12 changes: 9 additions & 3 deletions setup/www/tools/promote/settings
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
staging_rootdir=/home/staging/${site}/
dist_rootdir=/home/dist/${site}/
nightly_srcdir=${staging_rootdir}nightly
next_nightly_srcdir=${staging_rootdir}next-nightly

release_srcdir=${staging_rootdir}release
release_dstdir=${dist_rootdir}release

This comment was marked as off-topic.


rc_srcdir=${staging_rootdir}custom
rc_dstdir=${dist_rootdir}rc

nightly_srcdir=${staging_rootdir}nightly
nightly_dstdir=${dist_rootdir}nightly

next_nightly_srcdir=${staging_rootdir}next-nightly
next_nightly_dstdir=${dist_rootdir}next-nightly
release_dstdir=${dist_rootdir}release