Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CY_TEST_ROOT_API_KEY = "my secret api key" CY_TEST_ROOT_ORG = "cycloidio" // Note, this url should be accessible by Cycloid API CY_TEST_GIT_CR_URL = "Url of the git repository used as config repository" CY_TEST_GIT_CR_BRANCH = "master" )
View Source
var ( NowTimestamp = now.UnixNano() TestGitSshKey = []byte(`-----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW QyNTUxOQAAACD8O9mhkl5CAiD0NLeQcoPf1duYHImQlTjOXcCOgHmC+AAAAJjCF9jzwhfY 8wAAAAtzc2gtZWQyNTUxOQAAACD8O9mhkl5CAiD0NLeQcoPf1duYHImQlTjOXcCOgHmC+A AAAEC0ryBZ1uJQ2drmjsO+WpsC2E/5SWheJD/r8+Q4LghWxfw72aGSXkICIPQ0t5Byg9/V 25gciZCVOM5dwI6AeYL4AAAAE2N5Y2xvaWRAZXhhbXBsZS5jb20BAg== -----END OPENSSH PRIVATE KEY-----`) TestPipelineSample = []byte(`jobs: - name: job-hello-world build_logs_to_retain: 3 plan: - task: hello-world config: platform: linux image_resource: type: docker-image source: {repository: busybox} run: path: /bin/sh args: - -ec - | echo ${MESSAGE} params: MESSAGE: ((message))`) TestPipelineVariables = []byte(`message: "hello world and especially to ($ organization_canonical $)"`) TestInfraPolicySample = []byte(` package test import input.tfplan as tfplan resource_types = { "aws_instance" } tags_ok(index) { tfplan.resource_changes[index].change.after.tags["env"] == "test" } deny[reason] { resources_not_ok := [resource_not_ok | resource_types[i] == tfplan.resource_changes[j].type not tags_ok(j); resource_not_ok := resource_types[i]] reason = sprintf("tag not in env: %s %s", [(resources_not_ok), test]) } `) )
Functions ¶
func AddNowTimestamp ¶ added in v1.0.76
AddNowTimestamp add a timestamp suffix to a string
func JsonListExtractFields ¶ added in v1.0.76
JsonListExtractFields Extract a field from a json entity
func LoginToRootOrg ¶ added in v1.0.76
func LoginToRootOrg()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.