Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nginx-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Server Tools
nginx-build
Commits
966af867
Commit
966af867
authored
6 years ago
by
Erick Hitter
Browse files
Options
Downloads
Patches
Plain Diff
MVP build process
parent
d2772991
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
.gitlab-ci.yml
+32
-0
32 additions, 0 deletions
.gitlab-ci.yml
scripts/build.sh
+108
-0
108 additions, 0 deletions
scripts/build.sh
with
142 additions
and
0 deletions
.gitignore
0 → 100644
+
2
−
0
View file @
966af867
.idea/
*.iml
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
0 → 100644
+
32
−
0
View file @
966af867
image
:
containers.ethitter.com:443/docker/images/debian:jessie
stages
:
-
test_pre_build
-
build
-
test
-
deploy
test_build_script
:
stage
:
test_pre_build
image
:
koalaman/shellcheck-alpine:latest
script
:
-
shellcheck ./scripts/build.sh
test_build_nginx
:
stage
:
build
script
:
-
chmod +x ./scripts/build.sh
-
./scripts/build.sh
except
:
-
master
build_nginx
:
stage
:
build
script
:
-
chmod +x ./scripts/build.sh
-
./scripts/build.sh
artifacts
:
paths
:
-
src/nginx/objs/nginx
only
:
-
master
This diff is collapsed.
Click to expand it.
scripts/build.sh
0 → 100644
+
108
−
0
View file @
966af867
#!/usr/bin/env bash
set
-e
set
-x
# Log when the build occurred.
date
echo
""
# Capture our starting point for easier navigation.
OG_DIR
=
$(
pwd
)
export
OG_DIR
echo
"
$OG_DIR
"
echo
""
# Common paths.
NGINX_SRC_DIR
=
"
$OG_DIR
/src/nginx"
export
NGINX_SRC_DIR
mkdir
-p
"
$NGINX_SRC_DIR
"
OPENSSL_DIR
=
"
$OG_DIR
/src/openssl"
export
OPENSSL_DIR
NGX_BROTLI_DIR
=
"
$OG_DIR
/src/ngx_brotli"
export
NGX_BROTLI_DIR
NGINX_CT_DIR
=
"
$OG_DIR
/src/nginx_ct"
export
NGINX_CT_DIR
# Dependency: OpenSSL
echo
""
echo
"DEPENDENCY: OpenSSL AT
$OPENSSL_TAG
"
git clone
-q
--recursive
--depth
1 https://github.com/openssl/openssl.git
-b
"
$OPENSSL_TAG
"
"
$OPENSSL_DIR
"
# Dependency: ngx_brotli (no tagged releases)
echo
""
echo
"DEPENDENCY: ngx_brotli"
git clone
-q
--recursive
--depth
1 https://github.com/google/ngx_brotli.git
"
$NGX_BROTLI_DIR
"
# Dependency: nginx-ct
echo
""
echo
"DEPENDENCY: nginx-ct AT
$NGINX_CT_TAG
"
git clone
-q
--recursive
--depth
1 https://github.com/grahamedgecombe/nginx-ct.git
-b
"
$NGINX_CT_TAG
"
"
$NGINX_CT_DIR
"
# nginx from git mirror
echo
""
echo
"CLONING nginx FROM GIT MIRROR AT
$NGINX_TAG
"
git clone
-q
--recursive
--depth
1 https://github.com/nginx/nginx.git
-b
"
$NGINX_TAG
"
"
$NGINX_SRC_DIR
"
# Configure nginx
echo
""
echo
"CONFIGURE NGINX"
cd
"
$NGINX_SRC_DIR
"
||
exit
1
./auto/configure
\
--prefix
=
/etc/nginx
\
--sbin-path
=
/usr/sbin/nginx
\
--conf-path
=
/etc/nginx/nginx.conf
\
--error-log-path
=
/var/log/nginx/error.log
\
--http-log-path
=
/var/log/nginx/access.log
\
--pid-path
=
/var/run/nginx.pid
\
--lock-path
=
/var/run/nginx.lock
\
--http-client-body-temp-path
=
/var/cache/nginx/client_temp
\
--http-proxy-temp-path
=
/var/cache/nginx/proxy_temp
\
--http-fastcgi-temp-path
=
/var/cache/nginx/fastcgi_temp
\
--http-uwsgi-temp-path
=
/var/cache/nginx/uwsgi_temp
\
--http-scgi-temp-path
=
/var/cache/nginx/scgi_temp
\
--user
=
www-data
\
--group
=
www-data
\
--with-http_ssl_module
\
--with-http_realip_module
\
--with-http_addition_module
\
--with-http_sub_module
\
--with-http_dav_module
\
--with-http_flv_module
\
--with-http_mp4_module
\
--with-http_gunzip_module
\
--with-http_gzip_static_module
\
--with-http_random_index_module
\
--with-http_secure_link_module
\
--with-http_stub_status_module
\
--with-http_auth_request_module
\
--with-threads
\
--with-stream
\
--with-stream_ssl_module
\
--with-http_slice_module
\
--with-mail
\
--with-mail_ssl_module
\
--with-file-aio
\
--with-http_v2_module
\
--with-openssl
=
"
$OPENSSL_DIR
"
\
--add-module
=
"
$NGX_BROTLI_DIR
"
\
--add-module
=
"
$NGINX_CT_DIR
"
# Build nginx
echo
""
echo
"BUILDING NGINX"
echo
"Using
$(
nproc
)
jobs"
make
if
[[
!
-f
"
$NGINX_SRC_DIR
/objs/nginx"
]]
;
then
exit
1
fi
# Verify build works
cd
"
$NGINX_SRC_DIR
/objs"
||
exit
1
./nginx
-V
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment