Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): tune CI pipeline #452

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,24 @@ jobs:
echo "removing 'url.https://.insteadof' properties"
git config --unset url.https://.insteadof
cd ..
# git_server_ip=$(bosh vms -d git-server --json|jq -r .Tables[].Rows[].ips)
# mkdir empty-repo
# cd empty-repo
# git config --global user.email "[email protected]"
# git config --global user.name "COA CI upload pipelines"
# touch reset-repo.marker
# git init .
# git add reset-repo.marker
# git commit -m"Integration Tests: reset git repo status by upload-pipelines"
# remotes=$(bosh interpolate --path /git_server_manifest/instance_groups/name=git-server/jobs/name=git-server/properties/repositories ../cf-ops-automation/ci/bootstrap_coa_env/git-server-manifest-prereqs.yml|cut -d' ' -f2)
# echo "Detected remotes repositories: "
# echo $remotes
# for r in $remotes;do
# echo "Resetting $r"
# git remote add "$r" git://$git_server_ip/$r
# git push -f "$r" master
# done
# cd ..
ruby ./cf-ops-automation/scripts/run_integration_tests.rb
status=$?
if [ -f ./coa-logs/stdout.log ];then
Expand All @@ -449,6 +467,7 @@ jobs:
params:
PREREQS_PATHS_RAW: "./prereqs/*.yml"
COA_LOG_PATH: "../../../../coa-logs"
<<: *integration_tests_setup_pre_requisites_task_config_params
on_failure:
task: dump-coa-log-file
image: cf-ops-automation-docker-image-develop
Expand Down
8 changes: 4 additions & 4 deletions lib/coa/utils/concourse/fly.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def initialize(target:, creds:, team: 'main')
self.class.login(target: target, creds: creds, team: team)
end

def destroy_pipeline(pipeline)
run "destroy-pipeline --pipeline #{pipeline} --non-interactive"
def destroy_pipeline(pipeline, options = {})
run "destroy-pipeline --pipeline #{pipeline} --non-interactive", options
end

def unpause_pipeline(pipeline)
Expand Down Expand Up @@ -69,9 +69,9 @@ def secure_ca_cert_option(ca_cert)

private

def run(command)
def run(command, options = {})
Coa::Utils::CommandRunner.
new("fly --target #{@target} #{command}").
new("fly --target #{@target} #{command}", options).
execute
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/coa/utils/concourse/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def set(options)
fly.set_pipeline(name, options)
end

def destroy
fly.destroy_pipeline(name)
def destroy(options)
fly.destroy_pipeline(name, options)
end

def trigger_and_watch_jobs
Expand All @@ -60,7 +60,7 @@ def unpause_and_watch(pipeline_list, concourse)
def destroy(pipeline_list, concourse)
pipeline_list.each do |name, attributes|
pipeline = new_from_hash(name: name, attributes: attributes, concourse: concourse)
pipeline.destroy
pipeline.destroy(fail_silently: true)
end
end

Expand Down