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
{ | |
"data": { | |
"application-id": "ocid1.fnapp.oc1.phx...", | |
"compartment-id": "ocid1.compartment.oc1...", | |
"config": {}, | |
"defined-tags": { | |
"Oracle-Tags": { | |
"CreatedBy": "[redacted]", | |
"CreatedOn": "2022-03-29T17:10:35.939Z" | |
} |
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
graalvmNative { | |
binaries.configureEach { | |
buildArgs.addAll( | |
"-H:+StaticExecutableWithDynamicLibC", | |
"-Dfn.handler=atp.auto.wallet.fn.Function::handleRequest", | |
"--initialize-at-build-time=atp.auto.wallet.fn" | |
) | |
} | |
} |
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
version = "0.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
$ oci fn function create \ | |
--application-id=ocid1.fnapp.oc1.phx... \ | |
--display-name=atp-auto-wallet-fn \ | |
--memory-in-mbs=2048 \ | |
--image=phx.ocir.io/toddrsharp/atp-auto-wallet/atp-auto-wallet-fn:0.1 |
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 FunctionTest { | |
@Test | |
public void testFunction() { | |
FnTestingRule rule = FnTestingRule.createDefault(); | |
rule.givenEvent().enqueue(); | |
rule.thenRun(Function.class, "handleRequest"); | |
String result = rule.getOnlyResult().getBodyAsString(); | |
assertNotNull(result); | |
} | |
} |
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
$ ./gradlew dockerBuild | |
$ ./gradlew dockerPush |
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
$ oci fn function invoke \ | |
--function-id=ocid1.fnfunc.oc1.phx... \ | |
--body="" \ | |
--file - |
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
$ ./gradlew test |
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
graalvmNative { | |
binaries.configureEach { | |
buildArgs.addAll( | |
"-H:+StaticExecutableWithDynamicLibC", | |
"-Dfn.handler=atp.auto.wallet.fn.Function::handleRequest", | |
"--initialize-at-build-time=atp.auto.wallet.fn", | |
"-H:ReflectionConfigurationFiles=/home/app/resources/reflectionconfig.json" | |
) | |
} | |
} |
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
micronaut: | |
application: | |
name: atpAutoWalletFn | |
datasources: | |
default: | |
dialect: ORACLE | |
username: ${ATP_USER} | |
password: ${ATP_PASSWORD} | |
ocid: ${ATP_OCID} | |
walletPassword: ${ATP_WALLET_PASSWORD} |