From 86140ea516d8369722f2dbf92d06a83998c6629d Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Fri, 8 Dec 2023 18:49:20 +0100 Subject: [PATCH] Build with anchors --- .drone.yml | 19 +++++++++++-------- Containerfile | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1cd8333..a3f2599 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,6 +28,9 @@ name: Build badhouseplants.net trigger: event: - push +builder: &builder + image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:555262114ea81f6f286010474527f419b56d33a3 + clone: disable: true steps: @@ -45,8 +48,8 @@ steps: - clone commands: - hugo -s ./src - - name: Build and push the docker image - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 + - <<: *builder + name: Build and push the docker image privileged: true depends_on: - Test a build @@ -56,8 +59,8 @@ steps: from_secret: GITEA_TOKEN commands: - ./scripts/build-container.pl - - name: Sync pictures from lfs to Minio - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 + - <<: *builder + name: Sync pictures from lfs to Minio depends_on: - Test a build environment: @@ -67,8 +70,8 @@ steps: commands: - echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG - ./scripts/upload-media.pl - - name: Deploy the application - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 + - <<: *builder + name: Deploy the application depends_on: - Build and push the docker image - Sync pictures from lfs to Minio @@ -84,8 +87,8 @@ steps: DEPLOY_SCRIPT_DEBUG: true commands: - ./scripts/deploy-app.pl - - name: Cleanup everything - image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 + - <<: *builder + name: Cleanup everything depends_on: - Deploy the application environment: diff --git a/Containerfile b/Containerfile index 7173409..ba3e14f 100644 --- a/Containerfile +++ b/Containerfile @@ -1,4 +1,4 @@ -FROM git.badhouseplants.net/badhouseplants/hugo-container:df0ab0c6f98e1921f451eb444aa5e7cb03d1f27b +FROM git.badhouseplants.net/badhouseplants/hugo-container:3daaf01c9811501f2b4c691f6910e3df285c2007 WORKDIR /src COPY ./src /src ENTRYPOINT ["hugo"]