Skip to content

Commit 509fff0

Browse files
authored
Add comp pusher docker (#16)
* Updated Sailor to 3.3.8
1 parent 7bb709f commit 509fff0

File tree

4 files changed

+138
-2
lines changed

4 files changed

+138
-2
lines changed

.circleci/config.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
version: 2.1
2+
parameters:
3+
node-version:
4+
type: string
5+
default: "16.13.2"
6+
orbs:
7+
node: circleci/node@5.0.0
8+
slack: circleci/slack@4.5.3
9+
commands:
10+
notify_on_failure:
11+
steps:
12+
- slack/notify:
13+
event: fail
14+
custom: |
15+
{
16+
"blocks": [
17+
{
18+
"type": "section",
19+
"fields": [
20+
{
21+
"type": "mrkdwn",
22+
"text": ":red_circle: *$CIRCLE_PROJECT_REPONAME*:*$CIRCLE_TAG* build failed"
23+
}
24+
]
25+
},
26+
{
27+
"type": "actions",
28+
"elements": [
29+
{
30+
"type": "button",
31+
"text": {
32+
"type": "plain_text",
33+
"text": "View Job"
34+
},
35+
"url": "${CIRCLE_BUILD_URL}"
36+
}
37+
]
38+
}
39+
]
40+
}
41+
notify_on_pass:
42+
steps:
43+
- slack/notify:
44+
event: pass
45+
custom: |
46+
{
47+
"blocks": [
48+
{
49+
"type": "section",
50+
"fields": [
51+
{
52+
"type": "mrkdwn",
53+
"text": ":tada: *$CIRCLE_PROJECT_REPONAME*:*$CIRCLE_TAG* was successfully built and published"
54+
}
55+
]
56+
},
57+
{
58+
"type": "actions",
59+
"elements": [
60+
{
61+
"type": "button",
62+
"text": {
63+
"type": "plain_text",
64+
"text": "View Job"
65+
},
66+
"url": "${CIRCLE_BUILD_URL}"
67+
}
68+
]
69+
}
70+
]
71+
}
72+
73+
openjdk-install: cloudesire/openjdk-install@1.2.3
74+
jobs:
75+
test:
76+
docker:
77+
- image: circleci/openjdk:8
78+
steps:
79+
- checkout
80+
- restore_cache:
81+
key: gradle-{{ checksum "build.gradle" }}
82+
83+
- run: ./gradlew downloadDependencies --daemon
84+
- save_cache:
85+
key: gradle-{{ checksum "build.gradle" }}
86+
paths:
87+
- ~/.gradle/caches
88+
- ~/.gradle/wrapper
89+
build:
90+
docker:
91+
- image: cimg/base:stable
92+
user: root
93+
steps:
94+
- checkout
95+
- node/install:
96+
node-version: << pipeline.parameters.node-version >>
97+
- setup_remote_docker:
98+
version: 19.03.13
99+
docker_layer_caching: true
100+
# build and push Docker image
101+
- run:
102+
name: Install component-build-helper lib
103+
command: npm install -g @elastic.io/component-build-helper
104+
- run:
105+
name: Build and publish docker image
106+
command: build_component_docker
107+
- notify_on_failure
108+
- notify_on_pass
109+
110+
workflows:
111+
test:
112+
jobs:
113+
- test:
114+
name: "Running tests"
115+
filters:
116+
tags:
117+
ignore: /.*/
118+
publish_release:
119+
jobs:
120+
- build:
121+
name: "Build and publish docker image"
122+
filters:
123+
branches:
124+
ignore: /.*/
125+
tags:
126+
only: /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.3 (March 16, 2022)
2+
* Updated the sailor version to 3.3.8
3+
* Add a component pusher to Docker hub

build.gradle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ apply plugin: 'eclipse'
55
apply plugin: 'java-library-distribution'
66

77
group = 'io.elastic'
8-
version = '1.0.2'
8+
9+
task downloadDependencies() {
10+
description 'Download all dependencies to the Gradle cache'
11+
doLast {
12+
configurations.findAll { it.canBeResolved }.files
13+
}
14+
}
915

1016
sourceCompatibility = 1.8
1117
targetCompatibility = 1.8
@@ -31,7 +37,7 @@ repositories {
3137
}
3238

3339
dependencies {
34-
compile "io.elastic:sailor-jvm:3.1.0"
40+
compile "io.elastic:sailor-jvm:3.3.8"
3541
compile "org.glassfish.jersey.core:jersey-client:2.25.1"
3642
compile "org.glassfish.jersey.media:jersey-media-json-processing:2.25.1"
3743
}

component.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"title": "Petstore API (Java)",
33
"description": "elastic.io component for the Petstore API",
44
"docsUrl": "https://github.com/elasticio/petstore-component-java",
5+
"version": "1.0.3",
56
"credentials": {
67
"fields": {
78
"apiKey": {

0 commit comments

Comments
 (0)