40 Commits
0.1.1 ... 0.1.0

Author SHA1 Message Date
558054464c feat: Create backups of configuration when the force option is not used.
Some checks failed
CI / Run Tests (push) Failing after 2m16s
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
2024-12-17 14:38:52 -05:00
54c07886ad feat: Adding documentation comments.
All checks were successful
CI / Run Tests (push) Successful in 2m28s
2024-12-17 13:32:05 -05:00
f8e89ed0fa feat: Adding documentation comments.
All checks were successful
CI / Run Tests (push) Successful in 2m17s
2024-12-17 11:51:03 -05:00
f596975bbc feat: Fix test-docker command to not use TTY for CI tests.
All checks were successful
CI / Run Tests (push) Successful in 2m28s
2024-12-17 10:25:24 -05:00
805100fa43 feat: Adds ci
Some checks failed
CI / Run Tests (push) Failing after 3m47s
2024-12-17 10:17:46 -05:00
f7f168b7fd feat: Begins adding docker containers 2024-12-17 10:15:07 -05:00
99459a0a71 feat: Adds dump-configuration command. 2024-12-16 20:44:30 -05:00
f89efc8c5e feat: Adds file-client tests. 2024-12-16 19:00:42 -05:00
85b285347b feat: Removes cli-client 2024-12-16 17:14:25 -05:00
8c402f3f5f feat: Adds command documentation about piping to other commands. 2024-12-16 12:41:49 -05:00
1429c51821 feat: Adds output values to some of the commands to allow them to be piped into other commands 2024-12-16 12:28:38 -05:00
1302b15ee2 feat: Integrates vault-client into hpa-executable. 2024-12-16 10:57:14 -05:00
da810d0a45 feat: Integrates playbook client into hpa-executable. 2024-12-16 10:29:58 -05:00
35d9422f07 feat: Updates playbook client initialization. 2024-12-15 21:16:11 -05:00
601869d457 feat: Adds vault client 2024-12-15 17:27:28 -05:00
6d0108da0c feat: Adds createProject and createJson tests for playbook-client. 2024-12-15 11:59:50 -05:00
bc0b740f95 feat: Moves playbook run into playbook client, need to move tests. 2024-12-14 23:14:01 -05:00
303cdef84b feat: Preparing to move items out of cli-client module into playbook-client 2024-12-14 10:06:30 -05:00
b5afc77428 feat: Beginning to refactor cli-client 2024-12-13 23:00:40 -05:00
3f56dda568 feat: Adds generate commands that call to pandoc to generate pdf, latex, and html files from a project. 2024-12-13 15:33:20 -05:00
d1b3379815 feat: Adds playbook client 2024-12-13 11:27:43 -05:00
b557a60fa3 feat: Adds build-with-version plugin. 2024-12-13 08:19:36 -05:00
5f4ef3b5b5 feat: Moves playbook into resources of cli-client. 2024-12-12 19:39:52 -05:00
ba1e61d99e feat: Updates 'extraArgs' naming to 'extraOptions' as it's more inline with the usage of them 2024-12-12 18:21:13 -05:00
bd56660683 feat: fixes improper json when creating a project using a repository 2024-12-12 18:01:32 -05:00
a480e942bc feat: fixes install dependencies to use texlive 2024-12-12 17:01:56 -05:00
2b265a4ca5 feat: Adds install-dependencies command. 2024-12-12 13:39:11 -05:00
56a0bca00c feat: Fixes not creating default config directory 2024-12-12 12:37:14 -05:00
7b30b78b67 feat: Moves logging setup and generate-json for the create command to cli-client module. 2024-12-12 11:16:22 -05:00
ce6eb3ec2f feat: Working on moving commands to cli-client 2024-12-12 07:46:26 -05:00
8302ede99e fix: Fixes gitignore to not ignore configuration resources. 2024-12-11 18:15:11 -05:00
d9e91538fb feat: Adds more tests for cli-client. 2024-12-11 17:03:43 -05:00
c1a14ea855 feat: Moves commands into cli-client module, adds tests, needs implemented in the executable. 2024-12-11 14:41:06 -05:00
ddb5e6767a feat: Begins moving run commands into cli-client module 2024-12-11 12:31:41 -05:00
9c784d4dcb feat: Breaking out more dependencies. 2024-12-11 09:23:34 -05:00
92cd6afa2b feat: Breaking out more dependencies. 2024-12-10 17:08:17 -05:00
87390c4b63 feat: Begins work on supporting toml for configuration. 2024-12-09 17:00:52 -05:00
a8d35fed37 feat: Updates cli documentation for utils commands. 2024-12-09 11:43:31 -05:00
357914ba93 feat: Updates cli documentation to use the swift-cli-doc package. 2024-12-09 11:27:27 -05:00
a39536364b feat: Commit pre switch to swift-cli-doc package. 2024-12-09 09:43:04 -05:00
3 changed files with 82 additions and 2 deletions

68
.gitea/workflows/release.yml Executable file
View File

@@ -0,0 +1,68 @@
#
name: Create and publish a Docker image
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['release']
tags:
- '*'
workflow_dispatch:
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: git.housh.dev
IMAGE_NAME: ${{ gitea.repository }}
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.CONTAINER_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."
# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@v1
# with:
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
# subject-digest: ${{ steps.push.outputs.digest }}
# push-to-registry: true
# github-token: ${{ secrets.CONTAINER_TOKEN }}

View File

@@ -114,8 +114,8 @@ let package = Package(
.target( .target(
name: "PlaybookClient", name: "PlaybookClient",
dependencies: [ dependencies: [
"CommandClient",
"CodersClient", "CodersClient",
"CommandClient",
"ConfigurationClient", "ConfigurationClient",
"FileClient", "FileClient",
.product(name: "Dependencies", package: "swift-dependencies"), .product(name: "Dependencies", package: "swift-dependencies"),

View File

@@ -35,6 +35,18 @@ struct ConfigurationClientTests: TestCase {
#expect(FileManager.default.fileExists(atPath: tempFile.cleanFilePath)) #expect(FileManager.default.fileExists(atPath: tempFile.cleanFilePath))
#expect(fileClient.fileExists(tempFile)) #expect(fileClient.fileExists(tempFile))
#expect(output == tempFile.cleanFilePath) #expect(output == tempFile.cleanFilePath)
// Ensure that we do not overwrite files if they exist.
do {
_ = try await configuration.generate(.init(
force: false,
json: fileName.hasSuffix("json"),
path: .file(File(tempFile)!)
))
#expect(Bool(false))
} catch {
#expect(Bool(true))
}
} }
} }
} }
@@ -140,7 +152,7 @@ struct ConfigurationClientTests: TestCase {
try await withGeneratedConfigFile(named: "config.toml", client: client) { configFile in try await withGeneratedConfigFile(named: "config.toml", client: client) { configFile in
@Dependency(\.fileClient) var fileClient @Dependency(\.fileClient) var fileClient
let backupUrl = configFile.url.appendingPathExtension("back") let backupUrl = configFile.url.appendingPathExtension(".back")
#expect(fileClient.fileExists(backupUrl) == false) #expect(fileClient.fileExists(backupUrl) == false)
let config = Configuration() let config = Configuration()