Skip to content

Commit

Permalink
Merge branch 'main' of github.com:GaloyMoney/stablesats-rs into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
git committed Aug 31, 2023
2 parents b10a5d0 + bd0eaec commit e104254
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
8 changes: 4 additions & 4 deletions ci/vendir.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ apiVersion: vendir.k14s.io/v1alpha1
directories:
- contents:
- git:
commitTitle: 'chore: use --attach on docker host'
sha: 9d971fd13c024c5f8e6888208a0311178453409d
commitTitle: 'feat: allow public or private repo selection (#34)'
sha: 53fc9dd805d3574d200e8e6e99f856c0912b52a8
path: .
path: ../.github/workflows/vendor
- contents:
- git:
commitTitle: 'chore: use --attach on docker host'
sha: 9d971fd13c024c5f8e6888208a0311178453409d
commitTitle: 'feat: allow public or private repo selection (#34)'
sha: 53fc9dd805d3574d200e8e6e99f856c0912b52a8
path: .
path: ./vendor
kind: LockConfig
4 changes: 2 additions & 2 deletions ci/vendir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ directories:
- path: . # Copy this folder out to ..
git:
url: https://github.com/GaloyMoney/concourse-shared.git
ref: 9d971fd13c024c5f8e6888208a0311178453409d
ref: 53fc9dd805d3574d200e8e6e99f856c0912b52a8
includePaths:
- shared/actions/*
excludePaths:
Expand All @@ -20,7 +20,7 @@ directories:
- path: .
git:
url: https://github.com/GaloyMoney/concourse-shared.git
ref: 9d971fd13c024c5f8e6888208a0311178453409d
ref: 53fc9dd805d3574d200e8e6e99f856c0912b52a8
includePaths:
- shared/ci/**/*
excludePaths:
Expand Down
8 changes: 6 additions & 2 deletions ci/vendor/pipeline-fragments.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#@ return "us.gcr.io/galoy-org"
#@ end

#@ def private_docker_registry():
#@ return "gcr.io/galoy-org"
#@ end

#@ def nodejs_concourse_image():
#@ return public_docker_registry() + "/nodejs-concourse"
#@ end
Expand Down Expand Up @@ -402,14 +406,14 @@ source:
private_key: #@ data.values.github_private_key
#@ end

#@ def edge_image_resource():
#@ def edge_image_resource(publicRepo = True):
name: edge-image
type: registry-image
source:
tag: edge
username: #@ data.values.docker_registry_user
password: #@ data.values.docker_registry_password
repository: #@ public_docker_registry() + "/" + data.values.gh_repository
repository: #@ public_docker_registry() if publicRepo else private_docker_registry() + "/" + data.values.gh_repository
#@ end

#@ def nodejs_deps_resource(webhook = False):
Expand Down
6 changes: 3 additions & 3 deletions ci/vendor/tasks/test-on-docker-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ${SSH_PUB_KEY}
EOF
gcloud auth activate-service-account --key-file ${CI_ROOT}/gcloud-creds.json 2> /dev/null

gcloud_ssh "docker ps -qa | xargs docker rm -fv || true; sudo rm -rf ${REPO_PATH}"
gcloud_ssh "docker ps -qa | xargs docker rm -fv || true; sudo rm -rf ${REPO_PATH} || true; mkdir -p ${REPO_PATH} && cd ${REPO_PATH}/../ && rmdir $(basename ${REPO_PATH})"

pushd ${REPO_PATH}

Expand All @@ -42,11 +42,11 @@ gcloud compute scp --ssh-key-file=${CI_ROOT}/login.ssh \
--zone=${host_zone} \
--project=${gcp_project} > /dev/null

gcloud_ssh "cd ${REPO_PATH}; export TMP_ENV_CI=tmp.env.ci; export COMPOSE_PROJECT_NAME=${REPO_PATH}; docker compose pull; docker compose -f docker-compose.yml up ${TEST_CONTAINER} --attach ${TEST_CONTAINER} 2>&1"
gcloud_ssh "cd ${REPO_PATH}; export TMP_ENV_CI=tmp.env.ci; export COMPOSE_PROJECT_NAME=$(basename ${REPO_PATH}); source .envrc || true; docker compose pull; docker compose -f docker-compose.yml up ${TEST_CONTAINER} --attach ${TEST_CONTAINER} 2>&1"

container_id=$(gcloud_ssh "docker ps -q -f status=exited -f name=${PWD##*/}-${TEST_CONTAINER}-")
test_status=$(gcloud_ssh "docker inspect $container_id --format='{{.State.ExitCode}}'")

gcloud_ssh "cd ${REPO_PATH}; docker compose down --remove-orphans --timeout 1"
gcloud_ssh "cd ${REPO_PATH}; export COMPOSE_PROJECT_NAME=$(basename ${REPO_PATH}); docker compose down --remove-orphans --timeout 1"

exit $test_status

0 comments on commit e104254

Please sign in to comment.