aws-cloudformation / aws-cloudformation-resource-providers-logs

The CloudFormation Resource Provider Package For Amazon CloudWatch Logs
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
Apache License 2.0
33 stars 35 forks source link

Add all resource types to .travis.yml #42

Closed ammokhov closed 4 years ago

ammokhov commented 4 years ago

Issue #, if available:

Description of changes:

adding metric filter to a travis ci

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

PatMyron commented 4 years ago

There are more AWS::Logs:: resource types. Can we get something more general for all of these repositories?

for directory in $TRAVIS_BUILD_DIR/aws-*; do (cd "$directory" && mvn clean verify); done
miparnisari commented 4 years ago

With the last commit, Travis is checking both resource types, but it fails with MetricFilter because it's using version 1.0.5 of the Java plugin and it mandates upgrading to 2.0.0. However, this update isn't trivial, 2 tests are breaking and I still don't know why.

wbingli commented 4 years ago

With the last commit, Travis is checking both resource types, but it fails with MetricFilter because it's using version 1.0.5 of the Java plugin and it mandates upgrading to 2.0.0. However, this update isn't trivial, 2 tests are breaking and I still don't know why.

Could you have more details about the 2 tests fails? Maybe good to have a PR to show the upgrade to 2.0.0 and the test fails?

wbingli commented 4 years ago

With the last commit, Travis is checking both resource types, but it fails with MetricFilter because it's using version 1.0.5 of the Java plugin and it mandates upgrading to 2.0.0. However, this update isn't trivial, 2 tests are breaking and I still don't know why.

I took a look, there is the PR #46 why it's failing and the fix.

The cloudformation-cli-java-plugin 2.0.0 requires java dependency as 2.0.0. You can pin the pip java plugin so the java pom.xml can stay in 1.0.4. That means in the .travis.yml do this pip3 install --user pre-commit cloudformation-cli-java-plugin==0.1.6

miparnisari commented 4 years ago

Re-tried a build against master: https://travis-ci.com/github/aws-cloudformation/aws-cloudformation-resource-providers-logs/builds/174522848

We need to fix the .travis.yml file so that if any of the maven builds fail, the overall build fails too.

As it stands now, LogDestination is failing due to using 1.0.5. https://travis-ci.com/github/aws-cloudformation/aws-cloudformation-resource-providers-logs/builds/174522848#L434

miparnisari commented 4 years ago

The build is failing now, which is correct (LogDestination needs to be updated to version 2.0.0 of the java plugin), but now i'm not sure how we're going to merge this PR if it's a required check