Skip to content

Commit 4ba966f

Browse files
authored
Fix yaml_extraction_prologue.sh to account for the move to JuliaCI, and fix some other outdated instances of staticfloat-->JuliaCI (#41)
* Fix `yaml_extraction_prologue.sh` to account for the move to JuliaCI * Fix some other outdated instances of `staticfloat-->JuliaCI` * Fix a big bug
1 parent 772e015 commit 4ba966f

8 files changed

Lines changed: 19 additions & 13 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ steps:
3434
env:
3535
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
3636
plugins:
37-
- staticfloat/cryptic:
37+
- JuliaCI/cryptic:
3838
files:
3939
# This file is actually only stored as `secret_message.txt.encrypted` in the repo,
4040
# and `cryptic` will create the `secret_message.txt` file from it, when it decrypts
@@ -75,7 +75,7 @@ steps:
7575
# In the WebUI, the `cryptic` launch job _must_ be the first job to run
7676
- label: ":rocket: launch pipelines"
7777
plugins:
78-
- staticfloat/cryptic:
78+
- JuliaCI/cryptic:
7979
# Our list of pipelines that should be launched (but don't require a signature)
8080
# These pipelines can be modified by any contributor and CI will still run.
8181
# Build secrets will not be available in these pipelines (or their children)

bin/encrypt_file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ cat <<-EOD
8181
locking down CI configuration and next steps.
8282
8383
plugins:
84-
- staticfloat/cryptic:
84+
- JuliaCI/cryptic:
8585
files:
8686
- ${FILE_PATH}
8787
EOD

bin/encrypt_variable

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cat <<-EOD
4141
locking down CI configuration and next steps.
4242
4343
plugins:
44-
- staticfloat/cryptic:
44+
- JuliaCI/cryptic:
4545
variables:
4646
- ${SECRET_NAME}="${ENCRYPTED_SECRET_VALUE}"
4747
EOD

example/.buildkite/codesign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ steps:
1010
env:
1111
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
1212
plugins:
13-
- staticfloat/cryptic:
13+
- JuliaCI/cryptic:
1414
files:
1515
- ".buildkite/secrets/codesign_key.txt"
1616
signed_pipelines:

example/.buildkite/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
env:
1010
BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET: ${BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET?}
1111
plugins:
12-
- staticfloat/cryptic:
12+
- JuliaCI/cryptic:
1313
variables:
1414
- S3_ACCESS_KEY="U2FsdGVkX1/CA5U5HCFuKSnLHk3bQBjFwN8VJZtAs5e3+tVs87UoM8A+VR+HC0jPyvx3cdDTyws8V1JDbzWCmRzq8IJ98hGtJNHrMxwWGDs="
1515
commands: |

example/.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steps:
55
env:
66
CRYPTIC_ADHOC_SECRET_SSH_KEY: "FPyxl8XnP4Ye8J1DExyytA3ZM68ff13+wPPtLiSktSHru0uO0oZYNeFhOBi+lT/Wig48iidYaKh+vBzzqBkOp+x5PP8FYqKJaD6Nj+tkIc1kOe94M0Yhn7Ao22+lu6hA5EUC5+0071DXLWkTB9Cmxbzl08KxapHjluUOuPFBnWokzFa2PAiAw0GuS4TXuwWNxfJpMl59W2IUPjLqO6tegZzg7yFhBcG8zKvnD1tVuYPQqA4aYvnQkwblxQDeJ5LMHXSDgpk1LRLJvhq5kbbMFZ42kb/emsFR7uU6Z3tmUVYPF4fCvDbvZHa2e/81P0ZHKWvQe1cSsx9x8AEWxzlT6g==;U2FsdGVkX1+KynLJPlxV7qdZ6KC5MCl55+N+gpnCbkRSJqJJRWwKz550fyI1PB6/"
77
plugins:
8-
- staticfloat/cryptic:
8+
- JuliaCI/cryptic:
99
# Our list of pipelines that should be launched (but don't require a signature)
1010
# These pipelines can be modified by any contributor and CI will still run.
1111
# Build secrets will not be available in these pipelines (or their children)

lib/yaml_extraction_prologue.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ function extract_encrypted_variables() {
1818
(shyaml -q keys-0 <<<"${PLUGINS}" || true) |
1919
while IFS='' read -r -d '' PLUGIN_NAME; do
2020
# Skip plugins that are not named `cryptic`
21-
if [[ "${PLUGIN_NAME}" != staticfloat/cryptic* ]]; then
21+
# For now, support both JuliaCI/cryptic* and staticfloat/cryptic*, to make the
22+
# transition smoother.
23+
if [[ "${PLUGIN_NAME}" != JuliaCI/cryptic* && "${PLUGIN_NAME}" != staticfloat/cryptic* ]]; then
2224
continue
2325
fi
2426
# For each plugin, if its `cryptic`, extract the variables
@@ -65,7 +67,9 @@ function extract_encrypted_files() {
6567
(shyaml -q keys-0 <<<"${PLUGINS}" || true) |
6668
while IFS='' read -r -d '' PLUGIN_NAME; do
6769
# Skip plugins that are not named `cryptic`
68-
if [[ "${PLUGIN_NAME}" != staticfloat/cryptic* ]]; then
70+
# For now, support both JuliaCI/cryptic* and staticfloat/cryptic*, to make the
71+
# transition smoother.
72+
if [[ "${PLUGIN_NAME}" != JuliaCI/cryptic* && "${PLUGIN_NAME}" != staticfloat/cryptic* ]]; then
6973
continue
7074
fi
7175
# For each plugin, if its `cryptic`, extract the files
@@ -76,7 +80,7 @@ function extract_encrypted_files() {
7680
done
7781
done
7882
done
79-
done
83+
done
8084
}
8185

8286
# Calculate the treehashes of each signed pipeline defined within a launching `.yml` file,
@@ -113,7 +117,9 @@ function extract_plugin_treehashes() {
113117
(shyaml -q keys-0 <<<"${PLUGINS}" || true) |
114118
while IFS='' read -r -d '' PLUGIN_NAME; do
115119
# Skip plugins that are not named `cryptic`
116-
if [[ "${PLUGIN_NAME}" != staticfloat/cryptic* ]]; then
120+
# For now, support both JuliaCI/cryptic* and staticfloat/cryptic*, to make the
121+
# transition smoother.
122+
if [[ "${PLUGIN_NAME}" != JuliaCI/cryptic* && "${PLUGIN_NAME}" != staticfloat/cryptic* ]]; then
117123
continue
118124
fi
119125

plugin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Cryptic
22
description: Deploy encrypted files to public repositories
3-
author: https://github.com/staticfloat
3+
author: https://github.com/JuliaCI
44
configuration:
55
properties:
6-
# base64-encoded, encrypted variables that will be exported to the command block
6+
# base64-encoded, encrypted variables that will be exported to the command block
77
# See `bin/encrypt_variable` for how to generate these.
88
variables:
99
type: array

0 commit comments

Comments
 (0)