Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Loki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Loki
Commits
b43f88aa
Commit
b43f88aa
authored
6 years ago
by
Tom Wilkie
Browse files
Options
Downloads
Patches
Plain Diff
Update circle config, deploy master branch automatically
Signed-off-by:
Tom Wilkie
<
tom.wilkie@gmail.com
>
parent
b5b6999a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.circleci/config.yml
+30
-41
30 additions, 41 deletions
.circleci/config.yml
Makefile
+3
-0
3 additions, 0 deletions
Makefile
with
33 additions
and
41 deletions
.circleci/config.yml
+
30
−
41
View file @
b43f88aa
...
...
@@ -6,20 +6,29 @@ workflows:
jobs
:
-
test
-
build
-
deploy
:
-
publish
:
requires
:
-
test
-
build
-
deploy
:
requires
:
-
publish
filters
:
branches
:
only
:
master
# https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
defaults
:
&defaults
docker
:
-
image
:
gcr.io/metrictank-gcr/logish-build-image:master-b5b6999
auth
:
username
:
_json_key
password
:
$GCR_CREDS
working_directory
:
/go/src/github.com/grafana/logish
jobs
:
test
:
docker
:
-
image
:
gcr.io/metrictank-gcr/logish-build-image:master-017c0b4
auth
:
username
:
_json_key
password
:
$GCR_CREDS
working_directory
:
/go/src/github.com/grafana/logish
<<
:
*defaults
steps
:
-
checkout
...
...
@@ -30,26 +39,11 @@ jobs:
make BUILD_IN_CONTAINER=false test
build
:
docker
:
-
image
:
gcr.io/metrictank-gcr/logish-build-image:master-017c0b4
auth
:
username
:
_json_key
password
:
$GCR_CREDS
working_directory
:
/go/src/github.com/grafana/logish
<<
:
*defaults
steps
:
-
checkout
-
setup_remote_docker
-
run
:
name
:
Install Docker client
command
:
|
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
-
run
:
name
:
Build Images
command
:
|
...
...
@@ -67,27 +61,12 @@ jobs:
paths
:
-
images/
deploy
:
docker
:
-
image
:
gcr.io/metrictank-gcr/logish-build-image:master-017c0b4
auth
:
username
:
_json_key
password
:
$GCR_CREDS
working_directory
:
/go/src/github.com/grafana/logish
publish
:
<<
:
*defaults
steps
:
-
checkout
-
setup_remote_docker
-
run
:
name
:
Install Docker client
command
:
|
set -x
VER="17.03.0-ce"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
-
restore_cache
:
key
:
v1-logish-{{ .Branch }}-{{ .Revision }}
...
...
@@ -102,3 +81,13 @@ jobs:
command
:
|
docker login -u _json_key -p "$GCR_CREDS" https://gcr.io &&
make push-images
deploy
:
<<
:
*defaults
steps
:
-
run
:
|
images=$(make images)
curl -s --header "Content-Type: application/json" \
--data "{\"build_parameters\": {\"CIRCLE_JOB\": \"deploy\", \"IMAGE_NAMES\": \"$(make images-names)\"}}" \
--request POST \
https://circleci.com/api/v1.1/project/github/raintank/deployment_tools/tree/master?circle-token=$CIRCLE_TOKEN
This diff is collapsed.
Click to expand it.
Makefile
+
3
−
0
View file @
b43f88aa
...
...
@@ -125,6 +125,9 @@ shell: build-image/$(UPTODATE)
endif
images
:
echo
$(
IMAGE_NAMES
)
save-images
:
@
mkdir
-p
images
for
image_name
in
$(
IMAGE_NAMES
);
do
\
...
...
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