Skip to content

Commit

Permalink
Migrate CF CLI Bosh release to GitHub Action workflow (#19)
Browse files Browse the repository at this point in the history
- Setup devcontainer-based local environment using cached base image
- Use nekto/act to iterate on the pipeline locally
- Extract shepherd leasing option into the separate remote action
- Implenent machanism to sync GHA variables and secrets between repositories

Co-authored-by: Michael Chinigo <michael.chinigo@broadcom.com>
Co-authored-by: Greg Weresch <greg.weresch@broadcom.com>
Co-authored-by: Shwetha Gururaj <shwetha.gururaj@broadcom.com>
Co-authored-by: Joao De Almeida Pereira <joao.pereira@broadcom.com>
  • Loading branch information
5 people authored Jun 14, 2024
1 parent 4e9434d commit 696d48b
Show file tree
Hide file tree
Showing 39 changed files with 813 additions and 806 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ghcr.io/cloudfoundry/bosh-package-cf-cli-release-ci:main-latest

RUN apt update && apt install --yes \
entr \
fzf \
htop \
neovim

RUN curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "Cloudfoundry CLI Bosh Release",
"dockerFile": "Dockerfile",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},
"customizations": {
"vscode": {
"settings": {},
"extensions": [
"DavidAnson.vscode-markdownlint",
"GitHub.vscode-pull-request-github",
"editorconfig.editorconfig",
"github.vscode-github-actions",
"ms-vscode.makefile-tools",
"ms-vsliveshare.vsliveshare",
"timonwong.shellcheck",
"vmware.vscode-concourse"
]
}
}
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true

[Makefile]
indent_style = tab
5 changes: 5 additions & 0 deletions .github/.secrets
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
AWS_S3_ACCESS_KEY_ID: fake-aws-s3-access-key-id
AWS_S3_ASSUME_ROLE_ARN: fake-aws-s3-assume-role-arn
AWS_S3_SECRET_ACCESS_KEY: fake-aws-s3-secret-access-key
SHEPHERD_API_ENDPOINT: fake-shepherd-api-endpoint
SHEPHERD_API_TOKEN: fake-shepherd-api-token
6 changes: 6 additions & 0 deletions .github/.vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
AWS_S3_REGION: us-east-2
AWS_S3_BUCKET: cf-cli-bosh-release-dev
PRODUCTION: true
# BRANCH_SUFFIX: -shadow
# SKIP_TESTS: false
# ENV_ID:
19 changes: 19 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# GHA Workflows

## [Create Bosh Release](create-bosh-release.yml)

Why? To create a new cf cli bosh release including major cli versions.

### Resources
- [Old Concourse implementation of the release pipeline](https://ci.cli.fun/teams/main/pipelines/cf-cli-release-toolsmiths)
- [pipeline definition](../../ci/pipeline-toolsmiths.yml)

### Plan

- Acquire cf cli linux binaries for v7, and v8 from s3
- Detect latest tag under each major version

- ...

- Upload (where?) newly created cf cli bosh release.
- Update Releases section on GitHub https://github.com/cloudfoundry/bosh-package-cf-cli-release/releases
Loading

0 comments on commit 696d48b

Please sign in to comment.