Skip to content

Commit 1046ba5

Browse files
committed
Update replicated release task
Signed-off-by: Evans Mungai <evans@replicated.com>
1 parent 4d263a1 commit 1046ba5

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

applications/wg-easy/Taskfile.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ includes:
66

77
vars:
88
# Application configuration
9-
APP_NAME: '{{.REPLICATED_APP | default "wg-easy"}}'
9+
APP_SLUG: '{{.REPLICATED_APP | default "wg-easy"}}'
1010

1111
# Cluster configuration
1212
CLUSTER_NAME: '{{.CLUSTER_NAME | default "test-cluster"}}'
@@ -126,6 +126,7 @@ tasks:
126126
dependencies-update:
127127
desc: Update Helm dependencies for all charts
128128
silent: false
129+
run: once
129130
cmds:
130131
- echo "Updating Helm dependencies for all charts..."
131132
- |
@@ -276,20 +277,24 @@ tasks:
276277
done
277278
278279
- echo "Release files prepared in ./release/ directory"
280+
deps:
281+
- dependencies-update
279282

280283
release-create:
281284
desc: Create and promote a release using the Replicated CLI
282285
silent: false
283286
vars:
284287
CHANNEL: '{{.CHANNEL | default "Unstable"}}'
285288
RELEASE_NOTES: '{{.RELEASE_NOTES | default "Release created via task release-create"}}'
289+
requires:
290+
vars: [APP_SLUG, VERSION]
286291
cmds:
287-
- echo "Creating and promoting release for $APP_NAME to channel $CHANNEL..."
292+
- echo "Creating and promoting release for {{.APP_SLUG}} to channel {{.CHANNEL}}..."
288293
- |
289294
# Create and promote the release in one step
290295
echo "Creating release from files in ./release directory..."
291-
replicated release create --app $APP_NAME --yaml-dir ./release --release-notes "$RELEASE_NOTES" --promote $CHANNEL --version $VERSION
292-
echo "Release version $VERSION created and promoted to channel $CHANNEL"
296+
replicated release create --app {{.APP_SLUG}} --yaml-dir ./release --release-notes "{{.RELEASE_NOTES}}" --promote {{.CHANNEL}} --version {{.VERSION}}
297+
echo "Release version {{.VERSION}} created and promoted to channel {{.CHANNEL}}"
293298
deps:
294299
- release-prepare
295300

@@ -338,12 +343,12 @@ tasks:
338343
status:
339344
- |
340345
# Check if the application tarball has already been downloaded and extracted
341-
gcloud compute ssh {{.VM_NAME}} --project={{.GCP_PROJECT}} --zone={{.GCP_ZONE}} --command="test -d ./{{.APP_NAME}}" &>/dev/null
346+
gcloud compute ssh {{.VM_NAME}} --project={{.GCP_PROJECT}} --zone={{.GCP_ZONE}} --command="test -d ./{{.APP_SLUG}}" &>/dev/null
342347
cmds:
343348
- task: utils:gcp-operations
344349
vars:
345350
OPERATION: "setup-embedded"
346-
APP_NAME: '{{.APP_NAME}}'
351+
APP_SLUG: '{{.APP_SLUG}}'
347352
CHANNEL: '{{.CHANNEL}}'
348353
AUTH_TOKEN: '{{.AUTH_TOKEN}}'
349354
GCP_PROJECT: '{{.GCP_PROJECT}}'

applications/wg-easy/container/Containerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ RUN apt-get update && apt-get install -y \
1717
curl \
1818
jq \
1919
less \
20-
yq \
2120
gnupg \
2221
bash-completion \
2322

@@ -42,6 +41,14 @@ RUN curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | b
4241
# Install Task
4342
&& sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin \
4443

44+
# Install yq
45+
&& curl -Ls $(curl -s https://api.github.com/repos/mikefarah/yq/releases/latest \
46+
| grep "browser_download_url.*linux_${TARGETARCH}" \
47+
| cut -d : -f 2,3 \
48+
| tr -d \") -o yq \
49+
&& chmod +x yq \
50+
&& mv yq /usr/local/bin/yq \
51+
4552
# Install Helmfile
4653
&& curl -Ls $(curl -s https://api.github.com/repos/helmfile/helmfile/releases/latest \
4754
| grep "browser_download_url.*linux_${TARGETARCH}.tar.gz" \

applications/wg-easy/replicated/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: kots.io/v1beta1
23
kind: Application
34
metadata:

0 commit comments

Comments
 (0)