Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/pulumi/pulumi-hugo into f…
Browse files Browse the repository at this point in the history
…eature-3.0
  • Loading branch information
Dave Wrede committed Apr 15, 2021
2 parents 6e93c04 + b7f9669 commit 6cc6a8e
Show file tree
Hide file tree
Showing 14 changed files with 117 additions and 28 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ ensure: clean
lint:
./scripts/lint.sh

.PHONY: test
test:
./scripts/test.sh

.PHONY: build
build:
./scripts/build.sh
Expand All @@ -23,7 +27,7 @@ serve-all:
./scripts/serve.sh all

.PHONY: ci-pull-request
ci-pull-request: ensure
ci-pull-request: ensure lint test
./scripts/ci/pull-request.sh

.PHONY: ci-pull-request-closed
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ make serve-all

The `serve-all` target runs Hugo, node-sass, and the Stencil development server concurrently, allowing you to make changes to Sass files, Stencil components, or TypeScript/JavaScript source files, and have those changes compiled and reloaded automatically as well.

## Linting and testing

To check your code and your Markdown files for issues before submitting, run:

```
make lint test
```

## Tidying up

To clear away any module caches or build artifacts, run:
Expand Down
3 changes: 3 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

yarn --cwd themes/default test
44 changes: 44 additions & 0 deletions themes/default/content/blog/pulumiup/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "PulumiUP: the Event for Cloud Engineers"
date: 2021-04-14
meta_desc: "PulumiUP is a two-hour keynote with cloud engineering industry leaders from Amazon Web Services, Snowflake, and Fenergo."
meta_image: pulumiup.png
authors:
- wendy-smith
tags:
- cloud-engineering
- PulumiUP
---

My professional background has included nearly ten years of managing field events and user conferences. I never thought I would say this, but I miss traveling. I even missed Vegas and AWS reInvent this year. I miss connecting with customers and advocates in our communities. I wish we could all be looking forward to getting together in person in Seattle or Austin or _insert any city here_. As the year continued, it became clear we were not going back to in-person events anytime soon, and everyone in the industry pivoted to virtual programs while video conferencing became an all-day activity.

<!--more-->

We spent a lot of time considering how to best engage and share announcements with our community and encourage the cloud engineering community's growth. All of us here at Pulumi recognize how valuable your time is and how much time we've all spent on virtual event platforms in the last year. With that in mind, we made a deliberate decision to avoid any all-day or multi-day programming. Instead, we are hosting a short 2-hour keynote that we think you will find insightful and valuable, with best practices and real-life situations that you can learn from and apply to your approach to building, delivering, and managing modern cloud applications.

![PulumiUP](pulumiup.png)

PulumiUP Agenda - Kicking off on 4/20 at 9 am - 11 am PST - [Save your spot](https://www.pulumi.com/pulumi-up/)

| **Speakers** | **Title and Company** | **Subject** |
| - | - |- |
| Joe Duffy | Co-Founder and CEO, Pulumi | **The Modern Cloud Era: All Software is Cloud Software** |
|Adrian Cockcroft & Aaron Kao | VP of Sustainability Architecture, Amazon VP of Marketing, Pulumi | **Discussion: What’s different about building in a modern cloud application world** |
| Justin Fitzhugh | VP of Cloud Engineering, Snowflake | **Perspectives from Cloud Engineering Pioneers** |
| Keith Redmond | VP of SaaS Engineering, Fenergo | **Perspectives from Cloud Engineering Pioneers** |
| Luke Hoban | CTO, Pulumi | **Placing Cloud Engineering in the Hands of Every Developer** |
| Sophia Parafina | Technical Marketing Manager, Pulumi|
| Komal Ali | Software Engineer |

| **Panel: Hear from the Experts: Planning for the Future of Modern Cloud Applications** | **Title and Company** |
|- | - |
| Moderator: Kat Cosgrove | Developer Advocate, JFrog |
| Justin Fitzhugh | VP of Cloud Engineering, Snowflake |
| Charity Majors | CTO/Co-Founder, Honeycomb |
| Dana Lawson | VP of Engineering, GitHub |

Engineering leadership from Snowflake, the cloud data warehousing organization, and Fenergo, a client lifecycle management provider for the financial services industry, will share their perspectives and experiences practicing cloud engineering for the modern cloud era. Justin Fitzhugh, VP of Cloud Engineering at Snowflake, and Keith Redmond, VP of SaaS Engineering at Fenergo, will each share how they reduced costs while empowering every developer on their team.

Everyone at Pulumi is super excited to be sharing this material with our community. If you are interested in cloud engineering, cloud infrastructure, software development, modern applications, or Pulumi, you want to save your spot for this 2-hour event. Whether you’re a seasoned cloud engineer or just curious to learn what’s all the fuss about cloud engineering, you will learn something new about the future of building on the cloud at PulumiUP. You can also sign up for new workshops and other events occurring in April and May. We’ll miss seeing you in person but hope that changes soon! Pulumipus and I are packing our bags and hoping for the best.

[Save your spot today!](https://www.pulumi.com/pulumi-up/)
Binary file added themes/default/content/blog/pulumiup/meta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ _, err = s3.NewBucketObject(ctx, "index.html", &s3.BucketObjectArgs{
Acl: pulumi.String("public-read"),
ContentType: pulumi.String("text/html"),
Bucket: bucket.ID(),
Source: pulumi.NewFileAsset("index.html")
Source: pulumi.NewFileAsset("index.html"),
})
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ In `main.go`, create the `BucketObject` right after creating the bucket itself.
```go
_, err = s3.NewBucketObject(ctx, "index.html", &s3.BucketObjectArgs{
Bucket: bucket.ID(),
Source: pulumi.NewFileAsset("index.html")
Source: pulumi.NewFileAsset("index.html"),
})
if err != nil {
return err
Expand Down
39 changes: 30 additions & 9 deletions themes/default/content/docs/guides/testing/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,19 @@ By running a program through integration tests, you can ensure:
- Your project can be successfully updated from its starting state to other states.
- Your project can be successfully destroyed and removed from your cloud provider.

In principle, integration tests can be written in any general-purpose programming language. Tests do not interact with the program-under-test directly: instead, they shell out to the Pulumi CLI commands to create, update, and delete cloud infrastructure.
In principle, integration tests can be written in any general-purpose programming language. Tests do not interact with the program-under-test directly: instead, they utilize Pulumi to create, update, and delete cloud infrastructure.

## Pulumi's Integration Test Framework

At Pulumi, we maintain an extensive suite of integration tests to validate the functionality of the core CLI and providers. Pulumi's integration test framework is written in Go.
At Pulumi, we maintain an extensive suite of integration tests to validate the functionality of the core CLI and providers. To facilitate this testing, Pulumi has an integration test framework written in Go.

This framework has been built to take a directory containing a full Pulumi program and drive various lifecycle operations against it: deploying a new stack from scratch, updating it with variations, and tearing it down afterwards, potentially multiple times. We run these tests for each pull request, regularly (such as nightly), and as stress tests.

While we don't currently provide first-party integration test frameworks for other languages, we encourage the community to do so. [Pitfall](https://github.com/bincyber/pitfall) is an example of a community-driven framework written in Python.

The rest of this guide shows you how to leverage the Pulumi integration test framework. You can use the Go test framework no matter the language your Pulumi program is written in.
Below, we provide walk through leveraging the Pulumi integration test framework. You can use the Go test framework no matter the language your Pulumi program is written in. At the end of this guide, we discuss using Pulumi's Automation API, which is available in all Pulumi-supported languages, as an alternative to the integration test framework.

### A Basic Integration Test

The following program is a simplified test of our example that provisions an [S3 bucket and objects in Pulumi](https://github.com/pulumi/examples/tree/master/aws-js-s3-folder):

**example_test.go:**
The following program is a simplified test of our example that provisions an [S3 bucket and objects in Pulumi](https://github.com/pulumi/examples/tree/master/aws-go-s3-folder):

```go
package test
Expand Down Expand Up @@ -67,7 +63,7 @@ func TestExamples(t *testing.T) {
```

This test runs through a basic lifecycle of stack creation, updating,
and destruction, for the `aws-js-s3-folder` example. It takes about a
and destruction, for the `aws-go-s3-folder` example. It takes about a
minute or so to report success:

```
Expand Down Expand Up @@ -149,8 +145,33 @@ If you are using GitHub, Pulumi offers a [GitHub App]({{< relref "/docs/guides/c
By leveraging Pulumi for your core acceptance test workflow, you'll
unlock new automation capabilities that improve your team's productivity and confidence in the quality of changes.

## Using Automation API for Integration Tests

Pulumi's Automation API provides another option for writing end-to-end integration tests. It is not a purpose-built integration testing framework as with above, but you can still accomplish the same objectives of basic correctness testing, resource validation, and runtime testing. Automation API is available in the Node, Python, .NET, and Go SDKs.

At a high level, you will want to create a stack, setup stack config, deploy the stack, perform any resource validation or runtime checks, and finally teardown the stack. The [`localProgram-tsnode-mochatests` example](https://github.com/pulumi/automation-api-examples/tree/main/nodejs/localProgram-tsnode-mochatests) provides one example for how to setup a stack, perform runtime validation checks, and then tear down the stack as part of a test.

In order to perform resource validation, you can export the stack and examine the resulting resources. For example:

```typescript
export async function getDeployment(): Promise<Deployment> {
const stack = await LocalWorkspace.createOrSelectStack(args);

return stack.exportStack();
}
```

You can then iterate through the `Deployment` object to check that the expected resources and property values are present.

## Full Examples

A minimal example of using Pulumi's Go integration test framework is available in the examples repository: [Integration Testing in Go](https://github.com/pulumi/examples/tree/05ae8e1803d7f44cecac69589175e416e421cdfe/testing-integration).

Our own [integration test suite](https://github.com/pulumi/examples/blob/05ae8e1803d7f44cecac69589175e416e421cdfe/misc/test/examples_test.go) can be a source of further inspiration.

We even write tests inside Pulumi using Automation API and language-specific test frameworks like `mocha`. Take a look at the source for yourself:

- [NodeJS tests](https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/tests/automation/localWorkspace.spec.ts)
- [Go tests](https://github.com/pulumi/pulumi/blob/master/sdk/go/auto/local_workspace_test.go)
- [Python tests](https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/test/automation/test_local_workspace.py)
- [C# tests](https://github.com/pulumi/pulumi/blob/master/sdk/dotnet/Pulumi.Automation.Tests/LocalWorkspaceTests.cs)
11 changes: 11 additions & 0 deletions themes/default/content/docs/intro/concepts/inputs-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,24 @@ let connectionString = pulumi.all([sqlServer.name, database.name])
{{% /choosable %}}
{{% choosable language python %}}

In python, you can pass in unnamed arguments to `Output.all` to create an Output list, for example:

```python
from pulumi import Output
# ...
connection_string = Output.all(sql_server.name, database.name) \
.apply(lambda args: f"Server=tcp:{args[0]}.database.windows.net;initial catalog={args[1]}...")
```

Or, you can pass in named (keyword) arguments to `Output.all` to create an Output dictionary, for example:

```python
from pulumi import Output
# ...
connection_string = Output.all(server=sql_server.name, db=database.name) \
.apply(lambda args: f"Server=tcp:{args['server']}.database.windows.net;initial catalog={args['db']}...")
```

{{% /choosable %}}
{{% choosable language go %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ aliases:
- /docs/intro/console/extensions/ci-cd-integration-assistant/
---

> This feature is available on the Pulumi Team Pro and Enterprise editions.
> If you would like to try this feature, [start a trial](https://app.pulumi.com/site/trial) now
> or contact us at <a href="mailto:[email protected]">[email protected]</a>.
The CI/CD integration assistant helps you integrate Pulumi into CI/CD systems for automatically deploying stacks.

<!--more-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Name of the webinar.
title: "Automation API: Build a Self-Service Infrastructure Platform with Python + Flask"
title: "Build a Self-Service Infrastructure Platform with Python"
meta_desc: "In this workshop, you’ll build a Python & Flask web application that lets you and your developers deploy applications at the click of a button."

# A featured webinar will display first in the list.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Name of the webinar.
title: "Azure: Unlocking Azure with Infrastructure as Software with TypeScript"
title: "Azure Infrastructure as Software with TypeScript"
meta_desc: "In this workshop, you’ll use the Azure native provider to build infrastructure using TypeScript SDK and examine some of the features not previously possible."

# A featured webinar will display first in the list.
Expand Down
22 changes: 12 additions & 10 deletions themes/default/layouts/page/pricing.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ <h2 class="text-3xl text-center mt-10 mb-0 lg:hidden">Pulumi Service</h2>
</li>
</ul>
</div>
<div class="mt-6 lg:mt-16 lg:pt-3">
<a href="{{ relref . "/docs/get-started" }}" class="btn btn-purple px-6 py-3 inline-block lg:hidden">GET STARTED</a>
<a href="{{ relref . "/docs/get-started" }}" class="btn btn-purple-transparent px-6 py-3 hidden lg:inline-block">GET STARTED</a>
<div class="lg:hidden mt-6">
<a href="{{ relref . "/docs/get-started" }}" class="btn btn-purple px-6 py-3">GET STARTED</a>
</div>
<div class="w-full text-center hidden lg:inline-block lg:mt-10 lg:pt-2">
<a href="{{ relref . "/docs/get-started" }}" class="btn btn-purple-transparent px-6 py-3">GET STARTED</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -97,6 +99,12 @@ <h2 class="text-3xl text-center mt-10 mb-0 lg:hidden">Pulumi Service</h2>
<span>1 organization</span>
</span>
</li>
<li>
<span>
<i class="fa fa-check text-green-500 mr-2"></i>
<span>CI/CD Assistant</span>
</span>
</li>
<li>
<span>
<i class="fa fa-check text-green-500 mr-2"></i>
Expand Down Expand Up @@ -142,12 +150,6 @@ <h2 class="text-3xl text-center mt-10 mb-0 lg:hidden">Pulumi Service</h2>
<span>APIs and webhooks</span>
</span>
</li>
<li>
<span>
<i class="fa fa-check text-green-500 mr-2"></i>
<span>CI/CD Assistant</span>
</span>
</li>
<li>
<span>
<i class="fa fa-check text-green-500 mr-2"></i>
Expand Down Expand Up @@ -508,7 +510,7 @@ <h2 class="text-3xl text-center mt-10 mb-0 lg:hidden">Pulumi Service</h2>
<span><a class="text-blue-500 underline" href="{{ relref . "/docs/intro/console/ci-cd-integration-assistant" }}">CI/CD Assistant</a></span>
</div>
<div class="compare-plans-table-row-item">
<span></span>
<span><i class="fa fa-check text-green-500 mr-2"></i></span>
</div>
<div class="compare-plans-table-row-item">
<span><i class="fa fa-check text-green-500 mr-2"></i></span>
Expand Down

0 comments on commit 6cc6a8e

Please sign in to comment.