From aa5ee55059c87f9814b7bf22e23e2cb9781f4644 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Mon, 31 Jan 2022 23:39:04 +0100 Subject: [PATCH] Tweaked CI a bit --- .woodpecker/{.publish.yml => .docker.yml} | 4 +--- .woodpecker/{.release.yml => .gitea.yml} | 12 ++++-------- .woodpecker/.image.yml | 21 --------------------- test.py | 2 +- 4 files changed, 6 insertions(+), 33 deletions(-) rename .woodpecker/{.publish.yml => .docker.yml} (93%) rename .woodpecker/{.release.yml => .gitea.yml} (67%) delete mode 100644 .woodpecker/.image.yml diff --git a/.woodpecker/.publish.yml b/.woodpecker/.docker.yml similarity index 93% rename from .woodpecker/.publish.yml rename to .woodpecker/.docker.yml index 22183c58..f23b3df0 100644 --- a/.woodpecker/.publish.yml +++ b/.woodpecker/.docker.yml @@ -25,9 +25,7 @@ pipeline: settings: repo: chewingbever/vieter dockerfile: Dockerfile.ci - tag: - - latest - - ${CI_COMMIT_TAG} + auto_tag: true platforms: [ linux/arm/v7, linux/arm64/v8, linux/amd64 ] build_args_from_env: - CI_COMMIT_SHA diff --git a/.woodpecker/.release.yml b/.woodpecker/.gitea.yml similarity index 67% rename from .woodpecker/.release.yml rename to .woodpecker/.gitea.yml index c7527cbb..e6062eb6 100644 --- a/.woodpecker/.release.yml +++ b/.woodpecker/.gitea.yml @@ -13,13 +13,10 @@ pipeline: pull: true secrets: [ s3_username, s3_password ] commands: - - git clone "$CI_REPO_REMOTE" . - - git checkout "$CI_COMMIT_BRANCH" - # Write the title to a file that the plugin can then read - - echo "$(git describe --tags --abbrev=0 2> /dev/null || echo '0.0.0')-$(git rev-list --count ^dev)" > title - - cat title - mc alias set s3/ https://s3.rustybever.be "$S3_USERNAME" "$S3_PASSWORD" - mc cp -r "s3/vieter/commits/$CI_COMMIT_SHA" assets + when: + event: tag release: image: 'plugins/gitea-release' @@ -32,7 +29,6 @@ pipeline: - md5 - sha256 prerelease: true - # This should get read in as a file - title: title + title: ${CI_COMMIT_TAG} when: - event: push + event: tag diff --git a/.woodpecker/.image.yml b/.woodpecker/.image.yml deleted file mode 100644 index 27072a0b..00000000 --- a/.woodpecker/.image.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Because the only step here is a pull_request event, the branch should be dev -# because it has to be the target of the pull request -branches: dev -platform: linux/amd64 -depends_on: [ build ] - -pipeline: - dryrun: - image: woodpeckerci/plugin-docker-buildx - secrets: [ docker_username, docker_password ] - settings: - dockerfile: Dockerfile.ci - repo: chewingbever/vieter - tag: dev - platforms: [ linux/arm/v7, linux/arm64/v8, linux/amd64 ] - dry_run: true - build_args_from_env: - - CI_COMMIT_SHA - when: - event: pull_request - branch: dev diff --git a/test.py b/test.py index 2d1e4f56..5721310b 100644 --- a/test.py +++ b/test.py @@ -38,7 +38,7 @@ def create_random_pkginfo(words, name_min_len, name_max_len): Generates a random .PKGINFO """ name = "-".join(random_words(words, name_min_len, name_max_len)) - ver = "0.1.0" # doesn't matter what it is anyways + ver = "0.1.0-1" # doesn't matter what it is anyways # TODO add random dependencies (all types)