mirror of
https://github.com/puppetlabs/vmpooler-provider-gce.git
synced 2026-01-25 19:18:40 -05:00
Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fce29feb60 | ||
|
|
651e4ba892 | ||
|
|
ec6383fac8 | ||
|
|
a5c4805106 | ||
|
|
fff2b5c766 | ||
|
|
8eec9a765f | ||
|
|
2d56355b74 | ||
|
|
bbce7bd019 | ||
|
|
428f7a041d | ||
|
|
5cad1c9711 | ||
|
|
01a0446e03 | ||
|
|
9639a2df7f | ||
|
|
e58c1a8bb3 | ||
|
|
81c59cfc9a | ||
|
|
493e358ba1 |
13 changed files with 62 additions and 14 deletions
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
|
|
@ -5,3 +5,9 @@ updates:
|
|||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
|
|
|
|||
12
.github/workflows/auto_release_prep.yml
vendored
Normal file
12
.github/workflows/auto_release_prep.yml
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
name: Automated release prep
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
auto_release_prep:
|
||||
uses: puppetlabs/release-engineering-repo-standards/.github/workflows/auto_release_prep.yml@v1
|
||||
secrets: inherit
|
||||
with:
|
||||
project-type: ruby
|
||||
version-file-path: lib/vmpooler-provider-gce/version.rb
|
||||
8
.github/workflows/dependabot_merge.yml
vendored
Normal file
8
.github/workflows/dependabot_merge.yml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
name: Dependabot auto-merge
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
dependabot_merge:
|
||||
uses: puppetlabs/release-engineering-repo-standards/.github/workflows/dependabot_merge.yml@v1
|
||||
secrets: inherit
|
||||
8
.github/workflows/ensure_label.yml
vendored
Normal file
8
.github/workflows/ensure_label.yml
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
name: Ensure label
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
ensure_label:
|
||||
uses: puppetlabs/release-engineering-repo-standards/.github/workflows/ensure_label.yml@v1
|
||||
secrets: inherit
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -7,10 +7,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'puppetlabs/vmpooler-provider-gce'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get Current Version
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
id: cv
|
||||
with:
|
||||
script: |
|
||||
|
|
|
|||
4
.github/workflows/security.yml
vendored
4
.github/workflows/security.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout repo content
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: setup ruby
|
||||
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
- name: check lock
|
||||
run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
|
||||
# install java
|
||||
- uses: actions/setup-java@v3
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||
java-version: '17'
|
||||
|
|
|
|||
4
.github/workflows/testing.yml
vendored
4
.github/workflows/testing.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
ruby-version:
|
||||
- 'jruby-9.4.3.0'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
|
@ -36,7 +36,7 @@ jobs:
|
|||
ruby-version:
|
||||
- 'jruby-9.4.3.0'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
# Changelog
|
||||
|
||||
## [1.3.0](https://github.com/puppetlabs/vmpooler-provider-gce/tree/1.3.0) (2023-08-18)
|
||||
|
||||
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-gce/compare/1.2.0...1.3.0)
|
||||
|
||||
**Implemented enhancements:**
|
||||
|
||||
- \(POD-10\) Log reason for failed VM checks. [\#33](https://github.com/puppetlabs/vmpooler-provider-gce/pull/33) ([isaac-hammes](https://github.com/isaac-hammes))
|
||||
|
||||
## [1.2.0](https://github.com/puppetlabs/vmpooler-provider-gce/tree/1.2.0) (2023-08-10)
|
||||
|
||||
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-gce/compare/1.1.0...1.2.0)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
vmpooler-provider-gce (1.2.0)
|
||||
vmpooler-provider-gce (1.3.0)
|
||||
google-apis-compute_v1 (~> 0.14)
|
||||
googleauth (>= 0.16.2, < 1.4.0)
|
||||
vmpooler (~> 3.0)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module VmpoolerProviderGce
|
||||
VERSION = '1.2.0'
|
||||
VERSION = '1.3.0'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -460,15 +460,17 @@ module Vmpooler
|
|||
true
|
||||
end
|
||||
|
||||
def vm_ready?(pool_name, vm_name)
|
||||
def vm_ready?(pool_name, vm_name, redis)
|
||||
debug_logger('vm_ready?')
|
||||
begin
|
||||
# TODO: we could use a healthcheck resource attached to instance
|
||||
domain = domain(pool_name)
|
||||
open_socket(vm_name, domain)
|
||||
rescue StandardError => _e
|
||||
rescue StandardError => e
|
||||
redis.hset("vmpooler__vm__#{vm_name}", 'open_socket_error', e.to_s)
|
||||
return false
|
||||
end
|
||||
redis.hdel("vmpooler__vm__#{vm_name}", 'open_socket_error')
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||
#
|
||||
# Update Gemfile.lock
|
||||
docker run -it --rm \
|
||||
docker run -t --rm \
|
||||
-v $(pwd):/app \
|
||||
jruby:9.4.3.0-jdk11 \
|
||||
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends git make netbase && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
|
||||
|
||||
# Update Changelog
|
||||
docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
|
||||
docker run -t --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
|
||||
githubchangeloggenerator/github-changelog-generator:1.16.2 \
|
||||
github_changelog_generator --future-release $(grep VERSION lib/vmpooler-provider-gce/version.rb |rev |cut -d "'" -f2 |rev)
|
||||
|
||||
|
|
|
|||
|
|
@ -361,7 +361,9 @@ EOT
|
|||
end
|
||||
|
||||
it 'should return true' do
|
||||
expect(subject.vm_ready?(poolname, vmname)).to be true
|
||||
redis_connection_pool.with_metrics do |redis|
|
||||
expect(subject.vm_ready?(poolname, vmname, redis)).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -371,7 +373,9 @@ EOT
|
|||
end
|
||||
|
||||
it 'should return false' do
|
||||
expect(subject.vm_ready?(poolname, vmname)).to be false
|
||||
redis_connection_pool.with_metrics do |redis|
|
||||
expect(subject.vm_ready?(poolname, vmname, redis)).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue