Opinionated Android 15+ Linux Terminal Setup
android linux command-line-tools

ci: update .fluentci

+4 -491
+1 -1
.fluentci/mod.ts
··· 1 - export * from "./src/dagger/index.ts"; 1 + export * from "./src/mod.ts";
-39
.fluentci/src/aws/README.md
··· 1 - # AWS CodePipeline 2 - 3 - [![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) 4 - [![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) 5 - ![deno compatibility](https://shield.deno.dev/deno/^1.34) 6 - [![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) 7 - 8 - The following command will generate a `buildspec.yml` file in your project: 9 - 10 - ```bash 11 - fluentci ac init -t rust_pipeline 12 - ``` 13 - 14 - Generated file: 15 - 16 - ```yaml 17 - # Do not edit this file directly. It is generated by https://deno.land/x/fluent_aws_codepipeline 18 - 19 - version: 0.2 20 - phases: 21 - install: 22 - commands: 23 - - curl -fsSL https://deno.land/x/install/install.sh | sh 24 - - export DENO_INSTALL="$HOME/.deno" 25 - - export PATH="$DENO_INSTALL/bin:$PATH" 26 - - deno install -A -r https://cli.fluentci.io -n fluentci 27 - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 28 - - mv bin/dagger /usr/local/bin 29 - - dagger version 30 - build: 31 - commands: 32 - - fluentci run rust_pipeline test build 33 - post_build: 34 - commands: 35 - - echo Build completed on `date` 36 - 37 - ``` 38 - 39 - Feel free to edit the template generator at `.fluentci/src/aws/config.ts` to your needs.
-24
.fluentci/src/aws/config.ts
··· 1 - import { BuildSpec } from "fluent_aws_codepipeline"; 2 - 3 - export function generateYaml(): BuildSpec { 4 - const buildspec = new BuildSpec(); 5 - buildspec 6 - .phase("install", { 7 - commands: [ 8 - "curl -fsSL https://deno.land/x/install/install.sh | sh", 9 - 'export DENO_INSTALL="$HOME/.deno"', 10 - 'export PATH="$DENO_INSTALL/bin:$PATH"', 11 - "deno install -A -r https://cli.fluentci.io -n fluentci", 12 - "curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh", 13 - "mv bin/dagger /usr/local/bin", 14 - "dagger version", 15 - ], 16 - }) 17 - .phase("build", { 18 - commands: ["fluentci run rust_pipeline test build"], 19 - }) 20 - .phase("post_build", { 21 - commands: ["echo Build completed on `date`"], 22 - }); 23 - return buildspec; 24 - }
-9
.fluentci/src/aws/config_test.ts
··· 1 - import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; 2 - import { generateYaml } from "./config.ts"; 3 - 4 - Deno.test(function generateAWSCodePipelineTest() { 5 - const buildspec = generateYaml(); 6 - const actual = buildspec.toString(); 7 - const expected = Deno.readTextFileSync("./fixtures/buildspec.yml"); 8 - assertEquals(actual, expected); 9 - });
-3
.fluentci/src/aws/init.ts
··· 1 - import { generateYaml } from "./config.ts"; 2 - 3 - generateYaml().save("buildspec.yml");
-42
.fluentci/src/azure/README.md
··· 1 - # Azure Pipelines 2 - 3 - [![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) 4 - [![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) 5 - ![deno compatibility](https://shield.deno.dev/deno/^1.34) 6 - [![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) 7 - 8 - The following command will generate a `azure-pipelines.yml` file in your project: 9 - 10 - ```bash 11 - fluentci ap init -t rust_pipeline 12 - ``` 13 - 14 - Generated file: 15 - 16 - ```yaml 17 - # Do not edit this file directly. It is generated by https://deno.land/x/fluent_azure_pipelines 18 - 19 - trigger: 20 - - main 21 - pool: 22 - name: Default 23 - vmImage: ubuntu-latest 24 - steps: 25 - - script: | 26 - curl -fsSL https://deno.land/x/install/install.sh | sh 27 - export DENO_INSTALL="$HOME/.deno" 28 - export PATH="$DENO_INSTALL/bin:$PATH" 29 - displayName: Install Deno 30 - - script: deno install -A -r https://cli.fluentci.io -n fluentci 31 - displayName: Setup Fluent CI CLI 32 - - script: | 33 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 34 - sudo mv bin/dagger /usr/local/bin 35 - dagger version 36 - displayName: Setup Dagger 37 - - script: fluentci run rust_pipeline test build 38 - displayName: Run Dagger Pipelines 39 - 40 - ``` 41 - 42 - Feel free to edit the template generator at `.fluentci/src/azure/config.ts` to your needs.
-41
.fluentci/src/azure/config.ts
··· 1 - import { AzurePipeline } from "fluent_azure_pipelines"; 2 - 3 - export function generateYaml(): AzurePipeline { 4 - const azurePipeline = new AzurePipeline(); 5 - 6 - const installDeno = `\ 7 - curl -fsSL https://deno.land/x/install/install.sh | sh 8 - export DENO_INSTALL="$HOME/.deno" 9 - export PATH="$DENO_INSTALL/bin:$PATH" 10 - `; 11 - 12 - const setupDagger = `\ 13 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 14 - sudo mv bin/dagger /usr/local/bin 15 - dagger version 16 - `; 17 - 18 - azurePipeline 19 - .trigger(["main"]) 20 - .pool({ 21 - name: "Default", 22 - vmImage: "ubuntu-latest", 23 - }) 24 - .step({ 25 - script: installDeno, 26 - displayName: "Install Deno", 27 - }) 28 - .step({ 29 - script: "deno install -A -r https://cli.fluentci.io -n fluentci", 30 - displayName: "Setup Fluent CI CLI", 31 - }) 32 - .step({ 33 - script: setupDagger, 34 - displayName: "Setup Dagger", 35 - }) 36 - .step({ 37 - script: "fluentci run rust_pipeline test build", 38 - displayName: "Run Dagger Pipelines", 39 - }); 40 - return azurePipeline; 41 - }
-9
.fluentci/src/azure/config_test.ts
··· 1 - import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; 2 - import { generateYaml } from "./config.ts"; 3 - 4 - Deno.test(function generateAzurePipelinesTest() { 5 - const azurepipelines = generateYaml(); 6 - const actual = azurepipelines.toString(); 7 - const expected = Deno.readTextFileSync("./fixtures/azure-pipelines.yml"); 8 - assertEquals(actual, expected); 9 - });
-3
.fluentci/src/azure/init.ts
··· 1 - import { generateYaml } from "./config.ts"; 2 - 3 - generateYaml().save("azure-pipeline.yml");
-47
.fluentci/src/circleci/README.md
··· 1 - # Circle CI 2 - 3 - [![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) 4 - [![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) 5 - ![deno compatibility](https://shield.deno.dev/deno/^1.34) 6 - [![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) 7 - 8 - 9 - The following command will generate a `.circleci/config.yml` file in your project: 10 - 11 - ```bash 12 - fluentci cci init -t rust_pipeline 13 - ``` 14 - 15 - Generated file: 16 - 17 - ```yaml 18 - # Do not edit this file directly. It is generated by https://deno.land/x/fluent_circleci 19 - 20 - version: 2.1 21 - jobs: 22 - tests: 23 - steps: 24 - - checkout 25 - - run: sudo apt-get update && sudo apt-get install -y curl unzip 26 - - run: | 27 - curl -fsSL https://deno.land/x/install/install.sh | sh 28 - export DENO_INSTALL="$HOME/.deno" 29 - export PATH="$DENO_INSTALL/bin:$PATH" 30 - - run: deno install -A -r https://cli.fluentci.io -n fluentci 31 - - run: | 32 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 33 - sudo mv bin/dagger /usr/local/bin 34 - dagger version 35 - - run: 36 - name: Upload Coverage 37 - command: fluentci run rust_pipeline test build 38 - machine: 39 - image: ubuntu-2004:2023.07.1 40 - workflows: 41 - dagger: 42 - jobs: 43 - - tests 44 - 45 - ``` 46 - 47 - Feel free to edit the template generator at `.fluentci/src/circleci/config.ts` to your needs.
-37
.fluentci/src/circleci/config.ts
··· 1 - import { CircleCI, Job } from "fluent_circleci"; 2 - 3 - export function generateYaml(): CircleCI { 4 - const circleci = new CircleCI(); 5 - 6 - const tests = new Job().machine({ image: "ubuntu-2004:2023.07.1" }).steps([ 7 - "checkout", 8 - { 9 - run: "sudo apt-get update && sudo apt-get install -y curl unzip", 10 - }, 11 - { 12 - run: `\ 13 - curl -fsSL https://deno.land/x/install/install.sh | sh 14 - export DENO_INSTALL="$HOME/.deno" 15 - export PATH="$DENO_INSTALL/bin:$PATH"`, 16 - }, 17 - { 18 - run: "deno install -A -r https://cli.fluentci.io -n fluentci", 19 - }, 20 - { 21 - run: `\ 22 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 23 - sudo mv bin/dagger /usr/local/bin 24 - dagger version`, 25 - }, 26 - { 27 - run: { 28 - name: "Run Dagger Pipelines", 29 - command: "fluentci run rust_pipeline test build", 30 - }, 31 - }, 32 - ]); 33 - 34 - circleci.jobs({ tests }).workflow("dagger", ["tests"]); 35 - 36 - return circleci; 37 - }
-9
.fluentci/src/circleci/config_test.ts
··· 1 - import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; 2 - import { generateYaml } from "./config.ts"; 3 - 4 - Deno.test(function generateCircleCITest() { 5 - const circleci = generateYaml(); 6 - const actual = circleci.toString(); 7 - const expected = Deno.readTextFileSync("./fixtures/config.yml"); 8 - assertEquals(actual, expected); 9 - });
-3
.fluentci/src/circleci/init.ts
··· 1 - import { generateYaml } from "./config.ts"; 2 - 3 - generateYaml().save(".circleci/config.yml");
.fluentci/src/dagger/index.ts .fluentci/src/mod.ts
+1 -1
.fluentci/src/dagger/jobs.ts .fluentci/src/jobs.ts
··· 1 - import { dag } from "../../sdk/client.gen.ts"; 1 + import { dag } from "../sdk/client.gen.ts"; 2 2 import { buildRustFlags, getDirectory } from "./lib.ts"; 3 3 4 4 export enum Job {
+2 -2
.fluentci/src/dagger/lib.ts .fluentci/src/lib.ts
··· 1 - import { dag } from "../../sdk/client.gen.ts"; 2 - import { Directory, DirectoryID } from "../../deps.ts"; 1 + import { Directory, DirectoryID } from "../deps.ts"; 2 + import { dag } from "../sdk/client.gen.ts"; 3 3 4 4 export const getDirectory = async ( 5 5 src: string | Directory | undefined = "."
-20
.fluentci/src/dagger/list_jobs.ts
··· 1 - import { brightGreen, stringifyTree } from "../../deps.ts"; 2 - import { runnableJobs, jobDescriptions, Job } from "./jobs.ts"; 3 - 4 - const tree = { 5 - name: brightGreen("rust_pipeline"), 6 - children: (Object.keys(runnableJobs) as Job[]).map((job) => ({ 7 - name: jobDescriptions[job] 8 - ? `${brightGreen(job)} - ${jobDescriptions[job]}` 9 - : brightGreen(job), 10 - children: [], 11 - })), 12 - }; 13 - 14 - console.log( 15 - stringifyTree( 16 - tree, 17 - (t) => t.name, 18 - (t) => t.children 19 - ) 20 - );
.fluentci/src/dagger/pipeline.ts .fluentci/src/pipeline.ts
.fluentci/src/dagger/runner.ts .fluentci/src/runner.ts
-50
.fluentci/src/github/README.md
··· 1 - # Github Actions 2 - 3 - [![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) 4 - [![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) 5 - ![deno compatibility](https://shield.deno.dev/deno/^1.34) 6 - [![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) 7 - 8 - The following command will generate a `.github/workflows/tests.yml` file in your project: 9 - 10 - ```bash 11 - fluentci gh init -t rust_pipeline 12 - ``` 13 - 14 - Or, if you already have a `.fluentci` folder (generated from `fluentci init -t rust`) in your project: 15 - 16 - ```bash 17 - fluentci gh init 18 - ``` 19 - 20 - Generated file: 21 - 22 - ```yaml 23 - # Do not edit this file directly. It is generated by https://deno.land/x/fluent_github_actions 24 - 25 - name: Test 26 - on: 27 - push: 28 - branches: 29 - - main 30 - jobs: 31 - test: 32 - runs-on: ubuntu-latest 33 - steps: 34 - - uses: actions/checkout@v2 35 - - uses: denoland/setup-deno@v1 36 - with: 37 - deno-version: v1.37 38 - - name: Setup Fluent CI CLI 39 - run: deno install -A -r https://cli.fluentci.io -n fluentci 40 - - name: Setup Dagger 41 - run: | 42 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 43 - sudo mv bin/dagger /usr/local/bin 44 - dagger version 45 - - name: Run Tests and Build 46 - run: fluentci run rust_pipeline test build 47 - 48 - ``` 49 - 50 - Feel free to edit the template generator at `.fluentci/src/github/config.ts` to your needs.
-45
.fluentci/src/github/config.ts
··· 1 - import { JobSpec, Workflow } from "fluent_github_actions"; 2 - 3 - export function generateYaml(): Workflow { 4 - const workflow = new Workflow("Test"); 5 - 6 - const push = { 7 - branches: ["main"], 8 - }; 9 - 10 - const setupDagger = `\ 11 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 12 - sudo mv bin/dagger /usr/local/bin 13 - dagger version`; 14 - 15 - const test: JobSpec = { 16 - "runs-on": "ubuntu-latest", 17 - steps: [ 18 - { 19 - uses: "actions/checkout@v2", 20 - }, 21 - { 22 - uses: "denoland/setup-deno@v1", 23 - with: { 24 - "deno-version": "v1.37", 25 - }, 26 - }, 27 - { 28 - name: "Setup Fluent CI CLI", 29 - run: "deno install -A -r https://cli.fluentci.io -n fluentci", 30 - }, 31 - { 32 - name: "Setup Dagger", 33 - run: setupDagger, 34 - }, 35 - { 36 - name: "Run Tests and Build", 37 - run: "fluentci run rust_pipeline test build", 38 - }, 39 - ], 40 - }; 41 - 42 - workflow.on({ push }).jobs({ test }); 43 - 44 - return workflow; 45 - }
-9
.fluentci/src/github/config_test.ts
··· 1 - import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; 2 - import { generateYaml } from "./config.ts"; 3 - 4 - Deno.test(function generateGithubActionsWorkflowTest() { 5 - const workflow = generateYaml(); 6 - const actual = workflow.toString(); 7 - const expected = Deno.readTextFileSync("./fixtures/workflow.yml"); 8 - assertEquals(actual, expected); 9 - });
-3
.fluentci/src/github/init.ts
··· 1 - import { generateYaml } from "./config.ts"; 2 - 3 - generateYaml().save(".github/workflows/tests.yml");
-48
.fluentci/src/gitlab/README.md
··· 1 - # Gitlab CI 2 - 3 - [![fluentci pipeline](https://img.shields.io/badge/dynamic/json?label=pkg.fluentci.io&labelColor=%23000&color=%23460cf1&url=https%3A%2F%2Fapi.fluentci.io%2Fv1%2Fpipeline%2Frust_pipeline&query=%24.version)](https://pkg.fluentci.io/rust_pipeline) 4 - [![deno module](https://shield.deno.dev/x/rust_pipeline)](https://deno.land/x/rust_pipeline) 5 - ![deno compatibility](https://shield.deno.dev/deno/^1.34) 6 - [![](https://img.shields.io/codecov/c/gh/fluent-ci-templates/rust-pipeline)](https://codecov.io/gh/fluent-ci-templates/rust-pipeline) 7 - 8 - The following command will generate a `.gitlab-ci.yml` file in your project: 9 - 10 - ```bash 11 - fluentci gl init -t rust_pipeline 12 - ``` 13 - 14 - Generated file: 15 - 16 - ```yaml 17 - 18 - # Do not edit this file directly. It is generated by https://deno.land/x/fluent_gitlab_ci 19 - 20 - .docker: 21 - image: denoland/deno:alpine 22 - services: 23 - - docker:${DOCKER_VERSION}-dind 24 - variables: 25 - DOCKER_HOST: tcp://docker:2376 26 - DOCKER_TLS_VERIFY: "1" 27 - DOCKER_TLS_CERTDIR: /certs 28 - DOCKER_CERT_PATH: /certs/client 29 - DOCKER_DRIVER: overlay2 30 - DOCKER_VERSION: 20.10.16 31 - 32 - .dagger: 33 - extends: .docker 34 - before_script: 35 - - apk add docker-cli curl unzip 36 - - deno install -A -r https://cli.fluentci.io -n fluentci 37 - - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 38 - - mv bin/dagger /usr/local/bin 39 - - dagger version 40 - 41 - tests: 42 - extends: .dagger 43 - script: 44 - - fluentci run rust_pipeline test build 45 - 46 - ``` 47 - 48 - Feel free to edit the template generator at `.fluentci/src/gitlab/config.ts` to your needs.
-34
.fluentci/src/gitlab/config.ts
··· 1 - import { GitlabCI, Job } from "fluent_gitlab_ci"; 2 - 3 - export function generateYaml(): GitlabCI { 4 - const docker = new Job() 5 - .image("denoland/deno:alpine") 6 - .services(["docker:${DOCKER_VERSION}-dind"]) 7 - .variables({ 8 - DOCKER_HOST: "tcp://docker:2376", 9 - DOCKER_TLS_VERIFY: "1", 10 - DOCKER_TLS_CERTDIR: "/certs", 11 - DOCKER_CERT_PATH: "/certs/client", 12 - DOCKER_DRIVER: "overlay2", 13 - DOCKER_VERSION: "20.10.16", 14 - }); 15 - 16 - const dagger = new Job().extends(".docker").beforeScript( 17 - ` 18 - apk add docker-cli curl unzip 19 - deno install -A -r https://cli.fluentci.io -n fluentci 20 - curl -L https://dl.dagger.io/dagger/install.sh | DAGGER_VERSION=0.8.1 sh 21 - mv bin/dagger /usr/local/bin 22 - dagger version 23 - ` 24 - ); 25 - 26 - const tests = new Job() 27 - .extends(".dagger") 28 - .script("fluentci run rust_pipeline test build"); 29 - 30 - return new GitlabCI() 31 - .addJob(".docker", docker) 32 - .addJob(".dagger", dagger) 33 - .addJob("tests", tests); 34 - }
-9
.fluentci/src/gitlab/config_test.ts
··· 1 - import { assertEquals } from "https://deno.land/std@0.191.0/testing/asserts.ts"; 2 - import { generateYaml } from "./config.ts"; 3 - 4 - Deno.test(function generateGitlabCITest() { 5 - const gitlabci = generateYaml(); 6 - const actual = gitlabci.toString(); 7 - const expected = Deno.readTextFileSync("./fixtures/.gitlab-ci.yml"); 8 - assertEquals(actual, expected); 9 - });
-3
.fluentci/src/gitlab/init.ts
··· 1 - import { generateYaml } from "./config.ts"; 2 - 3 - generateYaml().write();