Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore(ci): add automatic GitLab image pushes#792

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpocentek merged 1 commit intomasterfromchore/enable-gitlab-ci-builds
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes fromall 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
37 changes: 24 additions & 13 deletions.gitlab-ci.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,19 +26,19 @@ black_lint:
except:
- master

#build_test_image: # Currently hangs forever, because of GitLab Runner infrastructure issues
# stage: build-test-image
# image:
# name: gcr.io/kaniko-project/executor:debug
# entrypoint: [""]
# script:
# - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
# - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/tools/Dockerfile-test --destination $CI_REGISTRY_IMAGE:test
# only:
# refs:
# - master
# changes:
# - tools/
build_test_image:
stage: build-test-image
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/tools/Dockerfile-test --destination $CI_REGISTRY_IMAGE:test
only:
refs:
- master
changes:
- tools/

.tox_includes: &tox_includes
stage: test
Expand DownExpand Up@@ -103,3 +103,14 @@ deploy:
- twine upload --skip-existing -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/*
only:
- tags

deploy_image:
stage: deploy
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
only:
- tags
5 changes: 4 additions & 1 deletionREADME.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,8 +55,11 @@ How to use

``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg python-gitlab <command> ...``

To change the GitLab URL, use `-e GITLAB_URL=<your url>`
or run it directly from the upstream image:

``docker run -it --rm -e GITLAB_PRIVATE_TOKEN=<your token> -v /path/to/python-gitlab.cfg:/python-gitlab.cfg registry.gitlab.com/python-gitlab/python-gitlab:v1.8.0 <command> ...``

To change the GitLab URL, use `-e GITLAB_URL=<your url>`

Bring your own config file:
``docker run -it --rm -v /path/to/python-gitlab.cfg:/python-gitlab.cfg -e GITLAB_CFG=/python-gitlab.cfg python-gitlab <command> ...``
Expand Down
2 changes: 1 addition & 1 deletiontools/Dockerfile-test
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,7 +11,7 @@ RUN apt-get update \
tzdata \
&& curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash \
&& apt-get install -qy --no-install-recommends \
gitlab-ce=11.10.0-ce.0
gitlab-ce=11.11.2-ce.0

# Manage SSHD through runit
RUN mkdir -p /opt/gitlab/sv/sshd/supervise \
Expand Down
2 changes: 1 addition & 1 deletiontools/build_test_env.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -77,7 +77,7 @@ cleanup() {
}

try docker run --name gitlab-test --detach --publish 8080:80 \
--publish 2222:22pythongitlab/test-python-gitlab:latest >/dev/null
--publish 2222:22registry.gitlab.com/python-gitlab/python-gitlab:test >/dev/null

LOGIN='root'
PASSWORD='5iveL!fe'
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp