Skip to content
Snippets Groups Projects
Commit 4a8086ae authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Merge branch 'workhorse-gopath' into 'master'

Use a GOPATH to install gitlab-workhorse

This allows you to use more Go tools during development.

See merge request !173
parents f4b0b7d3 5eca30eb
No related branches found
No related tags found
1 merge request!173Use a GOPATH to install gitlab-workhorse
gitlab-shell/
.ssh/
gitlab-satellites/
repositories/
gitlab/
gitlab-ci/
gitlab-runner/
gitlab-ci-multi-runner/
Procfile
postgresql/data
postgresql/.s.*
postgresql-replica/data
postgresql-replica/.s.*
redis/*.conf
/gitlab-shell/
/.ssh/
/gitlab-satellites/
/repositories/
/gitlab/
/Procfile
/postgresql/data
/postgresql/.s.*
/postgresql-replica/data
/postgresql-replica/.s.*
/redis/*.conf
.bundle/
gitlab-openldap/bin/
gitlab-openldap/etc/
gitlab-openldap/include/
gitlab-openldap/lib/
gitlab-openldap/libexec/
gitlab-openldap/openldap-2.4.40.tgz
gitlab-openldap/openldap-2.4.40/
gitlab-openldap/sbin/
gitlab-openldap/share/
.vagrant/
gitlab-workhorse/
.vagrant_enabled
host
port
.ruby-version
localhost.*
influxdb/
grafana/
openssh/*_key
openssh/*.pub
openssh/sshd_config
nginx/logs
nginx/conf/nginx.conf
nginx/tmp
nginx/client_body_temp
nginx/fastcgi_temp
nginx/proxy_temp
nginx/scgi_temp
nginx/uwsgi_temp
.gitlab-shell-bundle
.gitlab-bundle
/gitlab-openldap/bin/
/gitlab-openldap/etc/
/gitlab-openldap/include/
/gitlab-openldap/lib/
/gitlab-openldap/libexec/
/gitlab-openldap/openldap-2.4.40.tgz
/gitlab-openldap/openldap-2.4.40/
/gitlab-openldap/sbin/
/gitlab-openldap/share/
/.vagrant/
/gitlab-workhorse/pkg
/gitlab-workhorse/bin
/gitlab-workhorse/src
/.vagrant_enabled
/host
/port
/.ruby-version
/localhost.*
/influxdb/
/grafana/
/openssh/*_key
/openssh/*.pub
/openssh/sshd_config
/nginx/logs
/nginx/conf/nginx.conf
/nginx/tmp
/nginx/client_body_temp
/nginx/fastcgi_temp
/nginx/proxy_temp
/nginx/scgi_temp
/nginx/uwsgi_temp
/.gitlab-shell-bundle
/.gitlab-bundle
gitlab_repo = https://gitlab.com/gitlab-org/gitlab-ce.git
gitlab_shell_repo = https://gitlab.com/gitlab-org/gitlab-shell.git
gitlab_workhorse_repo = https://gitlab.com/gitlab-org/gitlab-workhorse.git
gitlab_workhorse_clone_dir = gitlab-workhorse/src/gitlab.com/gitlab-org/gitlab-workhorse
gitlab_development_root = $(shell pwd)
postgres_bin_dir = $(shell pg_config --bindir)
postgres_replication_user = gitlab_replication
Loading
Loading
@@ -149,19 +150,21 @@ localhost.key:
openssl req -new -subj "/CN=localhost/" -x509 -days 365 -newkey rsa:2048 -nodes -keyout "localhost.key" -out "localhost.crt"
chmod 600 $@
 
gitlab-workhorse-setup: gitlab-workhorse/gitlab-workhorse
gitlab-workhorse-setup: gitlab-workhorse/bin/gitlab-workhorse
 
gitlab-workhorse-update: gitlab-workhorse/.git/pull
make
gitlab-workhorse-update: gitlab-workhorse/.git/pull gitlab-workhorse-clean-bin gitlab-workhorse/bin/gitlab-workhorse
 
gitlab-workhorse/gitlab-workhorse: gitlab-workhorse/.git
cd ${gitlab_development_root}/gitlab-workhorse && make
gitlab-workhorse-clean-bin:
rm -rf gitlab-workhorse/bin
 
gitlab-workhorse/.git:
git clone ${gitlab_workhorse_repo} gitlab-workhorse
gitlab-workhorse/bin/gitlab-workhorse: ${gitlab_workhorse_clone_dir}/.git
GOPATH=${gitlab_development_root}/gitlab-workhorse go install gitlab.com/gitlab-org/gitlab-workhorse/...
${gitlab_workhorse_clone_dir}/.git:
git clone ${gitlab_workhorse_repo} ${gitlab_workhorse_clone_dir}
 
gitlab-workhorse/.git/pull:
cd ${gitlab_development_root}/gitlab-workhorse && \
cd ${gitlab_workhorse_clone_dir} && \
git stash &&\
git checkout master &&\
git pull --ff-only
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ redis: exec redis-server /home/git/redis/redis.conf
postgresql: exec support/postgresql-signal-wrapper postgres -D /home/git/postgresql/data -k /home/git/postgresql -h ''
#postgresql-replica: exec support/postgresql-signal-wrapper postgres -D /home/git/postgresql-replica/data -k /home/git/postgresql-replica -h ''
#openldap: exec support/exec-cd gitlab-openldap libexec/slapd -F slapd.d -d2 -h "ldap://127.0.0.1:3890"
gitlab-workhorse: exec /usr/bin/env PATH=/home/git/gitlab-workhorse:$PATH gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr $host:$port -documentRoot /home/git/gitlab/public -developmentMode
gitlab-workhorse: exec /usr/bin/env PATH=/home/git/gitlab-workhorse/bin:$PATH gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr $host:$port -documentRoot /home/git/gitlab/public -developmentMode
rails-web: exec /usr/bin/env RAILS_ENV=development support/exec-cd gitlab bin/web start_foreground
rails-background-jobs: exec /usr/bin/env SIDEKIQ_LOG_ARGUMENTS=1 RAILS_ENV=development support/exec-cd gitlab bin/background_jobs start_foreground
#influxdb: exec influxdb/bin/influxd -config influxdb/influxdb.conf
Loading
Loading
# GitLab-Workhorse in GitLab Development Kit
In GDK, gitlab-workhorse is installed inside its own GOPATH rooted here.
To set GOPATH in your current shell for working on gitlab-workhorse run the following command:
```
. env.sh
```
The gitlab-workhorse repository is cloned into:
```
gitlab-workhorse/src/gitlab.com/gitlab-org/gitlab-workhorse
```
You can use the following shortcut to `cd` into that directory:
```
. cd.sh
```
## Cleaning up an old gitlab-workhorse checkout
If you installed GDK before we started using a GOPATH for gitlab-workhorse you now have a bit of a mess in this directory. You can clean up as follows. Start in the GitLab Development Kit root.
```
# in GDK root!!
mv gitlab-workhorse gitlab-workhorse.old.$(date +%s)
git checkout -- gitlab-workhorse
make
```
cd src/gitlab.com/gitlab-org/gitlab-workhorse
export GOPATH=$(pwd)
echo "GOPATH=$GOPATH"
export PATH=$(pwd)/bin:$PATH
echo "PATH=$PATH"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment