From 32742e7eef1361c3cfc5a2fdbc18a6b294833b56 Mon Sep 17 00:00:00 2001 From: Henry Chao Date: Mon, 17 Jul 2023 10:40:47 -0400 Subject: [PATCH] Update documentation. --- README.md | 88 ++++++++++++++++++++++++------------------------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 5fa2e6b..5633b4b 100644 --- a/README.md +++ b/README.md @@ -12,52 +12,27 @@ For more in-depth documentation on the workflow `.yaml` files, see [this link](h # Java Projects -## .github/workflows/push-to-branch.yaml +## .github/workflows/workflow-java.yaml -Add this file into your repository as `.github/workflows/push-to-branch.yaml` in order to have automated builds of all branches which are not `master`: +Add this file into your repository as `.github/workflows/workflow-java.yaml` in order to have automated builds run for all branches: ```yaml -name: Push2Branch +name: Run CI/CD Workflow on: push: - branches-ignore: - - "master" jobs: - push-to-branch: - uses: rcsb/devops-cicd-github-actions/.github/workflows/push-to-branch.yaml@master - with: - distribution: # The file name of the built artifact which will be uploaded to buildlocker - type: # The type of file for the built artifact. Valid options are [ war | jar ] - do_skaffold_deploy: # Deploy the application to Kubernetes via skaffold. Valid options are [ true | false ] -``` - -## .github/workflows/push-to-master.yaml - -Add this file into your repository as `.github/workflows/push-to-master.yaml` in order to have automated builds on the `master` branch (and only that branch): - -```yaml -name: Push2Master - -on: - push: - branches: - - "master" - -jobs: - push-to-master: - uses: rcsb/devops-cicd-github-actions/.github/workflows/push-to-master.yaml@master - with: - distribution: # The file name of the built artifact which will be uploaded to buildlocker - type: # The type of file for the built artifact. Valid options are [ "war" | "jar" ] + run-workflow: + name: "Run automated workflow" + uses: rcsb/devops-cicd-github-actions/.github/workflows/workflow-java.yaml@master ``` # Node Projects ## .github/workflows/nightly-test.yaml -Add this file into your repository as `.github/workflows/nightly-test.yaml` in order to have automated builds run periodically to perform tests: +Add this file into your repository as `.github/workflows/nightly-test.yaml` in order to have automated builds run periodic tests: ```yaml name: Nightly Cypress Test @@ -77,34 +52,47 @@ on: jobs: cypress: - uses: rcsb/devops-cicd-github-actions/.github/workflows/cypress.yaml@master + uses: rcsb/devops-cicd-github-actions/.github/workflows/run_npm.yaml@master with: - branch: "master" # The name of the branch the test will be ran against - type: "nightly" # The type of test to run. Values are [ "nightly" | "push" ] + script: runnightly ``` -## .github/workflows/node-deploy.yaml +## .github/workflows/workflow-node.yaml -Add this file into your repository as `.github/workflows/node-deploy.yaml` in order to have automated builds run for all branches: +Add this file into your repository as `.github/workflows/workflow-node.yaml` in order to have automated builds run for all branches: ```yaml -name: Node Build and Deploy +name: Run CI/CD Workflow on: push: - workflow_dispatch: jobs: - cypress-test: - uses: rcsb/devops-cicd-github-actions/.github/workflows/cypress.yaml@master - with: - branch: ${{ github.ref_name }} # Set this value to always use the commit branch. Leave as is. - type: 'push' # The type of test to run. Values are [ "nightly" | "push" ]. Should just leave this as "push" in most cases. + run-workflow: + name: "Run automated workflow" + uses: rcsb/devops-cicd-github-actions/.github/workflows/workflow-node.yaml@master +``` + +# Docker Projects + +## .github/workflows/workflow-docker.yaml + +Add this file into your repository as `.github/workflows/workflow-docker.yaml` in order to have automated builds run for all branches: + +```yaml +name: Run CI/CD Workflow + +on: + push: - node-build-deploy: - needs: cypress-test - uses: rcsb/devops-cicd-github-actions/.github/workflows/node-deploy.yaml@master +jobs: + run-workflow: + name: "Run automated workflow" + uses: rcsb/devops-cicd-github-actions/.github/workflows/workflow-docker.yaml@master with: - distribution: # The file name of the built artifact which will be uploaded to buildlocker - branch: ${{ github.ref_name }} # Set this value to always use the commit branch. Leave as is. -``` \ No newline at end of file + dockerfile_location: # The location of the Dockerfile relative to the root of the repository. Defaults to "Dockerfile". + repo_url: # The URL of the remote Docker image repository. Defaults to "harbor.devops.k8s.rcsb.org". + repo_project: # REQUIRED. The name of the project or organization in the remote Docker image repository. + docker_image_name: # REQUIRED. The name of the Docker image to create. + docker_build_context: # The path location of the docker build context, relative to the project root. Defaults to the project root. +```