File tree 5 files changed +14
-7
lines changed
src/utils/opt/devcontainer/bin
5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
if ! test -n " ${SKIP_DEVCONTAINER_UTILS_POST_ATTACH_COMMAND: +x} " ; then
4
+ sudo mkdir -m 0777 -p /var/log/devcontainer-utils;
5
+ sudo touch /var/log/devcontainer-utils/creds-s3.log;
6
+ sudo chmod 0777 /var/log/devcontainer-utils/creds-s3.log;
7
+
4
8
# shellcheck disable=SC1091
5
9
. devcontainer-utils-init-git-interactive;
6
10
Original file line number Diff line number Diff line change 78
78
# Passthrough if the format is csv or json
79
79
# Otherwise, transform the csv into a tsv.
80
80
if test " $f " = tsv; then
81
- if [[ " $( grep DISTRIB_RELEASE= /etc/lsb-release | cut -d= -f2) " > " 18 .04" ]]; then
81
+ if [[ " $( grep DISTRIB_RELEASE= /etc/lsb-release | cut -d= -f2) " > " 20 .04" ]]; then
82
82
cat - | sed ' s/\"//g' | column -t -s, -R $( seq -s, 1 13)
83
83
else
84
84
cat - | sed ' s/\"//g' | column -t -s,
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ reset_state() {
54
54
devcontainer-utils-stop-sccache --kill-all;
55
55
done
56
56
57
- rm -rf ~ /.aws/ ~ /.config/gh/ ~ /.config/sccache/config;
57
+ sudo rm -rf ~ /.aws/ ~ /.config/gh/ ~ /.config/sccache/config /var/log/devcontainer-utils/creds-s3.log ;
58
58
cp /tmp/.bashrc-clean ~ /.bashrc;
59
59
sudo cp /usr/bin/sccache{.orig,};
60
60
echo " #! /usr/bin/env bash" | sudo tee " ${utils_profile_script} " > /dev/null;
@@ -203,12 +203,13 @@ if test -n "${gh_token:+x}" \
203
203
204
204
no_creds_with_GH_TOKEN_AWS_ROLE_ARN_and_SCCACHE_BUCKET_should_generate_credentials () {
205
205
reset_state;
206
- devcontainer_utils_debug=' *' \
207
206
GH_TOKEN=" ${gh_token} " \
208
207
AWS_ROLE_ARN=" ${aws_role_arn} " \
209
208
SCCACHE_BUCKET=" ${rw_sccache_bucket} " \
210
209
SCCACHE_REGION=" ${rw_sccache_region} " \
211
210
devcontainer-utils-post-attach-command;
211
+ echo " creds-s3.log:" ;
212
+ sudo cat /var/log/devcontainer-utils/creds-s3.log;
212
213
expect_s3_cache_is_used;
213
214
}
214
215
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ reset_state() {
54
54
devcontainer-utils-stop-sccache --kill-all;
55
55
done
56
56
57
- rm -rf ~ /.aws/ ~ /.config/gh/ ~ /.config/sccache/config;
57
+ sudo rm -rf ~ /.aws/ ~ /.config/gh/ ~ /.config/sccache/config /var/log/devcontainer-utils/creds-s3.log ;
58
58
cp /tmp/.bashrc-clean ~ /.bashrc;
59
59
sudo cp /usr/bin/sccache{.orig,};
60
60
echo " #! /usr/bin/env bash" | sudo tee " ${utils_profile_script} " > /dev/null;
@@ -203,12 +203,13 @@ if test -n "${gh_token:+x}" \
203
203
204
204
no_creds_with_GH_TOKEN_AWS_ROLE_ARN_and_SCCACHE_BUCKET_should_generate_credentials () {
205
205
reset_state;
206
- devcontainer_utils_debug=' *' \
207
206
GH_TOKEN=" ${gh_token} " \
208
207
AWS_ROLE_ARN=" ${aws_role_arn} " \
209
208
SCCACHE_BUCKET=" ${rw_sccache_bucket} " \
210
209
SCCACHE_REGION=" ${rw_sccache_region} " \
211
210
devcontainer-utils-post-attach-command;
211
+ echo " creds-s3.log:" ;
212
+ sudo cat /var/log/devcontainer-utils/creds-s3.log;
212
213
expect_s3_cache_is_used;
213
214
}
214
215
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ reset_state() {
54
54
devcontainer-utils-stop-sccache --kill-all;
55
55
done
56
56
57
- rm -rf ~ /.aws/ ~ /.config/gh/ ~ /.config/sccache/config;
57
+ sudo rm -rf ~ /.aws/ ~ /.config/gh/ ~ /.config/sccache/config /var/log/devcontainer-utils/creds-s3.log ;
58
58
cp /tmp/.bashrc-clean ~ /.bashrc;
59
59
sudo cp /usr/bin/sccache{.orig,};
60
60
echo " #! /usr/bin/env bash" | sudo tee " ${utils_profile_script} " > /dev/null;
@@ -203,12 +203,13 @@ if test -n "${gh_token:+x}" \
203
203
204
204
no_creds_with_GH_TOKEN_AWS_ROLE_ARN_and_SCCACHE_BUCKET_should_generate_credentials () {
205
205
reset_state;
206
- devcontainer_utils_debug=' *' \
207
206
GH_TOKEN=" ${gh_token} " \
208
207
AWS_ROLE_ARN=" ${aws_role_arn} " \
209
208
SCCACHE_BUCKET=" ${rw_sccache_bucket} " \
210
209
SCCACHE_REGION=" ${rw_sccache_region} " \
211
210
devcontainer-utils-post-attach-command;
211
+ echo " creds-s3.log:" ;
212
+ sudo cat /var/log/devcontainer-utils/creds-s3.log;
212
213
expect_s3_cache_is_used;
213
214
}
214
215
You can’t perform that action at this time.
0 commit comments