Skip to content

Instantly share code, notes, and snippets.

View sherl0cks's full-sized avatar

Justin Holmes sherl0cks

  • Denver
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sherl0cks
sherl0cks / GraalReflectionConfig.kt
Last active June 10, 2020 07:41
Getting Smallrye Graphql Client 1.0.3 Working with Quarkus 1.5.0.Final in Native Image
package com.acme.myapp;
import io.quarkus.runtime.annotations.RegisterForReflection
@RegisterForReflection(
targets = [
io.smallrye.graphql.client.typesafe.api.GraphQlClientApi::class,
io.smallrye.graphql.client.typesafe.api.GraphQlClientBuilder::class,
io.smallrye.graphql.client.typesafe.api.GraphQlClientHeader::class,
@sherl0cks
sherl0cks / QuarkusAwsCdiConfig.kt
Created April 14, 2020 15:24
AWS SDK Support in Quarkus
import com.amazonaws.xray.interceptors.TracingInterceptor
import org.eclipse.microprofile.config.inject.ConfigProperty
import software.amazon.awssdk.core.client.config.ClientOverrideConfiguration
import software.amazon.awssdk.http.SdkHttpClient
import software.amazon.awssdk.http.apache.ApacheHttpClient
import software.amazon.awssdk.http.async.SdkAsyncHttpClient
import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.dynamodb.DynamoDbClient
import software.amazon.awssdk.services.s3.S3AsyncClient
class RestClientTest {
@Inject
@field: RestClient
lateinit var postService: PostService
@Inject
@field: RestClient
lateinit var commentService: CommentService
##
## 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
##
## https://www.apache.org/licenses/LICENSE-2.0
import io.github.cdimascio.dotenv.dotenv
import org.eclipse.microprofile.config.spi.ConfigSource
/**
* A bridge from https://github.com/cdimascio/java-dotenv to Quarkus/MicroProfile Config. Should only be used in test code, as these configs should be
* provided to lambda via env vars in prod.
*
* @see <a href="https://quarkus.io/guides/config#custom-configuration">Custom Config Source Quarkus Docs</a>
* Note the service file at test/resources/META-INF/SERVICES/org.eclipse.microprofile.config.spi.ConfigSource
*/
pipeline {
agent { label 'jenkins-slave-mvn' }
environment {
// dunno why this is failing
// BASE_NAMESPACE = "${OPENSHIFT_BUILD_NAMESPACE}".reverse().drop(6).reverse()
CI_CD_PROJECT = "ci-cd"
DEV_PROJECT = "dev"
TEST_PROJECT = "test"
SOURCE_CONTEXT_DIR = ""
########## s8
[jholmes@fedora27 assistant]$ oc get rolebindings
NAME ROLE USERS GROUPS SERVICE ACCOUNTS SUBJECTS
admin /admin josphill
edit /edit labs-ci-cd-contributors
jenkins_edit /edit jenkins
system:deployers /system:deployer deployer
system:image-builders /system:image-builder builder
system:image-pullers /system:image-puller system:serviceaccounts:labs-ci-cd
---
- hosts: seed-hosts[0]
vars:
scm_url: "https://github.com/labs-robot/labs-ci-cd.git"
roles:
- make-demo-unique
- casl-ansible/roles/openshift-applier
---
kind: Template
apiVersion: v1
metadata:
name: jenkins-pipeline-no-ocp-triggers
objects:
- apiVersion: v1
kind: RoleBinding
metadata:
name: "${ROLE}"