在我目前正在进行的项目中,我想根据以下规则运行bitbucket管道。
这里的问题是,如果我将提交推送到已打开拉取请求的分支,则管道会被触发两次。
pipelines:
default:
- step: *lint
- step: *test
pull-requests:
'**':
- step: *lint
- step: *test-with-coverage
Run Code Online (Sandbox Code Playgroud)
我寻找一种在拉取请求存在时跳过默认管道的方法,但我找不到它。我愿意接受建议和意见。
我正在使用 Spring Boot 版本 2.1.8.RELEASE 开发 Spring Boot 应用程序。我需要构建自定义 RedisCacheManager。
RedisCacheManager如下。
@EnableCaching
@Configuration
class CacheConfig {
@Bean
fun redisCacheManager(lettuceConnectionFactory: RedisConnectionFactory): RedisCacheManager? {
val redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig()
.entryTtl(Duration.ofHours(1))
return RedisCacheManager.RedisCacheManagerBuilder
.fromConnectionFactory(lettuceConnectionFactory)
.cacheDefaults(redisCacheConfiguration)
.build()
}
}
Run Code Online (Sandbox Code Playgroud)
在我的服务中,我使用 @Cacheble 缓存响应。看:
@Cacheable(cacheNames = ["cached_sample"])
fun getAllSample(): List<SampleRecord> {
return auditableRepository.findAll()
}
Run Code Online (Sandbox Code Playgroud)
模型我缓存:
data class SampleRecord(
@ApiModelProperty(readOnly = true)
val id: Long? = null,
@ApiModelProperty(readOnly = true)
val active: Boolean? = null,
@ApiModelProperty(readOnly = true)
val createdDate: Instant? = null,
val param: String
): Serializable …Run Code Online (Sandbox Code Playgroud)