From 93d22240731a22d6232ee05e44dc586472811f0d Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Mon, 4 Apr 2022 17:40:16 -0700 Subject: [PATCH] ci: move ci infra top-level Signed-off-by: Andrea Luzzardi --- .github/workflows/dagger-ci.yml | 2 -- ci/main.cue => ci.cue | 15 ++++++++------- ci/.gitignore | 1 - ci/README.md | 7 ------- ci/cue.mod/module.cue | 1 - ci/cue.mod/pkg | 1 - ci/{pkg => }/golangci/lint.cue | 0 ci/{pkg => }/markdownlint/markdownlint.cue | 0 ci/{pkg => }/shellcheck/shellcheck.cue | 0 cue.mod/module.cue | 2 +- 10 files changed, 9 insertions(+), 20 deletions(-) rename ci/main.cue => ci.cue (90%) delete mode 100644 ci/.gitignore delete mode 100644 ci/README.md delete mode 100644 ci/cue.mod/module.cue delete mode 120000 ci/cue.mod/pkg rename ci/{pkg => }/golangci/lint.cue (100%) rename ci/{pkg => }/markdownlint/markdownlint.cue (100%) rename ci/{pkg => }/shellcheck/shellcheck.cue (100%) diff --git a/.github/workflows/dagger-ci.yml b/.github/workflows/dagger-ci.yml index 98622eee..95e0c2b3 100644 --- a/.github/workflows/dagger-ci.yml +++ b/.github/workflows/dagger-ci.yml @@ -55,7 +55,6 @@ jobs: DAGGER_CACHE_TO: "type=gha,mode=max,scope=dagger-ci-build" DAGGER_CACHE_FROM: "type=gha,scope=dagger-ci-build" run: | - cd ci dagger do build lint: @@ -83,5 +82,4 @@ jobs: DAGGER_CACHE_TO: "type=gha,mode=max,scope=dagger-ci-lint" DAGGER_CACHE_FROM: "type=gha,scope=dagger-ci-lint" run: | - cd ci dagger do lint diff --git a/ci/main.cue b/ci.cue similarity index 90% rename from ci/main.cue rename to ci.cue index b05fedd3..310f4b18 100644 --- a/ci/main.cue +++ b/ci.cue @@ -8,9 +8,9 @@ import ( "universe.dagger.io/docker" "universe.dagger.io/go" - "github.com/dagger/dagger/ci/pkg/golangci" - "github.com/dagger/dagger/ci/pkg/shellcheck" - "github.com/dagger/dagger/ci/pkg/markdownlint" + "github.com/dagger/dagger/ci/golangci" + "github.com/dagger/dagger/ci/shellcheck" + "github.com/dagger/dagger/ci/markdownlint" ) dagger.#Plan & { @@ -20,16 +20,16 @@ dagger.#Plan & { // platform: "linux/aarch64" platform: "linux/amd64" - client: filesystem: "../": read: exclude: [ - "ci", + client: filesystem: ".": read: exclude: [ + "bin", "**/node_modules", "cmd/dagger/dagger", "cmd/dagger/dagger-debug", ] - client: filesystem: "./build": write: contents: actions.build.output + client: filesystem: "./bin": write: contents: actions.build.output actions: { - _source: client.filesystem["../"].read.contents + _source: client.filesystem["."].read.contents // FIXME: this can be removed once `go` supports built-in VCS info version: { @@ -103,6 +103,7 @@ dagger.#Plan & { } cue: docker.#Build & { + // FIXME: spin off into its own package? steps: [ alpine.#Build & { packages: bash: _ diff --git a/ci/.gitignore b/ci/.gitignore deleted file mode 100644 index a007feab..00000000 --- a/ci/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/* diff --git a/ci/README.md b/ci/README.md deleted file mode 100644 index 0ad8a3d7..00000000 --- a/ci/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Dagger CI - -WORK IN PROGRESS - -This is the home of the new CI - -Reference: https://github.com/dagger/dagger/issues/1549 diff --git a/ci/cue.mod/module.cue b/ci/cue.mod/module.cue deleted file mode 100644 index c511367d..00000000 --- a/ci/cue.mod/module.cue +++ /dev/null @@ -1 +0,0 @@ -module: "github.com/dagger/dagger/ci" \ No newline at end of file diff --git a/ci/cue.mod/pkg b/ci/cue.mod/pkg deleted file mode 120000 index b49d704a..00000000 --- a/ci/cue.mod/pkg +++ /dev/null @@ -1 +0,0 @@ -../../pkg \ No newline at end of file diff --git a/ci/pkg/golangci/lint.cue b/ci/golangci/lint.cue similarity index 100% rename from ci/pkg/golangci/lint.cue rename to ci/golangci/lint.cue diff --git a/ci/pkg/markdownlint/markdownlint.cue b/ci/markdownlint/markdownlint.cue similarity index 100% rename from ci/pkg/markdownlint/markdownlint.cue rename to ci/markdownlint/markdownlint.cue diff --git a/ci/pkg/shellcheck/shellcheck.cue b/ci/shellcheck/shellcheck.cue similarity index 100% rename from ci/pkg/shellcheck/shellcheck.cue rename to ci/shellcheck/shellcheck.cue diff --git a/cue.mod/module.cue b/cue.mod/module.cue index b57d0104..dc80073f 100644 --- a/cue.mod/module.cue +++ b/cue.mod/module.cue @@ -1 +1 @@ -module: "" \ No newline at end of file +module: "github.com/dagger/dagger"