Commit 2ba4fe29 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Rename 1st iteration: configuration, build scripting etc.

parent 351e0a89
......@@ -5,10 +5,10 @@ out
builds/
commands/helpers/archive.zip
executors/docker/bindata.go
dockerfiles/alpine/gitlab-ci-multi-runner-linux-amd64
dockerfiles/alpine/gitlab-runner-linux-amd64
dockerfiles/alpine/checksums.sha256
dockerfiles/build/gitlab-runner-helper
dockerfiles/ubuntu/gitlab-ci-multi-runner_amd64.deb
dockerfiles/ubuntu/gitlab-runner_amd64.deb
dockerfiles/ubuntu/checksums.sha256
.idea/
.editorconfig
......@@ -17,4 +17,4 @@ artifacts
tmp/gitlab-test
# Ignore the generated binary
gitlab-ci-multi-runner
./gitlab-runner
......@@ -7,7 +7,7 @@ stages:
- release
variables:
CI_IMAGE: registry.gitlab.com/gitlab-org/gitlab-ci-multi-runner:ci-1.8
CI_IMAGE: registry.gitlab.com/gitlab-org/gitlab-runner:ci-1.8
GOROOT: /usr/local/go
image: $CI_IMAGE
......@@ -19,7 +19,7 @@ before_script:
services:
- docker:dind
variables:
CI_IMAGE: registry.gitlab.com/gitlab-org/gitlab-ci-multi-runner:ci-1.8
CI_IMAGE: registry.gitlab.com/gitlab-org/gitlab-runner:ci-1.8
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375
tags:
......@@ -112,12 +112,12 @@ integration windows:
stage: test
before_script:
- $GODIR = "$env:GOPATH\src\gitlab.com\gitlab-org"
- $target_path = "$GODIR\gitlab-ci-multi-runner"
- $target_path = "$GODIR\gitlab-runner"
- $current_path = pwd
- md $GODIR -Force
- if (Test-Path $target_path) { cmd /c rmdir $target_path }
- cmd /c mklink /D $target_path $current_path
- cd $GODIR\gitlab-ci-multi-runner
- cd $GODIR\gitlab-runner
script:
- $packages = (go list ./... | findstr -v "\/vendor\/" | Out-String | %{$_ -replace "\r\n"," "})
- $testCommand = "go test $packages"
......@@ -125,7 +125,7 @@ integration windows:
- if ( $LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
allow_failure: true
only:
- /.*/@gitlab-org/gitlab-ci-multi-runner
- /.*/@gitlab-org/gitlab-runner
tags:
- integration
- windows
......@@ -208,32 +208,32 @@ package-rpm: *packages
.release_development: &release_development
only:
- branches@gitlab-org/gitlab-ci-multi-runner
- branches@gitlab-org/gitlab-runner
except:
- master@gitlab-org/gitlab-ci-multi-runner
- master@gitlab-org/gitlab-runner
.release_bleeding_edge: &release_bleeding_edge
only:
- master@gitlab-org/gitlab-ci-multi-runner
- /\Av[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+\Z/@gitlab-org/gitlab-ci-multi-runner
- master@gitlab-org/gitlab-runner
- /\Av[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+\Z/@gitlab-org/gitlab-runner
.release_stable: &release_stable
only:
- /\Av[0-9]+\.[0-9]+\.[0-9]+\Z/@gitlab-org/gitlab-ci-multi-runner
- /\Av[0-9]+\.[0-9]+\.[0-9]+\Z/@gitlab-org/gitlab-runner
development S3:
<<: *release_s3
<<: *release_development
environment:
name: development/s3/${CI_COMMIT_REF_NAME}
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
url: https://gitlab-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
bleeding edge S3:
<<: *release_s3
<<: *release_bleeding_edge
environment:
name: bleeding_edge/s3
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
url: https://gitlab-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
bleeding edge packagecloud:
<<: *release_packagecloud
......@@ -254,14 +254,14 @@ stable S3:
<<: *release_stable
environment:
name: stable/s3
url: https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
url: https://gitlab-runner-downloads.s3.amazonaws.com/${CI_COMMIT_REF_NAME}/index.html
stable packagecloud:
<<: *release_packagecloud
<<: *release_stable
environment:
name: stable/packagecloud
url: https://packages.gitlab.com/runner/gitlab-ci-multi-runner
url: https://packages.gitlab.com/runner/gitlab-runner
stable docker images:
<<: *release_docker_images
......
......@@ -2,11 +2,11 @@
Contributions are welcome!
The official repository for this project is on [GitLab.com](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner).
The official repository for this project is on [GitLab.com](https://gitlab.com/gitlab-org/gitlab-runner).
* [Development](docs/development/README.md)
* [Issues](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues)
* [Merge Requests](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests)
* [Issues](https://gitlab.com/gitlab-org/gitlab-runner/issues)
* [Merge Requests](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests)
## Contributor license agreement
......
......@@ -2,8 +2,8 @@
FROM golang:1.8
# Copy sources
COPY . /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner
WORKDIR /go/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner
COPY . /go/src/gitlab.com/gitlab-org/gitlab-runner
WORKDIR /go/src/gitlab.com/gitlab-org/gitlab-runner
# Fetch tags (to have proper versioning)
RUN git fetch --tags || true
......@@ -11,8 +11,8 @@ RUN git fetch --tags || true
# Build development version
ENV BUILD_PLATFORMS -osarch=linux/amd64
RUN make && \
ln -s $(pwd)/out/binaries/gitlab-ci-multi-runner-linux-amd64 /usr/bin/gitlab-ci-multi-runner && \
ln -s $(pwd)/out/binaries/gitlab-ci-multi-runner-linux-amd64 /usr/bin/gitlab-runner
ln -s $(pwd)/out/binaries/gitlab-runner-linux-amd64 /usr/bin/gitlab-ci-multi-runner && \
ln -s $(pwd)/out/binaries/gitlab-runner-linux-amd64 /usr/bin/gitlab-runner
# Install runner
RUN packaging/root/usr/share/gitlab-runner/post-install
......
NAME ?= gitlab-ci-multi-runner
NAME ?= gitlab-runner
PACKAGE_NAME ?= $(NAME)
PACKAGE_CONFLICT ?= $(PACKAGE_NAME)-beta
export VERSION := $(shell ./ci/version)
REVISION := $(shell git rev-parse --short=8 HEAD || echo unknown)
BRANCH := $(shell git show-ref | grep "$(REVISION)" | grep -v HEAD | awk '{print $$2}' | sed 's|refs/remotes/origin/||' | sed 's|refs/heads/||' | sort | head -n 1)
......@@ -46,7 +45,7 @@ help:
# make version - show information about current version
#
# Development commands:
# make install - install the version suitable for your OS as gitlab-ci-multi-runner
# make install - install the version suitable for your OS as gitlab-runner
# make docker - build docker dependencies
#
# Testing commands:
......@@ -111,7 +110,7 @@ else
$(warning WARNING: and remove out/docker/prebuilt-x86_64.tar.xz)
$(warning =============================================)
curl -o out/docker/prebuilt-x86_64.tar.xz \
https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-x86_64.tar.xz
https://gitlab-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-x86_64.tar.xz
endif
out/docker/prebuilt-arm.tar.xz: $(GO_FILES)
......@@ -139,7 +138,7 @@ else
$(warning WARNING: and remove out/docker/prebuilt-arm.tar.xz)
$(warning =============================================)
curl -o out/docker/prebuilt-arm.tar.xz \
https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-arm.tar.xz
https://gitlab-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-arm.tar.xz
endif
executors/docker/bindata.go: out/docker/prebuilt-x86_64.tar.xz out/docker/prebuilt-arm.tar.xz
......@@ -268,14 +267,16 @@ package-deb-fpm:
--deb-compression bzip2 \
--after-install packaging/scripts/postinst.deb \
--before-remove packaging/scripts/prerm.deb \
--url https://gitlab.com/gitlab-org/gitlab-ci-multi-runner \
--url https://gitlab.com/gitlab-org/gitlab-runner \
--description "GitLab Runner" \
-m "GitLab Inc. <support@gitlab.com>" \
--license "MIT" \
--vendor "GitLab Inc." \
--conflicts $(PACKAGE_CONFLICT) \
--provides gitlab-runner \
--replaces gitlab-runner \
--conflicts $(PACKAGE_NAME)-beta \
--conflicts gitlab-ci-multi-runner \
--conflicts gitlab-ci-multi-runner-beta \
--provides gitlab-ci-multi-runner \
--replaces gitlab-ci-multi-runner \
--depends ca-certificates \
--depends git \
--depends curl \
......@@ -283,7 +284,7 @@ package-deb-fpm:
--deb-suggests docker-engine \
-a $(PACKAGE_ARCH) \
packaging/root/=/ \
out/binaries/$(NAME)-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
out/binaries/$(NAME)-linux-$(ARCH)=/usr/bin/gitlab-runner
package-rpm-fpm:
@mkdir -p out/rpm/
......@@ -293,20 +294,22 @@ package-rpm-fpm:
--force \
--after-install packaging/scripts/postinst.rpm \
--before-remove packaging/scripts/prerm.rpm \
--url https://gitlab.com/gitlab-org/gitlab-ci-multi-runner \
--url https://gitlab.com/gitlab-org/gitlab-runner \
--description "GitLab Runner" \
-m "GitLab Inc. <support@gitlab.com>" \
--license "MIT" \
--vendor "GitLab Inc." \
--conflicts $(PACKAGE_CONFLICT) \
--provides gitlab-runner \
--replaces gitlab-runner \
--conflicts $(PACKAGE_NAME)-beta \
--conflicts gitlab-ci-multi-runner \
--conflicts gitlab-ci-multi-runner-beta \
--provides gitlab-ci-multi-runner \
--replaces gitlab-ci-multi-runner \
--depends git \
--depends curl \
--depends tar \
-a $(PACKAGE_ARCH) \
packaging/root/=/ \
out/binaries/$(NAME)-linux-$(ARCH)=/usr/bin/gitlab-ci-multi-runner
out/binaries/$(NAME)-linux-$(ARCH)=/usr/bin/gitlab-runner
packagecloud: packagecloud-deps packagecloud-deb packagecloud-rpm
......
web: gitlab-ci-multi-runner run-single -addr=":$PORT" -builds-dir="/tmp"
web: gitlab-runner run-single -addr=":$PORT" -builds-dir="/tmp"
......@@ -6,7 +6,7 @@ It runs tests and sends the results to GitLab.
continuous integration service included with GitLab that coordinates the testing.
The old name of this project was GitLab CI Multi Runner but please use "GitLab Runner" (without CI) from now on.
![Build Status](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/badges/master/build.svg)
![Build Status](https://gitlab.com/gitlab-org/gitlab-runner/badges/master/build.svg)
## Runner and GitLab CE/EE compatibility
......@@ -54,14 +54,14 @@ Let's assume that you want to install version 1.11.2 of Runner:
```bash
# for DEB based systems
root@host:# apt-get install gitlab-ci-multi-runner=1.11.2
root@host:# apt-get install gitlab-runner=10.0.0
# for RPM based systems
root@host:# yum install gitlab-ci-multi-runner-1.11.2-1
root@host:# yum install gitlab-runner-10.0.0-1
```
1. If you need to install Runner manually, you can look for a propper package/binary
at https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/v1.11.2/index.html
at https://gitlab-runner-downloads.s3.amazonaws.com/v10.0.0/index.html
## Release process
......
# Bootstrap golang runner
GODIR=$GOPATH/src/gitlab.com/gitlab-org/gitlab-ci-multi-runner
GODIR=$GOPATH/src/gitlab.com/gitlab-org/gitlab-runner
mkdir -p "$(dirname "$GODIR")"
ln -sfv "$(pwd -P)" "$GODIR"
cd "$GODIR"
......@@ -82,9 +82,9 @@ logout() {
_docker logout "${1}"
}
cp out/deb/gitlab-ci-multi-runner_amd64.deb dockerfiles/ubuntu/
cp out/deb/gitlab-runner_amd64.deb dockerfiles/ubuntu/
cp dockerfiles/checksums.sha256 dockerfiles/ubuntu
cp out/binaries/gitlab-ci-multi-runner-linux-amd64 dockerfiles/alpine
cp out/binaries/gitlab-runner-linux-amd64 dockerfiles/alpine
cp dockerfiles/checksums.sha256 dockerfiles/alpine
build "gitlab/gitlab-runner:ubuntu-${ref_tag}" dockerfiles/ubuntu
......
......@@ -9,7 +9,7 @@ import (
"github.com/urfave/cli"
)
var NAME = "gitlab-ci-multi-runner"
var NAME = "gitlab-runner"
var VERSION = "dev"
var REVISION = "HEAD"
var BRANCH = "HEAD"
......
......@@ -11,10 +11,10 @@ RUN apk add --update \
wget
COPY gitlab-ci-multi-runner-linux-amd64 /usr/bin/gitlab-ci-multi-runner
COPY gitlab-runner-linux-amd64 /usr/bin/gitlab-runner
COPY checksums.sha256 /tmp/
RUN chmod +x /usr/bin/gitlab-ci-multi-runner && \
ln -s /usr/bin/gitlab-ci-multi-runner /usr/bin/gitlab-runner && \
RUN chmod +x /usr/bin/gitlab-runner && \
ln -s /usr/bin/gitlab-runner /usr/bin/gitlab-ci-multi-runner && \
gitlab-runner --version && \
mkdir -p /etc/gitlab-runner/certs && \
chmod -R 700 /etc/gitlab-runner && \
......
#!/bin/bash
# gitlab-ci-multi-runner data directory
# gitlab-runner data directory
DATA_DIR="/etc/gitlab-runner"
CONFIG_FILE=${CONFIG_FILE:-$DATA_DIR/config.toml}
# custom certificate authority path
......@@ -18,5 +18,5 @@ if [ -f "${CA_CERTIFICATES_PATH}" ]; then
cmp -s "${CA_CERTIFICATES_PATH}" "${LOCAL_CA_PATH}" || update_ca
fi
# launch gitlab-ci-multi-runner passing all arguments
exec gitlab-ci-multi-runner "$@"
# launch gitlab-runner passing all arguments
exec gitlab-runner "$@"
......@@ -6,14 +6,14 @@ RUN apt-get update -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY gitlab-ci-multi-runner_amd64.deb /tmp/
COPY gitlab-runner_amd64.deb /tmp/
COPY checksums.sha256 /tmp/
RUN dpkg -i /tmp/gitlab-ci-multi-runner_amd64.deb; \
RUN dpkg -i /tmp/gitlab-runner_amd64.deb; \
apt-get update && \
apt-get -f install -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm /tmp/gitlab-ci-multi-runner_amd64.deb && \
rm /tmp/gitlab-runner_amd64.deb && \
gitlab-runner --version && \
mkdir -p /etc/gitlab-runner/certs && \
chmod -R 700 /etc/gitlab-runner && \
......
#!/bin/bash
# gitlab-ci-multi-runner data directory
# gitlab-runner data directory
DATA_DIR="/etc/gitlab-runner"
CONFIG_FILE=${CONFIG_FILE:-$DATA_DIR/config.toml}
# custom certificate authority path
......@@ -18,5 +18,5 @@ if [ -f "${CA_CERTIFICATES_PATH}" ]; then
cmp --silent "${CA_CERTIFICATES_PATH}" "${LOCAL_CA_PATH}" || update_ca
fi
# launch gitlab-ci-multi-runner passing all arguments
exec gitlab-ci-multi-runner "$@"
# launch gitlab-runner passing all arguments
exec gitlab-runner "$@"
gitlab-runner
\ No newline at end of file
gitlab-ci-multi-runner
\ No newline at end of file
......@@ -34,13 +34,21 @@ if [ -f $HOMEDIR/config.toml ] && [ ! -f /etc/gitlab-runner/config.toml ]; then
fi
# uninstall old service
gitlab-ci-multi-runner stop --service="gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner uninstall --service="gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
if gitlab-runner status --service="gitlab-runner"; then
gitlab-runner stop --service="gitlab-runner" >/dev/null 2>/dev/null || :
gitlab-runner uninstall --service="gitlab-runner" >/dev/null 2>/dev/null || :
fi
# if migrating from pre 10.0.0 installation
if gitlab-runner status --service="gitlab-ci-multi-runner"; then
gitlab-runner stop --service="gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
gitlab-runner uninstall --service="gitlab-ci-multi-runner" >/dev/null 2>/dev/null || :
fi
# re-register runner
gitlab-ci-multi-runner stop >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner uninstall >/dev/null 2>/dev/null || :
gitlab-ci-multi-runner install --user=$USER --working-directory=$HOMEDIR
gitlab-runner stop >/dev/null 2>/dev/null || :
gitlab-runner uninstall >/dev/null 2>/dev/null || :
gitlab-runner install --user=$USER --working-directory=$HOMEDIR
# start runner service
gitlab-ci-multi-runner start || :
gitlab-runner start || :
#!/bin/sh
gitlab-ci-multi-runner stop >/dev/null 2>/dev/null
gitlab-ci-multi-runner uninstall >/dev/null 2>/dev/null
gitlab-runner stop >/dev/null 2>/dev/null
gitlab-runner uninstall >/dev/null 2>/dev/null
exit 0
......@@ -24,7 +24,7 @@ end
exclude_mr_ids = []
exclude_mr_ids = ENV['EXCLUDE_MR_IDS'].split(',').map(&:to_i) if ENV['EXCLUDE_MR_IDS']
project_id = ENV['PROJECT_ID'] || 'gitlab-org%2Fgitlab-ci-multi-runner'
project_id = ENV['PROJECT_ID'] || 'gitlab-org%2Fgitlab-runner'
base_url = URI("https://gitlab.com/api/v3/projects/#{project_id}/merge_requests/")
merge_requests = {}
......
......@@ -28,8 +28,8 @@ case $IMAGE in
docker exec $ID apt-get update -y
docker exec $ID apt-get install -y curl procps
if [[ -n "$UPGRADE" ]]; then
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.deb.sh | docker exec -i $ID bash
docker exec $ID apt-get install -y gitlab-ci-multi-runner
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | docker exec -i $ID bash
docker exec $ID apt-get install -y gitlab-runner
fi
if ! docker exec $ID dpkg -i "/$(basename $INSTALL_FILE)"
then
......@@ -41,8 +41,8 @@ case $IMAGE in
centos:*)
docker exec $ID yum install -y curl sysvinit-tools
if [[ -n "$UPGRADE" ]]; then
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | docker exec -i $ID bash
docker exec $ID yum install -y gitlab-ci-multi-runner
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | docker exec -i $ID bash
docker exec $ID yum install -y gitlab-runner
fi
docker exec $ID yum localinstall -y "/$(basename $INSTALL_FILE)"
;;
......
......@@ -4,7 +4,7 @@ set -e
USER="$1"
status() {
pidof gitlab-ci-multi-runner
pidof gitlab-runner
}
echo Checking existence of $USER...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment