summaryrefslogtreecommitdiff
path: root/workflow_sources/test/rabbitmq_cli.lib.yml
diff options
context:
space:
mode:
Diffstat (limited to 'workflow_sources/test/rabbitmq_cli.lib.yml')
-rw-r--r--workflow_sources/test/rabbitmq_cli.lib.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/workflow_sources/test/rabbitmq_cli.lib.yml b/workflow_sources/test/rabbitmq_cli.lib.yml
new file mode 100644
index 0000000000..4281547814
--- /dev/null
+++ b/workflow_sources/test/rabbitmq_cli.lib.yml
@@ -0,0 +1,40 @@
+#@ load("@ytt:data", "data")
+#@ load("helpers.star", "ci_image", "skip_ci_condition")
+
+#@ def rabbitmq_cli_job(dep):
+name: #@ dep.name
+needs:
+ - prepare
+runs-on: ubuntu-18.04
+if: #@ skip_ci_condition()
+#@yaml/text-templated-strings
+steps:
+ - name: RECORD STEP START
+ id: buildevents
+ run: |
+ echo "::set-output name=step_start::$(date +%s)"
+ - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
+ with:
+ service_account_key: ${{ secrets.GCR_JSON_KEY }}
+ export_default_credentials: true
+ - name: RUN TESTS
+ run: |
+ gcloud auth configure-docker
+ docker pull (@= ci_image() @)
+ mkdir broker-logs && chmod 777 broker-logs
+ docker run \
+ --env project=(@= dep.name @) \
+ --env GITHUB_RUN_ID=${{ github.run_id }} \
+ --env BUILDEVENT_APIKEY=${{ secrets.HONEYCOMB_API_KEY }} \
+ --env STEP_START=${{ steps.buildevents.outputs.step_start }} \
+ --volume ${PWD}/broker-logs:/workspace/broker-logs \
+ (@= ci_image() @) \
+ ci/scripts/rabbitmq_cli.sh
+ - name: ON FAILURE UPLOAD TESTS LOGS ARTIFACT
+ #! https://github.com/marketplace/actions/upload-artifact
+ uses: actions/upload-artifact@v2-preview
+ if: failure()
+ with:
+ name: (@= dep.name @)-broker-logs
+ path: "broker-logs/broker-logs.tar.xz"
+#@ end \ No newline at end of file