Release fixes (#1917)
This commit is contained in:
Родитель
8a1179cc84
Коммит
98cebc8129
|
@ -0,0 +1 @@
|
|||
tmp/
|
|
@ -89,6 +89,7 @@ def cmd(ctx, verbose):
|
|||
|
||||
# Load please config
|
||||
ctx.ensure_object(dict)
|
||||
ctx.obj['verbose'] = verbose
|
||||
ctx.obj['config'] = please_cli.project.ProjectConfig()
|
||||
|
||||
if ctx.invoked_subcommand is None:
|
||||
|
|
|
@ -88,6 +88,8 @@ def build(docker,
|
|||
nix_cache_public_urls = nix_cache_public_urls or secrets['NIX_CACHE_PUBLIC_URLS']
|
||||
|
||||
docker = please_cli.utils.which(docker)
|
||||
assert docker is not None, \
|
||||
'Docker is not available in your environment. Please use: nix-env -f /etc/nix/nixpkgs -iA docker'
|
||||
docker_file = os.path.join(please_cli.config.ROOT_DIR, 'nix', 'docker', 'Dockerfile')
|
||||
nixpkgs_json_file = os.path.join(please_cli.config.ROOT_DIR, 'nix', 'nixpkgs.json')
|
||||
nix_json_file = os.path.join(please_cli.config.ROOT_DIR, 'nix', 'nix.json')
|
||||
|
|
|
@ -79,7 +79,9 @@ import please_cli.utils
|
|||
'--interactive/--no-interactive',
|
||||
default=True,
|
||||
)
|
||||
def cmd(project,
|
||||
@click.pass_context
|
||||
def cmd(ctx,
|
||||
project,
|
||||
github_commit,
|
||||
task_group_id,
|
||||
nix_path_attributes,
|
||||
|
@ -125,6 +127,7 @@ def cmd(project,
|
|||
temp_files.append(temp_file)
|
||||
|
||||
outputs = []
|
||||
trace = ctx.obj['verbose'] > 1 and ['--show-trace'] or []
|
||||
for nix_path_attribute in nix_path_attributes:
|
||||
click.echo(' => Building {} ... '.format(nix_path_attribute), nl=False)
|
||||
|
||||
|
@ -147,7 +150,7 @@ def cmd(project,
|
|||
please_cli.config.ROOT_DIR + '/nix/default.nix',
|
||||
'-A', nix_path_attribute,
|
||||
'-o', output,
|
||||
] + nix_cache_secret_keys + argstrs,
|
||||
] + nix_cache_secret_keys + argstrs + trace,
|
||||
stream=True,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
|
|
|
@ -38,7 +38,7 @@ RUN apt-get -q update \
|
|||
#
|
||||
RUN groupadd app \
|
||||
&& useradd --create-home -g app -G sudo app \
|
||||
&& sed -i -e "s|%sudo ALL=(ALL:ALL) ALL|%sudo ALL=(ALL) NOPASSWD: ALL|" /etc/sudoers
|
||||
&& sed -i -e "s|%sudo ALL=(ALL:ALL) ALL|%sudo ALL=(ALL) NOPASSWD: ALL|" /etc/sudoers \
|
||||
&& mkdir -p /home/app/.config/please && chown -R app:app /home/app/.config/please
|
||||
|
||||
|
||||
|
|
|
@ -163,6 +163,22 @@ First we install docker inside our existing base image:
|
|||
./please tools docker-shell
|
||||
nix-env -f /etc/nix/nixpkgs -iA docker
|
||||
|
||||
You now have `docker` in your Docker shell. But you *may* not have read access to the Docker socket.
|
||||
To check this, simply type:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
docker ps
|
||||
|
||||
If you do not see the list of your running containers but a connection error, you need to do the following (in your docker shell, not on your host machine):
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
sudo addgroup --gid 999 docker
|
||||
sudo adduser app docker
|
||||
|
||||
This will add the current user to the docker group, thus granting him access (after opening another shell to check your new rights !)
|
||||
|
||||
In another terminal we apply the PR to bump the version
|
||||
|
||||
.. code-block:: console
|
||||
|
@ -173,7 +189,7 @@ Back in our docker shell we then build and then push docker image:
|
|||
|
||||
.. code-block:: console
|
||||
|
||||
./please -vv tools build-base-image
|
||||
./please -vv tools build-base-image \
|
||||
--taskcluster-secret="repo:github.com/mozilla-releng/services:branch:production" \
|
||||
--taskcluster-client-id="..." \
|
||||
--taskcluster-access-token="..."
|
||||
|
@ -199,11 +215,11 @@ is going to be used next time we do deployment.
|
|||
|
||||
git clone git@github.com:mozilla/release-services.git
|
||||
cd release-services
|
||||
git co -b version-bump origin/master
|
||||
git checkout -b version-bump origin/master
|
||||
echo "$((($(cat VERSION)) + 1))" | tee VERSION2
|
||||
sed -i -e "s|base-$(cat VERSION)|base-$(cat VERSION2)|" .taskcluster.yml
|
||||
mv VERSION2 VERSION
|
||||
git commit -a -m "Deploying v$(cat VERSION) (and bumping version to v$((($(cat VERSION)) + 1)))"
|
||||
git commit -a -m "Deploying v$((($(cat VERSION)) - 1)) (and bumping version to v$(cat VERSION))"
|
||||
git push origin version-bump -f
|
||||
|
||||
Now open a Pull Request from ``version-bump`` to ``master`` branch and copy
|
||||
|
|
Загрузка…
Ссылка в новой задаче