-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathpublish-dry-run.sh
More file actions
executable file
·27 lines (20 loc) · 1018 Bytes
/
publish-dry-run.sh
File metadata and controls
executable file
·27 lines (20 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -euo pipefail
echo ${DOCKER_TOKEN} | sudo docker login --username ${DOCKER_USERNAME} --password-stdin
sudo PATH=${PATH} GITHUB_TOKEN=${GITHUB_TOKEN} make products-for-release
mkdir -p ${ARTIFACT_DIRECTORY}
# Copy the Docker image that goreleaser just built into the artifacts - we only do
# this in a dry run, because in a real release the image will be available from
# DockerHub anyway so there's no point in attaching it to the release.
BASE_CODEREFS=ld-find-code-refs
GH_CODEREFS=ld-find-code-refs-github-action
BB_CODEREFS=ld-find-code-refs-bitbucket-pipeline
sudo docker save launchdarkly/${BASE_CODEREFS}:latest | gzip >${ARTIFACT_DIRECTORY}/${BASE_CODEREFS}.tar.gz
sudo docker save launchdarkly/${GH_CODEREFS}:latest | gzip >${ARTIFACT_DIRECTORY}/${GH_CODEREFS}.tar.gz
sudo docker save launchdarkly/${BB_CODEREFS}:latest | gzip >${ARTIFACT_DIRECTORY}/${BB_CODEREFS}.tar.gz
for script in $(dirname $0)/targets/*.sh; do
source $script
done
dry_run_bitbucket
dry_run_gha
dry_run_circleci