Skip to content

Instantly share code, notes, and snippets.

npm http fetch GET 200 https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz 218ms
npm http fetch GET 200 https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz 168ms
npm http fetch GET 200 https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz 130ms
npm http fetch GET 200 https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz 128ms
npm http fetch GET 200 https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz 135ms

Continuous Swagness for your APIs

This is the code required to run the Continusous Swagness talk workshop.

What we'll do

This workshop aims at setting up a basic Software factory from scratch on Clever Cloud. We will deploy Artifactory to manage binaries for our Continous Integration, we will use Github and Clever Cloud for the Continuous Deployment setup and everything will be automated with Jenkins.

Clever Cloud Setup

@ldoguin
ldoguin / Readme.md
Created November 5, 2017 14:44
KotlinPetClinics on Clever Cloud
@ldoguin
ldoguin / GithubArchiveImport.groovy
Last active January 22, 2017 11:17
Import GZipped files from http://githubarchive.org/ to Couchbase
@GrabResolver(name = "OJO", root = "https://oss.jfrog.org/artifactory/repo")
@Grab("com.couchbase.client:java-client:2.3.3")
@Grab("org.assertj:assertj-core:2.5.0")
@Grab("io.reactivex:rxgroovy:1.0.3")
@GrabConfig(systemClassLoader = true)
import com.couchbase.client.java.document.RawJsonDocument
import com.couchbase.client.java.document.JsonDocument
import com.couchbase.client.core.RequestCancelledException
import com.couchbase.client.core.BackpressureException
import com.couchbase.client.java.error.TemporaryFailureException
java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:47)
at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
package io.vertx.workshop.quote;
import com.couchbase.client.java.AsyncBucket;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.document.JsonDocument;
import com.couchbase.client.java.document.json.JsonArray;
import com.couchbase.client.java.document.json.JsonObject;
import com.couchbase.client.java.query.AsyncN1qlQueryResult;
import com.couchbase.client.java.query.AsyncN1qlQueryRow;
import com.couchbase.client.java.query.N1qlQuery;
@ldoguin
ldoguin / CouchbaseWaitStrategy.java
Created July 26, 2016 12:28
Custom wait strategy, waits for first node to be healthy. For the TestContainers project.
package org.testcontainers.containers;
import com.couchbase.client.deps.com.fasterxml.jackson.databind.JsonNode;
import com.couchbase.client.deps.com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Strings;
import com.google.common.io.BaseEncoding;
import org.rnorth.ducttape.TimeoutException;
import java.io.IOException;
import java.net.HttpURLConnection;
@ldoguin
ldoguin / CouchbaseContainer.java
Created July 26, 2016 12:26
Couchbase Container for the TestContainers project
package org.testcontainers.containers;
import com.couchbase.client.core.utils.Base64;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.env.CouchbaseEnvironment;
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment;
import org.testcontainers.containers.traits.LinkableContainer;
import org.testcontainers.containers.wait.HttpWaitStrategy;
import java.io.DataOutputStream;
@ldoguin
ldoguin / DockerCouchbaseTest.java
Last active July 18, 2016 10:23
This gist is using testcontainers(http://testcontainers.viewdocs.io/testcontainers-java/) and a custom Couchbase docker image.
package com.couchbase.fullstack;
import com.couchbase.client.core.CouchbaseCore;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.env.CouchbaseEnvironment;
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment;
import org.junit.ClassRule;
import org.junit.Test;
import org.springframework.boot.autoconfigure.couchbase.CouchbaseProperties;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*