Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1367: add more build events #1444

Merged
merged 3 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions cmd/util/doc-gen/generators/traitdocgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ const (

adocNavMarkerStart = adocCommonMarkerStart + " (trait-nav)"
adocNavMarkerEnd = adocCommonMarkerEnd + " (trait-nav)"

adocListMarkerStart = adocCommonMarkerStart + " (trait-list)"
adocListMarkerEnd = adocCommonMarkerEnd + " (trait-list)"
)

var (
Expand Down
131 changes: 65 additions & 66 deletions deploy/camel-catalog-1.3.0-SNAPSHOT-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ metadata:
name: camel-catalog-1.3.0-snapshot-main
labels:
app: camel-k
camel.apache.org/catalog.version: 3.1.0
camel.apache.org/catalog.loader.version: 3.1.0
camel.apache.org/catalog.version: 3.2.0
camel.apache.org/catalog.loader.version: 3.2.0
camel.apache.org/runtime.version: 1.3.0-SNAPSHOT
camel.apache.org/runtime.provider: main
spec:
Expand All @@ -31,9 +31,9 @@ spec:
provider: main
applicationClass: org.apache.camel.k.main.Application
metadata:
camel.version: 3.1.0
quarkus.version: 1.3.2.Final
camel-quarkus.version: 1.0.0-M6
camel.version: 3.2.0
quarkus.version: 1.4.1.Final
camel-quarkus.version: 1.0.0-M7
dependencies:
- groupId: org.apache.camel.k
artifactId: camel-k-runtime-main
Expand Down Expand Up @@ -1099,6 +1099,19 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.aws2.sqs.Sqs2Component
camel-aws2-kinesis:
groupId: org.apache.camel
artifactId: camel-aws2-kinesis
schemes:
- id: aws2-kinesis
http: false
passive: false
- id: aws2-kinesis-firehose
http: false
passive: false
javaTypes:
- org.apache.camel.component.aws2.kinesis.Kinesis2Component
- org.apache.camel.component.aws2.firehose.KinesisFirehose2Component
camel-reactive-streams:
groupId: org.apache.camel
artifactId: camel-reactive-streams
Expand Down Expand Up @@ -1148,15 +1161,6 @@ spec:
javaTypes:
- org.apache.camel.component.dataset.DataSetComponent
- org.apache.camel.component.dataset.DataSetTestComponent
camel-elytron:
groupId: org.apache.camel
artifactId: camel-elytron
schemes:
- id: elytron
http: false
passive: false
javaTypes:
- org.apache.camel.component.elytron.ElytronComponent
camel-jsonapi:
groupId: org.apache.camel
artifactId: camel-jsonapi
Expand Down Expand Up @@ -1330,6 +1334,25 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.timer.TimerComponent
camel-core-languages:
groupId: org.apache.camel
artifactId: camel-core-languages
languages:
- constant
- exchangeProperty
- file
- header
- ref
- simple
- tokenize
javaTypes:
- org.apache.camel.language.constant.ConstantLanguage
- org.apache.camel.language.property.ExchangePropertyLanguage
- org.apache.camel.language.simple.FileLanguage
- org.apache.camel.language.header.HeaderLanguage
- org.apache.camel.language.ref.RefLanguage
- org.apache.camel.language.simple.SimpleLanguage
- org.apache.camel.language.tokenizer.TokenizeLanguage
camel-jcache:
groupId: org.apache.camel
artifactId: camel-jcache
Expand Down Expand Up @@ -1399,15 +1422,6 @@ spec:
- jsonpath
javaTypes:
- org.apache.camel.jsonpath.JsonPathLanguage
camel-spark-rest:
groupId: org.apache.camel
artifactId: camel-spark-rest
schemes:
- id: spark-rest
http: true
passive: false
javaTypes:
- org.apache.camel.component.sparkrest.SparkComponent
camel-jt400:
groupId: org.apache.camel
artifactId: camel-jt400
Expand Down Expand Up @@ -1548,15 +1562,6 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.master.MasterComponent
camel-eventadmin:
groupId: org.apache.camel
artifactId: camel-eventadmin
schemes:
- id: eventadmin
http: false
passive: false
javaTypes:
- org.apache.camel.component.eventadmin.EventAdminComponent
camel-optaplanner:
groupId: org.apache.camel
artifactId: camel-optaplanner
Expand Down Expand Up @@ -1711,14 +1716,9 @@ spec:
camel-avro:
groupId: org.apache.camel
artifactId: camel-avro
schemes:
- id: avro
http: false
passive: false
dataformats:
- avro
javaTypes:
- org.apache.camel.component.avro.AvroComponent
- org.apache.camel.dataformat.avro.AvroDataFormat
camel-mllp:
groupId: org.apache.camel
Expand Down Expand Up @@ -1747,6 +1747,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.elsql.ElsqlComponent
camel-aws2-lambda:
groupId: org.apache.camel
artifactId: camel-aws2-lambda
schemes:
- id: aws2-lambda
http: false
passive: false
javaTypes:
- org.apache.camel.component.aws2.lambda.Lambda2Component
camel-aws-msk:
groupId: org.apache.camel
artifactId: camel-aws-msk
Expand Down Expand Up @@ -2365,25 +2374,6 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.aws2.msk.MSK2Component
camel-base:
groupId: org.apache.camel
artifactId: camel-base
languages:
- constant
- exchangeProperty
- file
- header
- ref
- simple
- tokenize
javaTypes:
- org.apache.camel.language.constant.ConstantLanguage
- org.apache.camel.language.property.ExchangePropertyLanguage
- org.apache.camel.language.simple.FileLanguage
- org.apache.camel.language.header.HeaderLanguage
- org.apache.camel.language.ref.RefLanguage
- org.apache.camel.language.simple.SimpleLanguage
- org.apache.camel.language.tokenizer.TokenizeLanguage
camel-jpa:
groupId: org.apache.camel
artifactId: camel-jpa
Expand All @@ -2393,6 +2383,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.jpa.JpaComponent
camel-avro-rpc:
groupId: org.apache.camel
artifactId: camel-avro-rpc
schemes:
- id: avro
http: false
passive: false
javaTypes:
- org.apache.camel.component.avro.AvroComponent
camel-cassandraql:
groupId: org.apache.camel
artifactId: camel-cassandraql
Expand Down Expand Up @@ -2431,6 +2430,15 @@ spec:
- syslog
javaTypes:
- org.apache.camel.component.syslog.SyslogDataFormat
camel-aws2-s3:
groupId: org.apache.camel
artifactId: camel-aws2-s3
schemes:
- id: aws2-s3
http: false
passive: false
javaTypes:
- org.apache.camel.component.aws2.s3.AWS2S3Component
camel-pubnub:
groupId: org.apache.camel
artifactId: camel-pubnub
Expand Down Expand Up @@ -2490,7 +2498,7 @@ spec:
dataformats:
- secureXML
javaTypes:
- org.apache.camel.component.xmlsecurity.XmlSignatureComponent
- org.apache.camel.component.xmlsecurity.XmlSignerComponent
- org.apache.camel.component.xmlsecurity.XmlVerifierComponent
- org.apache.camel.dataformat.xmlsecurity.XMLSecurityDataFormat
camel-bonita:
Expand Down Expand Up @@ -2583,15 +2591,6 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.xchange.XChangeComponent
camel-paxlogging:
groupId: org.apache.camel
artifactId: camel-paxlogging
schemes:
- id: paxlogging
http: false
passive: false
javaTypes:
- org.apache.camel.component.paxlogging.PaxLoggingComponent
camel-tarfile:
groupId: org.apache.camel
artifactId: camel-tarfile
Expand Down
33 changes: 23 additions & 10 deletions deploy/camel-catalog-1.3.0-SNAPSHOT-quarkus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ metadata:
name: camel-catalog-1.3.0-snapshot-quarkus
labels:
app: camel-k
camel.apache.org/catalog.version: 3.1.0
camel.apache.org/catalog.loader.version: 3.1.0
camel.apache.org/catalog.version: 3.2.0
camel.apache.org/catalog.loader.version: 3.2.0
camel.apache.org/runtime.version: 1.3.0-SNAPSHOT
camel.apache.org/runtime.provider: quarkus
spec:
Expand All @@ -31,9 +31,9 @@ spec:
provider: quarkus
applicationClass: io.quarkus.runner.GeneratedMain
metadata:
camel.version: 3.1.0
quarkus.version: 1.3.2.Final
camel-quarkus.version: 1.0.0-M6
camel.version: 3.2.0
quarkus.version: 1.4.1.Final
camel-quarkus.version: 1.0.0-M7
dependencies:
- groupId: org.apache.camel.k
artifactId: camel-k-runtime-quarkus
Expand Down Expand Up @@ -93,6 +93,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.file.FileComponent
camel-quarkus-aws2-s3:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-aws2-s3
schemes:
- id: aws2-s3
http: false
passive: false
javaTypes:
- org.apache.camel.component.aws2.s3.AWS2S3Component
camel-quarkus-xpath:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-xpath
Expand Down Expand Up @@ -1131,14 +1140,9 @@ spec:
camel-quarkus-avro:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-avro
schemes:
- id: avro
http: false
passive: false
dataformats:
- avro
javaTypes:
- org.apache.camel.component.avro.AvroComponent
- org.apache.camel.dataformat.avro.AvroDataFormat
camel-quarkus-couchbase:
groupId: org.apache.camel.quarkus
Expand Down Expand Up @@ -1303,6 +1307,15 @@ spec:
passive: false
javaTypes:
- org.apache.camel.component.infinispan.InfinispanComponent
camel-quarkus-avro-rpc:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-avro-rpc
schemes:
- id: avro
http: false
passive: false
javaTypes:
- org.apache.camel.component.avro.AvroComponent
camel-quarkus-telegram:
groupId: org.apache.camel.quarkus
artifactId: camel-quarkus-telegram
Expand Down
12 changes: 6 additions & 6 deletions deploy/resources.go

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions pkg/controller/build/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ import (

v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
"github.com/apache/camel-k/pkg/client"
camelevent "github.com/apache/camel-k/pkg/event"
"github.com/apache/camel-k/pkg/util/log"
"k8s.io/client-go/tools/record"
)

// Action --
type Action interface {
client.Injectable
log.Injectable
camelevent.Injectable

// a user friendly name for the action
Name() string
Expand All @@ -41,8 +44,9 @@ type Action interface {
}

type baseAction struct {
client client.Client
L log.Logger
client client.Client
L log.Logger
recorder record.EventRecorder
}

func (action *baseAction) InjectClient(client client.Client) {
Expand All @@ -52,3 +56,7 @@ func (action *baseAction) InjectClient(client client.Client) {
func (action *baseAction) InjectLogger(log log.Logger) {
action.L = log
}

func (action *baseAction) InjectRecorder(recorder record.EventRecorder) {
action.recorder = recorder
}
5 changes: 3 additions & 2 deletions pkg/controller/build/build_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
for _, a := range actions {
a.InjectClient(r.client)
a.InjectLogger(targetLog)
a.InjectRecorder(r.recorder)

if a.CanHandle(target) {
targetLog.Infof("Invoking action %s", a.Name())
Expand All @@ -218,10 +219,10 @@ func (r *ReconcileBuild) Reconcile(request reconcile.Request) (reconcile.Result,
return res, err
}

if newTarget.Status.Phase != target.Status.Phase {
if newTarget.Status.Phase != instance.Status.Phase {
targetLog.Info(
"state transition",
"phase-from", target.Status.Phase,
"phase-from", instance.Status.Phase,
"phase-to", newTarget.Status.Phase,
)
}
Expand Down
Loading