This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM oracle/graalvm-ce:1.0.0-rc12 AS builder | |
ENV GRAALVM_HOME=/opt/graalvm-ce-1.0.0-rc12/ | |
COPY . . | |
RUN ./mvnw package -Pnative | |
FROM registry.fedoraproject.org/fedora-minimal | |
WORKDIR /work/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExtendWith(OdoExecutorStubInjector.class) | |
public class OdoExecutorStubTest { | |
@Test | |
public void should_run_commands(OdoExecutorStub odoExecutorStub) { | |
// Given | |
final Odo odo = new Odo(odoExecutorStub); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ExtendWith | |
({ | |
OpenShiftConditionExtension.class, // Checks if there is an OpenShift cluster running | |
GitExtension.class, // Clones project to temporal directory | |
OpenShiftInjector.class // Injects OpeShift client to do assertions | |
}) | |
@GitClone("https://github.com/openshift/nodejs-ex") // Project to clone | |
public class CreateDeployTest { | |
private final Odo odo = new Odo(new OdoConfiguration()); // Creates Odo instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright 2016 Red Hat, Inc. | |
# | |
# Red Hat 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 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FindAUser implements Task{ | |
private final int id; | |
public FindAUser(int id) { | |
this.id = id; | |
} | |
public static FindAUser withId(int id) { | |
return instrumented(FindAUser.class, id); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SerenityRunner.class) | |
public class WhenSecurityServiceNeedsUsersInformation { | |
private String theRestApiBaseUrl; | |
private EnvironmentVariables environmentVariables; | |
private Actor securityService; | |
@Before | |
public void configureBaseUrl() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= My Code | |
:source-highlighter: highlightjs | |
== Callouts | |
[source, java] | |
.MyClass.java | |
---- | |
public class MyClass { // <1> | |
public static void main(String[] args) { // <2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func newPodForCR(cr *hellov1alpha1.Hello) *corev1.Pod { | |
msg := cr.Spec.Message | |
labels := map[string]string{ | |
"app": cr.Name, | |
} | |
return &corev1.Pod{ | |
ObjectMeta: metav1.ObjectMeta{ | |
Name: cr.Name + "-pod", | |
Namespace: cr.Namespace, | |
Labels: labels, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: hello.lordofthejars.com/v1alpha1 | |
kind: Hello | |
metadata: | |
name: example-hello | |
spec: | |
message: Hello Alex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
oc/kubectl create -f deploy/service_account.yaml | |
oc/kubectl create -f deploy/role.yaml | |
oc/kubectl create -f deploy/role_binding.yaml | |
oc/kubectl create -f deploy/operator.yaml |