mirror of
https://github.com/puppetlabs/vmpooler-provider-gce.git
synced 2026-01-26 11:28:41 -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:
|
schedule:
|
||||||
interval: weekly
|
interval: weekly
|
||||||
open-pull-requests-limit: 10
|
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
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'puppetlabs/vmpooler-provider-gce'
|
if: github.repository == 'puppetlabs/vmpooler-provider-gce'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get Current Version
|
- name: Get Current Version
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v7
|
||||||
id: cv
|
id: cv
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
|
|
||||||
4
.github/workflows/security.yml
vendored
4
.github/workflows/security.yml
vendored
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout repo content
|
- name: checkout repo content
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: setup ruby
|
- name: setup ruby
|
||||||
|
|
@ -22,7 +22,7 @@ jobs:
|
||||||
- name: check lock
|
- name: check lock
|
||||||
run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
|
run: '[ -f "Gemfile.lock" ] && echo "package lock file exists, skipping" || bundle lock'
|
||||||
# install java
|
# install java
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin' # See 'Supported distributions' for available options
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
|
|
|
||||||
4
.github/workflows/testing.yml
vendored
4
.github/workflows/testing.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
ruby-version:
|
ruby-version:
|
||||||
- 'jruby-9.4.3.0'
|
- 'jruby-9.4.3.0'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
ruby-version:
|
ruby-version:
|
||||||
- 'jruby-9.4.3.0'
|
- 'jruby-9.4.3.0'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
# Changelog
|
# 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)
|
## [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)
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-gce/compare/1.1.0...1.2.0)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
vmpooler-provider-gce (1.2.0)
|
vmpooler-provider-gce (1.3.0)
|
||||||
google-apis-compute_v1 (~> 0.14)
|
google-apis-compute_v1 (~> 0.14)
|
||||||
googleauth (>= 0.16.2, < 1.4.0)
|
googleauth (>= 0.16.2, < 1.4.0)
|
||||||
vmpooler (~> 3.0)
|
vmpooler (~> 3.0)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module VmpoolerProviderGce
|
module VmpoolerProviderGce
|
||||||
VERSION = '1.2.0'
|
VERSION = '1.3.0'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -460,15 +460,17 @@ module Vmpooler
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def vm_ready?(pool_name, vm_name)
|
def vm_ready?(pool_name, vm_name, redis)
|
||||||
debug_logger('vm_ready?')
|
debug_logger('vm_ready?')
|
||||||
begin
|
begin
|
||||||
# TODO: we could use a healthcheck resource attached to instance
|
# TODO: we could use a healthcheck resource attached to instance
|
||||||
domain = domain(pool_name)
|
domain = domain(pool_name)
|
||||||
open_socket(vm_name, domain)
|
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
|
return false
|
||||||
end
|
end
|
||||||
|
redis.hdel("vmpooler__vm__#{vm_name}", 'open_socket_error')
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@
|
||||||
# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||||
#
|
#
|
||||||
# Update Gemfile.lock
|
# Update Gemfile.lock
|
||||||
docker run -it --rm \
|
docker run -t --rm \
|
||||||
-v $(pwd):/app \
|
-v $(pwd):/app \
|
||||||
jruby:9.4.3.0-jdk11 \
|
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=$?"'
|
/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
|
# 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 \
|
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)
|
github_changelog_generator --future-release $(grep VERSION lib/vmpooler-provider-gce/version.rb |rev |cut -d "'" -f2 |rev)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,9 @@ EOT
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return true' do
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -371,7 +373,9 @@ EOT
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return false' do
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue